| OLD | NEW |
| (Empty) |
| 1 library googleapis.dfareporting.v2_2.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_2.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 buildUnnamed3042() { | |
| 55 var o = new core.List<core.String>(); | |
| 56 o.add("foo"); | |
| 57 o.add("foo"); | |
| 58 return o; | |
| 59 } | |
| 60 | |
| 61 checkUnnamed3042(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 buildUnnamed3043() { | |
| 68 var o = new core.List<core.String>(); | |
| 69 o.add("foo"); | |
| 70 o.add("foo"); | |
| 71 return o; | |
| 72 } | |
| 73 | |
| 74 checkUnnamed3043(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 = buildUnnamed3042(); | |
| 86 o.accountProfile = "foo"; | |
| 87 o.active = true; | |
| 88 o.activeAdsLimitTier = "foo"; | |
| 89 o.activeViewOptOut = true; | |
| 90 o.availablePermissionIds = buildUnnamed3043(); | |
| 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 checkUnnamed3042(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 checkUnnamed3043(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 buildUnnamed3044() { | |
| 163 var o = new core.List<core.String>(); | |
| 164 o.add("foo"); | |
| 165 o.add("foo"); | |
| 166 return o; | |
| 167 } | |
| 168 | |
| 169 checkUnnamed3044(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 = buildUnnamed3044(); | |
| 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 checkUnnamed3044(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 buildUnnamed3045() { | |
| 228 var o = new core.List<api.AccountPermissionGroup>(); | |
| 229 o.add(buildAccountPermissionGroup()); | |
| 230 o.add(buildAccountPermissionGroup()); | |
| 231 return o; | |
| 232 } | |
| 233 | |
| 234 checkUnnamed3045(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 = buildUnnamed3045(); | |
| 246 o.kind = "foo"; | |
| 247 } | |
| 248 buildCounterAccountPermissionGroupsListResponse--; | |
| 249 return o; | |
| 250 } | |
| 251 | |
| 252 checkAccountPermissionGroupsListResponse(api.AccountPermissionGroupsListResponse
o) { | |
| 253 buildCounterAccountPermissionGroupsListResponse++; | |
| 254 if (buildCounterAccountPermissionGroupsListResponse < 3) { | |
| 255 checkUnnamed3045(o.accountPermissionGroups); | |
| 256 unittest.expect(o.kind, unittest.equals('foo')); | |
| 257 } | |
| 258 buildCounterAccountPermissionGroupsListResponse--; | |
| 259 } | |
| 260 | |
| 261 buildUnnamed3046() { | |
| 262 var o = new core.List<api.AccountPermission>(); | |
| 263 o.add(buildAccountPermission()); | |
| 264 o.add(buildAccountPermission()); | |
| 265 return o; | |
| 266 } | |
| 267 | |
| 268 checkUnnamed3046(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 = buildUnnamed3046(); | |
| 280 o.kind = "foo"; | |
| 281 } | |
| 282 buildCounterAccountPermissionsListResponse--; | |
| 283 return o; | |
| 284 } | |
| 285 | |
| 286 checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { | |
| 287 buildCounterAccountPermissionsListResponse++; | |
| 288 if (buildCounterAccountPermissionsListResponse < 3) { | |
| 289 checkUnnamed3046(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 buildUnnamed3047() { | |
| 345 var o = new core.List<api.AccountUserProfile>(); | |
| 346 o.add(buildAccountUserProfile()); | |
| 347 o.add(buildAccountUserProfile()); | |
| 348 return o; | |
| 349 } | |
| 350 | |
| 351 checkUnnamed3047(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 = buildUnnamed3047(); | |
| 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 checkUnnamed3047(o.accountUserProfiles); | |
| 374 unittest.expect(o.kind, unittest.equals('foo')); | |
| 375 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 376 } | |
| 377 buildCounterAccountUserProfilesListResponse--; | |
| 378 } | |
| 379 | |
| 380 buildUnnamed3048() { | |
| 381 var o = new core.List<api.Account>(); | |
| 382 o.add(buildAccount()); | |
| 383 o.add(buildAccount()); | |
| 384 return o; | |
| 385 } | |
| 386 | |
| 387 checkUnnamed3048(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 = buildUnnamed3048(); | |
| 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 checkUnnamed3048(o.accounts); | |
| 410 unittest.expect(o.kind, unittest.equals('foo')); | |
| 411 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 412 } | |
| 413 buildCounterAccountsListResponse--; | |
| 414 } | |
| 415 | |
| 416 buildUnnamed3049() { | |
| 417 var o = new core.List<api.DimensionValue>(); | |
| 418 o.add(buildDimensionValue()); | |
| 419 o.add(buildDimensionValue()); | |
| 420 return o; | |
| 421 } | |
| 422 | |
| 423 checkUnnamed3049(core.List<api.DimensionValue> o) { | |
| 424 unittest.expect(o, unittest.hasLength(2)); | |
| 425 checkDimensionValue(o[0]); | |
| 426 checkDimensionValue(o[1]); | |
| 427 } | |
| 428 | |
| 429 buildUnnamed3050() { | |
| 430 var o = new core.List<core.String>(); | |
| 431 o.add("foo"); | |
| 432 o.add("foo"); | |
| 433 return o; | |
| 434 } | |
| 435 | |
| 436 checkUnnamed3050(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 = buildUnnamed3049(); | |
| 448 o.kind = "foo"; | |
| 449 o.metricNames = buildUnnamed3050(); | |
| 450 } | |
| 451 buildCounterActivities--; | |
| 452 return o; | |
| 453 } | |
| 454 | |
| 455 checkActivities(api.Activities o) { | |
| 456 buildCounterActivities++; | |
| 457 if (buildCounterActivities < 3) { | |
| 458 checkUnnamed3049(o.filters); | |
| 459 unittest.expect(o.kind, unittest.equals('foo')); | |
| 460 checkUnnamed3050(o.metricNames); | |
| 461 } | |
| 462 buildCounterActivities--; | |
| 463 } | |
| 464 | |
| 465 buildUnnamed3051() { | |
| 466 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 467 o.add(buildCreativeGroupAssignment()); | |
| 468 o.add(buildCreativeGroupAssignment()); | |
| 469 return o; | |
| 470 } | |
| 471 | |
| 472 checkUnnamed3051(core.List<api.CreativeGroupAssignment> o) { | |
| 473 unittest.expect(o, unittest.hasLength(2)); | |
| 474 checkCreativeGroupAssignment(o[0]); | |
| 475 checkCreativeGroupAssignment(o[1]); | |
| 476 } | |
| 477 | |
| 478 buildUnnamed3052() { | |
| 479 var o = new core.List<api.EventTagOverride>(); | |
| 480 o.add(buildEventTagOverride()); | |
| 481 o.add(buildEventTagOverride()); | |
| 482 return o; | |
| 483 } | |
| 484 | |
| 485 checkUnnamed3052(core.List<api.EventTagOverride> o) { | |
| 486 unittest.expect(o, unittest.hasLength(2)); | |
| 487 checkEventTagOverride(o[0]); | |
| 488 checkEventTagOverride(o[1]); | |
| 489 } | |
| 490 | |
| 491 buildUnnamed3053() { | |
| 492 var o = new core.List<api.PlacementAssignment>(); | |
| 493 o.add(buildPlacementAssignment()); | |
| 494 o.add(buildPlacementAssignment()); | |
| 495 return o; | |
| 496 } | |
| 497 | |
| 498 checkUnnamed3053(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 = buildUnnamed3051(); | |
| 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 = buildUnnamed3052(); | |
| 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 = buildUnnamed3053(); | |
| 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 checkUnnamed3051(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 checkUnnamed3052(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 checkUnnamed3053(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 buildUnnamed3054() { | |
| 629 var o = new core.List<api.Ad>(); | |
| 630 o.add(buildAd()); | |
| 631 o.add(buildAd()); | |
| 632 return o; | |
| 633 } | |
| 634 | |
| 635 checkUnnamed3054(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 = buildUnnamed3054(); | |
| 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 checkUnnamed3054(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 buildUnnamed3055() { | |
| 737 var o = new core.List<api.AdvertiserGroup>(); | |
| 738 o.add(buildAdvertiserGroup()); | |
| 739 o.add(buildAdvertiserGroup()); | |
| 740 return o; | |
| 741 } | |
| 742 | |
| 743 checkUnnamed3055(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 = buildUnnamed3055(); | |
| 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 checkUnnamed3055(o.advertiserGroups); | |
| 766 unittest.expect(o.kind, unittest.equals('foo')); | |
| 767 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 768 } | |
| 769 buildCounterAdvertiserGroupsListResponse--; | |
| 770 } | |
| 771 | |
| 772 buildUnnamed3056() { | |
| 773 var o = new core.List<api.Advertiser>(); | |
| 774 o.add(buildAdvertiser()); | |
| 775 o.add(buildAdvertiser()); | |
| 776 return o; | |
| 777 } | |
| 778 | |
| 779 checkUnnamed3056(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 = buildUnnamed3056(); | |
| 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 checkUnnamed3056(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 buildUnnamed3057() { | |
| 832 var o = new core.List<api.AudienceSegment>(); | |
| 833 o.add(buildAudienceSegment()); | |
| 834 o.add(buildAudienceSegment()); | |
| 835 return o; | |
| 836 } | |
| 837 | |
| 838 checkUnnamed3057(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 = buildUnnamed3057(); | |
| 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 checkUnnamed3057(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 buildUnnamed3058() { | |
| 897 var o = new core.List<api.Browser>(); | |
| 898 o.add(buildBrowser()); | |
| 899 o.add(buildBrowser()); | |
| 900 return o; | |
| 901 } | |
| 902 | |
| 903 checkUnnamed3058(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 = buildUnnamed3058(); | |
| 915 o.kind = "foo"; | |
| 916 } | |
| 917 buildCounterBrowsersListResponse--; | |
| 918 return o; | |
| 919 } | |
| 920 | |
| 921 checkBrowsersListResponse(api.BrowsersListResponse o) { | |
| 922 buildCounterBrowsersListResponse++; | |
| 923 if (buildCounterBrowsersListResponse < 3) { | |
| 924 checkUnnamed3058(o.browsers); | |
| 925 unittest.expect(o.kind, unittest.equals('foo')); | |
| 926 } | |
| 927 buildCounterBrowsersListResponse--; | |
| 928 } | |
| 929 | |
| 930 buildUnnamed3059() { | |
| 931 var o = new core.List<api.CreativeOptimizationConfiguration>(); | |
| 932 o.add(buildCreativeOptimizationConfiguration()); | |
| 933 o.add(buildCreativeOptimizationConfiguration()); | |
| 934 return o; | |
| 935 } | |
| 936 | |
| 937 checkUnnamed3059(core.List<api.CreativeOptimizationConfiguration> o) { | |
| 938 unittest.expect(o, unittest.hasLength(2)); | |
| 939 checkCreativeOptimizationConfiguration(o[0]); | |
| 940 checkCreativeOptimizationConfiguration(o[1]); | |
| 941 } | |
| 942 | |
| 943 buildUnnamed3060() { | |
| 944 var o = new core.List<api.AudienceSegmentGroup>(); | |
| 945 o.add(buildAudienceSegmentGroup()); | |
| 946 o.add(buildAudienceSegmentGroup()); | |
| 947 return o; | |
| 948 } | |
| 949 | |
| 950 checkUnnamed3060(core.List<api.AudienceSegmentGroup> o) { | |
| 951 unittest.expect(o, unittest.hasLength(2)); | |
| 952 checkAudienceSegmentGroup(o[0]); | |
| 953 checkAudienceSegmentGroup(o[1]); | |
| 954 } | |
| 955 | |
| 956 buildUnnamed3061() { | |
| 957 var o = new core.List<core.String>(); | |
| 958 o.add("foo"); | |
| 959 o.add("foo"); | |
| 960 return o; | |
| 961 } | |
| 962 | |
| 963 checkUnnamed3061(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 buildUnnamed3062() { | |
| 970 var o = new core.List<api.EventTagOverride>(); | |
| 971 o.add(buildEventTagOverride()); | |
| 972 o.add(buildEventTagOverride()); | |
| 973 return o; | |
| 974 } | |
| 975 | |
| 976 checkUnnamed3062(core.List<api.EventTagOverride> o) { | |
| 977 unittest.expect(o, unittest.hasLength(2)); | |
| 978 checkEventTagOverride(o[0]); | |
| 979 checkEventTagOverride(o[1]); | |
| 980 } | |
| 981 | |
| 982 buildUnnamed3063() { | |
| 983 var o = new core.List<core.String>(); | |
| 984 o.add("foo"); | |
| 985 o.add("foo"); | |
| 986 return o; | |
| 987 } | |
| 988 | |
| 989 checkUnnamed3063(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 = buildUnnamed3059(); | |
| 1002 o.advertiserGroupId = "foo"; | |
| 1003 o.advertiserId = "foo"; | |
| 1004 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 1005 o.archived = true; | |
| 1006 o.audienceSegmentGroups = buildUnnamed3060(); | |
| 1007 o.billingInvoiceCode = "foo"; | |
| 1008 o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); | |
| 1009 o.comment = "foo"; | |
| 1010 o.comscoreVceEnabled = true; | |
| 1011 o.createInfo = buildLastModifiedInfo(); | |
| 1012 o.creativeGroupIds = buildUnnamed3061(); | |
| 1013 o.creativeOptimizationConfiguration = buildCreativeOptimizationConfiguration
(); | |
| 1014 o.defaultClickThroughEventTagProperties = buildDefaultClickThroughEventTagPr
operties(); | |
| 1015 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 1016 o.eventTagOverrides = buildUnnamed3062(); | |
| 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 = buildUnnamed3063(); | |
| 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 checkUnnamed3059(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 checkUnnamed3060(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 checkUnnamed3061(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 checkUnnamed3062(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 checkUnnamed3063(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 buildUnnamed3064() { | |
| 1090 var o = new core.List<api.CampaignCreativeAssociation>(); | |
| 1091 o.add(buildCampaignCreativeAssociation()); | |
| 1092 o.add(buildCampaignCreativeAssociation()); | |
| 1093 return o; | |
| 1094 } | |
| 1095 | |
| 1096 checkUnnamed3064(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 = buildUnnamed3064(); | |
| 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 checkUnnamed3064(o.campaignCreativeAssociations); | |
| 1119 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1120 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1121 } | |
| 1122 buildCounterCampaignCreativeAssociationsListResponse--; | |
| 1123 } | |
| 1124 | |
| 1125 buildUnnamed3065() { | |
| 1126 var o = new core.List<api.Campaign>(); | |
| 1127 o.add(buildCampaign()); | |
| 1128 o.add(buildCampaign()); | |
| 1129 return o; | |
| 1130 } | |
| 1131 | |
| 1132 checkUnnamed3065(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 = buildUnnamed3065(); | |
| 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 checkUnnamed3065(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 buildUnnamed3066() { | |
| 1207 var o = new core.List<api.ChangeLog>(); | |
| 1208 o.add(buildChangeLog()); | |
| 1209 o.add(buildChangeLog()); | |
| 1210 return o; | |
| 1211 } | |
| 1212 | |
| 1213 checkUnnamed3066(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 = buildUnnamed3066(); | |
| 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 checkUnnamed3066(o.changeLogs); | |
| 1236 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1237 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1238 } | |
| 1239 buildCounterChangeLogsListResponse--; | |
| 1240 } | |
| 1241 | |
| 1242 buildUnnamed3067() { | |
| 1243 var o = new core.List<api.City>(); | |
| 1244 o.add(buildCity()); | |
| 1245 o.add(buildCity()); | |
| 1246 return o; | |
| 1247 } | |
| 1248 | |
| 1249 checkUnnamed3067(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 = buildUnnamed3067(); | |
| 1261 o.kind = "foo"; | |
| 1262 } | |
| 1263 buildCounterCitiesListResponse--; | |
| 1264 return o; | |
| 1265 } | |
| 1266 | |
| 1267 checkCitiesListResponse(api.CitiesListResponse o) { | |
| 1268 buildCounterCitiesListResponse++; | |
| 1269 if (buildCounterCitiesListResponse < 3) { | |
| 1270 checkUnnamed3067(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 buildUnnamed3068() { | |
| 1454 var o = new core.List<api.ConnectionType>(); | |
| 1455 o.add(buildConnectionType()); | |
| 1456 o.add(buildConnectionType()); | |
| 1457 return o; | |
| 1458 } | |
| 1459 | |
| 1460 checkUnnamed3068(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 = buildUnnamed3068(); | |
| 1472 o.kind = "foo"; | |
| 1473 } | |
| 1474 buildCounterConnectionTypesListResponse--; | |
| 1475 return o; | |
| 1476 } | |
| 1477 | |
| 1478 checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { | |
| 1479 buildCounterConnectionTypesListResponse++; | |
| 1480 if (buildCounterConnectionTypesListResponse < 3) { | |
| 1481 checkUnnamed3068(o.connectionTypes); | |
| 1482 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1483 } | |
| 1484 buildCounterConnectionTypesListResponse--; | |
| 1485 } | |
| 1486 | |
| 1487 buildUnnamed3069() { | |
| 1488 var o = new core.List<api.ContentCategory>(); | |
| 1489 o.add(buildContentCategory()); | |
| 1490 o.add(buildContentCategory()); | |
| 1491 return o; | |
| 1492 } | |
| 1493 | |
| 1494 checkUnnamed3069(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 = buildUnnamed3069(); | |
| 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 checkUnnamed3069(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 buildUnnamed3070() { | |
| 1549 var o = new core.List<api.Country>(); | |
| 1550 o.add(buildCountry()); | |
| 1551 o.add(buildCountry()); | |
| 1552 return o; | |
| 1553 } | |
| 1554 | |
| 1555 checkUnnamed3070(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 = buildUnnamed3070(); | |
| 1567 o.kind = "foo"; | |
| 1568 } | |
| 1569 buildCounterCountriesListResponse--; | |
| 1570 return o; | |
| 1571 } | |
| 1572 | |
| 1573 checkCountriesListResponse(api.CountriesListResponse o) { | |
| 1574 buildCounterCountriesListResponse++; | |
| 1575 if (buildCounterCountriesListResponse < 3) { | |
| 1576 checkUnnamed3070(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 buildUnnamed3071() { | |
| 1610 var o = new core.List<core.String>(); | |
| 1611 o.add("foo"); | |
| 1612 o.add("foo"); | |
| 1613 return o; | |
| 1614 } | |
| 1615 | |
| 1616 checkUnnamed3071(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 buildUnnamed3072() { | |
| 1623 var o = new core.List<core.String>(); | |
| 1624 o.add("foo"); | |
| 1625 o.add("foo"); | |
| 1626 return o; | |
| 1627 } | |
| 1628 | |
| 1629 checkUnnamed3072(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 buildUnnamed3073() { | |
| 1636 var o = new core.List<api.ClickTag>(); | |
| 1637 o.add(buildClickTag()); | |
| 1638 o.add(buildClickTag()); | |
| 1639 return o; | |
| 1640 } | |
| 1641 | |
| 1642 checkUnnamed3073(core.List<api.ClickTag> o) { | |
| 1643 unittest.expect(o, unittest.hasLength(2)); | |
| 1644 checkClickTag(o[0]); | |
| 1645 checkClickTag(o[1]); | |
| 1646 } | |
| 1647 | |
| 1648 buildUnnamed3074() { | |
| 1649 var o = new core.List<core.String>(); | |
| 1650 o.add("foo"); | |
| 1651 o.add("foo"); | |
| 1652 return o; | |
| 1653 } | |
| 1654 | |
| 1655 checkUnnamed3074(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 buildUnnamed3075() { | |
| 1662 var o = new core.List<core.String>(); | |
| 1663 o.add("foo"); | |
| 1664 o.add("foo"); | |
| 1665 return o; | |
| 1666 } | |
| 1667 | |
| 1668 checkUnnamed3075(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 buildUnnamed3076() { | |
| 1675 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1676 o.add(buildCreativeCustomEvent()); | |
| 1677 o.add(buildCreativeCustomEvent()); | |
| 1678 return o; | |
| 1679 } | |
| 1680 | |
| 1681 checkUnnamed3076(core.List<api.CreativeCustomEvent> o) { | |
| 1682 unittest.expect(o, unittest.hasLength(2)); | |
| 1683 checkCreativeCustomEvent(o[0]); | |
| 1684 checkCreativeCustomEvent(o[1]); | |
| 1685 } | |
| 1686 | |
| 1687 buildUnnamed3077() { | |
| 1688 var o = new core.List<api.CreativeAsset>(); | |
| 1689 o.add(buildCreativeAsset()); | |
| 1690 o.add(buildCreativeAsset()); | |
| 1691 return o; | |
| 1692 } | |
| 1693 | |
| 1694 checkUnnamed3077(core.List<api.CreativeAsset> o) { | |
| 1695 unittest.expect(o, unittest.hasLength(2)); | |
| 1696 checkCreativeAsset(o[0]); | |
| 1697 checkCreativeAsset(o[1]); | |
| 1698 } | |
| 1699 | |
| 1700 buildUnnamed3078() { | |
| 1701 var o = new core.List<api.CreativeFieldAssignment>(); | |
| 1702 o.add(buildCreativeFieldAssignment()); | |
| 1703 o.add(buildCreativeFieldAssignment()); | |
| 1704 return o; | |
| 1705 } | |
| 1706 | |
| 1707 checkUnnamed3078(core.List<api.CreativeFieldAssignment> o) { | |
| 1708 unittest.expect(o, unittest.hasLength(2)); | |
| 1709 checkCreativeFieldAssignment(o[0]); | |
| 1710 checkCreativeFieldAssignment(o[1]); | |
| 1711 } | |
| 1712 | |
| 1713 buildUnnamed3079() { | |
| 1714 var o = new core.List<core.String>(); | |
| 1715 o.add("foo"); | |
| 1716 o.add("foo"); | |
| 1717 return o; | |
| 1718 } | |
| 1719 | |
| 1720 checkUnnamed3079(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 buildUnnamed3080() { | |
| 1727 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1728 o.add(buildCreativeCustomEvent()); | |
| 1729 o.add(buildCreativeCustomEvent()); | |
| 1730 return o; | |
| 1731 } | |
| 1732 | |
| 1733 checkUnnamed3080(core.List<api.CreativeCustomEvent> o) { | |
| 1734 unittest.expect(o, unittest.hasLength(2)); | |
| 1735 checkCreativeCustomEvent(o[0]); | |
| 1736 checkCreativeCustomEvent(o[1]); | |
| 1737 } | |
| 1738 | |
| 1739 buildUnnamed3081() { | |
| 1740 var o = new core.List<api.ThirdPartyTrackingUrl>(); | |
| 1741 o.add(buildThirdPartyTrackingUrl()); | |
| 1742 o.add(buildThirdPartyTrackingUrl()); | |
| 1743 return o; | |
| 1744 } | |
| 1745 | |
| 1746 checkUnnamed3081(core.List<api.ThirdPartyTrackingUrl> o) { | |
| 1747 unittest.expect(o, unittest.hasLength(2)); | |
| 1748 checkThirdPartyTrackingUrl(o[0]); | |
| 1749 checkThirdPartyTrackingUrl(o[1]); | |
| 1750 } | |
| 1751 | |
| 1752 buildUnnamed3082() { | |
| 1753 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1754 o.add(buildCreativeCustomEvent()); | |
| 1755 o.add(buildCreativeCustomEvent()); | |
| 1756 return o; | |
| 1757 } | |
| 1758 | |
| 1759 checkUnnamed3082(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 = buildUnnamed3071(); | |
| 1774 o.advertiserId = "foo"; | |
| 1775 o.allowScriptAccess = true; | |
| 1776 o.archived = true; | |
| 1777 o.artworkType = "foo"; | |
| 1778 o.authoringTool = "foo"; | |
| 1779 o.autoAdvanceImages = true; | |
| 1780 o.backgroundColor = "foo"; | |
| 1781 o.backupImageClickThroughUrl = "foo"; | |
| 1782 o.backupImageFeatures = buildUnnamed3072(); | |
| 1783 o.backupImageReportingLabel = "foo"; | |
| 1784 o.backupImageTargetWindow = buildTargetWindow(); | |
| 1785 o.clickTags = buildUnnamed3073(); | |
| 1786 o.commercialId = "foo"; | |
| 1787 o.companionCreatives = buildUnnamed3074(); | |
| 1788 o.compatibility = buildUnnamed3075(); | |
| 1789 o.convertFlashToHtml5 = true; | |
| 1790 o.counterCustomEvents = buildUnnamed3076(); | |
| 1791 o.creativeAssets = buildUnnamed3077(); | |
| 1792 o.creativeFieldAssignments = buildUnnamed3078(); | |
| 1793 o.customKeyValues = buildUnnamed3079(); | |
| 1794 o.exitCustomEvents = buildUnnamed3080(); | |
| 1795 o.fsCommand = buildFsCommand(); | |
| 1796 o.htmlCode = "foo"; | |
| 1797 o.htmlCodeLocked = true; | |
| 1798 o.id = "foo"; | |
| 1799 o.idDimensionValue = buildDimensionValue(); | |
| 1800 o.kind = "foo"; | |
| 1801 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 1802 o.latestTraffickedCreativeId = "foo"; | |
| 1803 o.name = "foo"; | |
| 1804 o.overrideCss = "foo"; | |
| 1805 o.redirectUrl = "foo"; | |
| 1806 o.renderingId = "foo"; | |
| 1807 o.renderingIdDimensionValue = buildDimensionValue(); | |
| 1808 o.requiredFlashPluginVersion = "foo"; | |
| 1809 o.requiredFlashVersion = 42; | |
| 1810 o.size = buildSize(); | |
| 1811 o.skippable = true; | |
| 1812 o.sslCompliant = true; | |
| 1813 o.sslOverride = true; | |
| 1814 o.studioAdvertiserId = "foo"; | |
| 1815 o.studioCreativeId = "foo"; | |
| 1816 o.studioTraffickedCreativeId = "foo"; | |
| 1817 o.subaccountId = "foo"; | |
| 1818 o.thirdPartyBackupImageImpressionsUrl = "foo"; | |
| 1819 o.thirdPartyRichMediaImpressionsUrl = "foo"; | |
| 1820 o.thirdPartyUrls = buildUnnamed3081(); | |
| 1821 o.timerCustomEvents = buildUnnamed3082(); | |
| 1822 o.totalFileSize = "foo"; | |
| 1823 o.type = "foo"; | |
| 1824 o.version = 42; | |
| 1825 o.videoDescription = "foo"; | |
| 1826 o.videoDuration = 42.0; | |
| 1827 } | |
| 1828 buildCounterCreative--; | |
| 1829 return o; | |
| 1830 } | |
| 1831 | |
| 1832 checkCreative(api.Creative o) { | |
| 1833 buildCounterCreative++; | |
| 1834 if (buildCounterCreative < 3) { | |
| 1835 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1836 unittest.expect(o.active, unittest.isTrue); | |
| 1837 unittest.expect(o.adParameters, unittest.equals('foo')); | |
| 1838 checkUnnamed3071(o.adTagKeys); | |
| 1839 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 1840 unittest.expect(o.allowScriptAccess, unittest.isTrue); | |
| 1841 unittest.expect(o.archived, unittest.isTrue); | |
| 1842 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1843 unittest.expect(o.authoringTool, unittest.equals('foo')); | |
| 1844 unittest.expect(o.autoAdvanceImages, unittest.isTrue); | |
| 1845 unittest.expect(o.backgroundColor, unittest.equals('foo')); | |
| 1846 unittest.expect(o.backupImageClickThroughUrl, unittest.equals('foo')); | |
| 1847 checkUnnamed3072(o.backupImageFeatures); | |
| 1848 unittest.expect(o.backupImageReportingLabel, unittest.equals('foo')); | |
| 1849 checkTargetWindow(o.backupImageTargetWindow); | |
| 1850 checkUnnamed3073(o.clickTags); | |
| 1851 unittest.expect(o.commercialId, unittest.equals('foo')); | |
| 1852 checkUnnamed3074(o.companionCreatives); | |
| 1853 checkUnnamed3075(o.compatibility); | |
| 1854 unittest.expect(o.convertFlashToHtml5, unittest.isTrue); | |
| 1855 checkUnnamed3076(o.counterCustomEvents); | |
| 1856 checkUnnamed3077(o.creativeAssets); | |
| 1857 checkUnnamed3078(o.creativeFieldAssignments); | |
| 1858 checkUnnamed3079(o.customKeyValues); | |
| 1859 checkUnnamed3080(o.exitCustomEvents); | |
| 1860 checkFsCommand(o.fsCommand); | |
| 1861 unittest.expect(o.htmlCode, unittest.equals('foo')); | |
| 1862 unittest.expect(o.htmlCodeLocked, unittest.isTrue); | |
| 1863 unittest.expect(o.id, unittest.equals('foo')); | |
| 1864 checkDimensionValue(o.idDimensionValue); | |
| 1865 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1866 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 1867 unittest.expect(o.latestTraffickedCreativeId, unittest.equals('foo')); | |
| 1868 unittest.expect(o.name, unittest.equals('foo')); | |
| 1869 unittest.expect(o.overrideCss, unittest.equals('foo')); | |
| 1870 unittest.expect(o.redirectUrl, unittest.equals('foo')); | |
| 1871 unittest.expect(o.renderingId, unittest.equals('foo')); | |
| 1872 checkDimensionValue(o.renderingIdDimensionValue); | |
| 1873 unittest.expect(o.requiredFlashPluginVersion, unittest.equals('foo')); | |
| 1874 unittest.expect(o.requiredFlashVersion, unittest.equals(42)); | |
| 1875 checkSize(o.size); | |
| 1876 unittest.expect(o.skippable, unittest.isTrue); | |
| 1877 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1878 unittest.expect(o.sslOverride, unittest.isTrue); | |
| 1879 unittest.expect(o.studioAdvertiserId, unittest.equals('foo')); | |
| 1880 unittest.expect(o.studioCreativeId, unittest.equals('foo')); | |
| 1881 unittest.expect(o.studioTraffickedCreativeId, unittest.equals('foo')); | |
| 1882 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 1883 unittest.expect(o.thirdPartyBackupImageImpressionsUrl, unittest.equals('foo'
)); | |
| 1884 unittest.expect(o.thirdPartyRichMediaImpressionsUrl, unittest.equals('foo'))
; | |
| 1885 checkUnnamed3081(o.thirdPartyUrls); | |
| 1886 checkUnnamed3082(o.timerCustomEvents); | |
| 1887 unittest.expect(o.totalFileSize, unittest.equals('foo')); | |
| 1888 unittest.expect(o.type, unittest.equals('foo')); | |
| 1889 unittest.expect(o.version, unittest.equals(42)); | |
| 1890 unittest.expect(o.videoDescription, unittest.equals('foo')); | |
| 1891 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 1892 } | |
| 1893 buildCounterCreative--; | |
| 1894 } | |
| 1895 | |
| 1896 buildUnnamed3083() { | |
| 1897 var o = new core.List<core.String>(); | |
| 1898 o.add("foo"); | |
| 1899 o.add("foo"); | |
| 1900 return o; | |
| 1901 } | |
| 1902 | |
| 1903 checkUnnamed3083(core.List<core.String> o) { | |
| 1904 unittest.expect(o, unittest.hasLength(2)); | |
| 1905 unittest.expect(o[0], unittest.equals('foo')); | |
| 1906 unittest.expect(o[1], unittest.equals('foo')); | |
| 1907 } | |
| 1908 | |
| 1909 core.int buildCounterCreativeAsset = 0; | |
| 1910 buildCreativeAsset() { | |
| 1911 var o = new api.CreativeAsset(); | |
| 1912 buildCounterCreativeAsset++; | |
| 1913 if (buildCounterCreativeAsset < 3) { | |
| 1914 o.actionScript3 = true; | |
| 1915 o.active = true; | |
| 1916 o.alignment = "foo"; | |
| 1917 o.artworkType = "foo"; | |
| 1918 o.assetIdentifier = buildCreativeAssetId(); | |
| 1919 o.backupImageExit = buildCreativeCustomEvent(); | |
| 1920 o.bitRate = 42; | |
| 1921 o.childAssetType = "foo"; | |
| 1922 o.collapsedSize = buildSize(); | |
| 1923 o.customStartTimeValue = 42; | |
| 1924 o.detectedFeatures = buildUnnamed3083(); | |
| 1925 o.displayType = "foo"; | |
| 1926 o.duration = 42; | |
| 1927 o.durationType = "foo"; | |
| 1928 o.expandedDimension = buildSize(); | |
| 1929 o.fileSize = "foo"; | |
| 1930 o.flashVersion = 42; | |
| 1931 o.hideFlashObjects = true; | |
| 1932 o.hideSelectionBoxes = true; | |
| 1933 o.horizontallyLocked = true; | |
| 1934 o.id = "foo"; | |
| 1935 o.mimeType = "foo"; | |
| 1936 o.offset = buildOffsetPosition(); | |
| 1937 o.originalBackup = true; | |
| 1938 o.position = buildOffsetPosition(); | |
| 1939 o.positionLeftUnit = "foo"; | |
| 1940 o.positionTopUnit = "foo"; | |
| 1941 o.progressiveServingUrl = "foo"; | |
| 1942 o.pushdown = true; | |
| 1943 o.pushdownDuration = 42.0; | |
| 1944 o.role = "foo"; | |
| 1945 o.size = buildSize(); | |
| 1946 o.sslCompliant = true; | |
| 1947 o.startTimeType = "foo"; | |
| 1948 o.streamingServingUrl = "foo"; | |
| 1949 o.transparency = true; | |
| 1950 o.verticallyLocked = true; | |
| 1951 o.videoDuration = 42.0; | |
| 1952 o.windowMode = "foo"; | |
| 1953 o.zIndex = 42; | |
| 1954 o.zipFilename = "foo"; | |
| 1955 o.zipFilesize = "foo"; | |
| 1956 } | |
| 1957 buildCounterCreativeAsset--; | |
| 1958 return o; | |
| 1959 } | |
| 1960 | |
| 1961 checkCreativeAsset(api.CreativeAsset o) { | |
| 1962 buildCounterCreativeAsset++; | |
| 1963 if (buildCounterCreativeAsset < 3) { | |
| 1964 unittest.expect(o.actionScript3, unittest.isTrue); | |
| 1965 unittest.expect(o.active, unittest.isTrue); | |
| 1966 unittest.expect(o.alignment, unittest.equals('foo')); | |
| 1967 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1968 checkCreativeAssetId(o.assetIdentifier); | |
| 1969 checkCreativeCustomEvent(o.backupImageExit); | |
| 1970 unittest.expect(o.bitRate, unittest.equals(42)); | |
| 1971 unittest.expect(o.childAssetType, unittest.equals('foo')); | |
| 1972 checkSize(o.collapsedSize); | |
| 1973 unittest.expect(o.customStartTimeValue, unittest.equals(42)); | |
| 1974 checkUnnamed3083(o.detectedFeatures); | |
| 1975 unittest.expect(o.displayType, unittest.equals('foo')); | |
| 1976 unittest.expect(o.duration, unittest.equals(42)); | |
| 1977 unittest.expect(o.durationType, unittest.equals('foo')); | |
| 1978 checkSize(o.expandedDimension); | |
| 1979 unittest.expect(o.fileSize, unittest.equals('foo')); | |
| 1980 unittest.expect(o.flashVersion, unittest.equals(42)); | |
| 1981 unittest.expect(o.hideFlashObjects, unittest.isTrue); | |
| 1982 unittest.expect(o.hideSelectionBoxes, unittest.isTrue); | |
| 1983 unittest.expect(o.horizontallyLocked, unittest.isTrue); | |
| 1984 unittest.expect(o.id, unittest.equals('foo')); | |
| 1985 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 1986 checkOffsetPosition(o.offset); | |
| 1987 unittest.expect(o.originalBackup, unittest.isTrue); | |
| 1988 checkOffsetPosition(o.position); | |
| 1989 unittest.expect(o.positionLeftUnit, unittest.equals('foo')); | |
| 1990 unittest.expect(o.positionTopUnit, unittest.equals('foo')); | |
| 1991 unittest.expect(o.progressiveServingUrl, unittest.equals('foo')); | |
| 1992 unittest.expect(o.pushdown, unittest.isTrue); | |
| 1993 unittest.expect(o.pushdownDuration, unittest.equals(42.0)); | |
| 1994 unittest.expect(o.role, unittest.equals('foo')); | |
| 1995 checkSize(o.size); | |
| 1996 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1997 unittest.expect(o.startTimeType, unittest.equals('foo')); | |
| 1998 unittest.expect(o.streamingServingUrl, unittest.equals('foo')); | |
| 1999 unittest.expect(o.transparency, unittest.isTrue); | |
| 2000 unittest.expect(o.verticallyLocked, unittest.isTrue); | |
| 2001 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 2002 unittest.expect(o.windowMode, unittest.equals('foo')); | |
| 2003 unittest.expect(o.zIndex, unittest.equals(42)); | |
| 2004 unittest.expect(o.zipFilename, unittest.equals('foo')); | |
| 2005 unittest.expect(o.zipFilesize, unittest.equals('foo')); | |
| 2006 } | |
| 2007 buildCounterCreativeAsset--; | |
| 2008 } | |
| 2009 | |
| 2010 core.int buildCounterCreativeAssetId = 0; | |
| 2011 buildCreativeAssetId() { | |
| 2012 var o = new api.CreativeAssetId(); | |
| 2013 buildCounterCreativeAssetId++; | |
| 2014 if (buildCounterCreativeAssetId < 3) { | |
| 2015 o.name = "foo"; | |
| 2016 o.type = "foo"; | |
| 2017 } | |
| 2018 buildCounterCreativeAssetId--; | |
| 2019 return o; | |
| 2020 } | |
| 2021 | |
| 2022 checkCreativeAssetId(api.CreativeAssetId o) { | |
| 2023 buildCounterCreativeAssetId++; | |
| 2024 if (buildCounterCreativeAssetId < 3) { | |
| 2025 unittest.expect(o.name, unittest.equals('foo')); | |
| 2026 unittest.expect(o.type, unittest.equals('foo')); | |
| 2027 } | |
| 2028 buildCounterCreativeAssetId--; | |
| 2029 } | |
| 2030 | |
| 2031 buildUnnamed3084() { | |
| 2032 var o = new core.List<api.ClickTag>(); | |
| 2033 o.add(buildClickTag()); | |
| 2034 o.add(buildClickTag()); | |
| 2035 return o; | |
| 2036 } | |
| 2037 | |
| 2038 checkUnnamed3084(core.List<api.ClickTag> o) { | |
| 2039 unittest.expect(o, unittest.hasLength(2)); | |
| 2040 checkClickTag(o[0]); | |
| 2041 checkClickTag(o[1]); | |
| 2042 } | |
| 2043 | |
| 2044 buildUnnamed3085() { | |
| 2045 var o = new core.List<core.String>(); | |
| 2046 o.add("foo"); | |
| 2047 o.add("foo"); | |
| 2048 return o; | |
| 2049 } | |
| 2050 | |
| 2051 checkUnnamed3085(core.List<core.String> o) { | |
| 2052 unittest.expect(o, unittest.hasLength(2)); | |
| 2053 unittest.expect(o[0], unittest.equals('foo')); | |
| 2054 unittest.expect(o[1], unittest.equals('foo')); | |
| 2055 } | |
| 2056 | |
| 2057 buildUnnamed3086() { | |
| 2058 var o = new core.List<core.String>(); | |
| 2059 o.add("foo"); | |
| 2060 o.add("foo"); | |
| 2061 return o; | |
| 2062 } | |
| 2063 | |
| 2064 checkUnnamed3086(core.List<core.String> o) { | |
| 2065 unittest.expect(o, unittest.hasLength(2)); | |
| 2066 unittest.expect(o[0], unittest.equals('foo')); | |
| 2067 unittest.expect(o[1], unittest.equals('foo')); | |
| 2068 } | |
| 2069 | |
| 2070 core.int buildCounterCreativeAssetMetadata = 0; | |
| 2071 buildCreativeAssetMetadata() { | |
| 2072 var o = new api.CreativeAssetMetadata(); | |
| 2073 buildCounterCreativeAssetMetadata++; | |
| 2074 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2075 o.assetIdentifier = buildCreativeAssetId(); | |
| 2076 o.clickTags = buildUnnamed3084(); | |
| 2077 o.detectedFeatures = buildUnnamed3085(); | |
| 2078 o.kind = "foo"; | |
| 2079 o.warnedValidationRules = buildUnnamed3086(); | |
| 2080 } | |
| 2081 buildCounterCreativeAssetMetadata--; | |
| 2082 return o; | |
| 2083 } | |
| 2084 | |
| 2085 checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { | |
| 2086 buildCounterCreativeAssetMetadata++; | |
| 2087 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2088 checkCreativeAssetId(o.assetIdentifier); | |
| 2089 checkUnnamed3084(o.clickTags); | |
| 2090 checkUnnamed3085(o.detectedFeatures); | |
| 2091 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2092 checkUnnamed3086(o.warnedValidationRules); | |
| 2093 } | |
| 2094 buildCounterCreativeAssetMetadata--; | |
| 2095 } | |
| 2096 | |
| 2097 buildUnnamed3087() { | |
| 2098 var o = new core.List<api.CompanionClickThroughOverride>(); | |
| 2099 o.add(buildCompanionClickThroughOverride()); | |
| 2100 o.add(buildCompanionClickThroughOverride()); | |
| 2101 return o; | |
| 2102 } | |
| 2103 | |
| 2104 checkUnnamed3087(core.List<api.CompanionClickThroughOverride> o) { | |
| 2105 unittest.expect(o, unittest.hasLength(2)); | |
| 2106 checkCompanionClickThroughOverride(o[0]); | |
| 2107 checkCompanionClickThroughOverride(o[1]); | |
| 2108 } | |
| 2109 | |
| 2110 buildUnnamed3088() { | |
| 2111 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 2112 o.add(buildCreativeGroupAssignment()); | |
| 2113 o.add(buildCreativeGroupAssignment()); | |
| 2114 return o; | |
| 2115 } | |
| 2116 | |
| 2117 checkUnnamed3088(core.List<api.CreativeGroupAssignment> o) { | |
| 2118 unittest.expect(o, unittest.hasLength(2)); | |
| 2119 checkCreativeGroupAssignment(o[0]); | |
| 2120 checkCreativeGroupAssignment(o[1]); | |
| 2121 } | |
| 2122 | |
| 2123 buildUnnamed3089() { | |
| 2124 var o = new core.List<api.RichMediaExitOverride>(); | |
| 2125 o.add(buildRichMediaExitOverride()); | |
| 2126 o.add(buildRichMediaExitOverride()); | |
| 2127 return o; | |
| 2128 } | |
| 2129 | |
| 2130 checkUnnamed3089(core.List<api.RichMediaExitOverride> o) { | |
| 2131 unittest.expect(o, unittest.hasLength(2)); | |
| 2132 checkRichMediaExitOverride(o[0]); | |
| 2133 checkRichMediaExitOverride(o[1]); | |
| 2134 } | |
| 2135 | |
| 2136 core.int buildCounterCreativeAssignment = 0; | |
| 2137 buildCreativeAssignment() { | |
| 2138 var o = new api.CreativeAssignment(); | |
| 2139 buildCounterCreativeAssignment++; | |
| 2140 if (buildCounterCreativeAssignment < 3) { | |
| 2141 o.active = true; | |
| 2142 o.applyEventTags = true; | |
| 2143 o.clickThroughUrl = buildClickThroughUrl(); | |
| 2144 o.companionCreativeOverrides = buildUnnamed3087(); | |
| 2145 o.creativeGroupAssignments = buildUnnamed3088(); | |
| 2146 o.creativeId = "foo"; | |
| 2147 o.creativeIdDimensionValue = buildDimensionValue(); | |
| 2148 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2149 o.richMediaExitOverrides = buildUnnamed3089(); | |
| 2150 o.sequence = 42; | |
| 2151 o.sslCompliant = true; | |
| 2152 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2153 o.weight = 42; | |
| 2154 } | |
| 2155 buildCounterCreativeAssignment--; | |
| 2156 return o; | |
| 2157 } | |
| 2158 | |
| 2159 checkCreativeAssignment(api.CreativeAssignment o) { | |
| 2160 buildCounterCreativeAssignment++; | |
| 2161 if (buildCounterCreativeAssignment < 3) { | |
| 2162 unittest.expect(o.active, unittest.isTrue); | |
| 2163 unittest.expect(o.applyEventTags, unittest.isTrue); | |
| 2164 checkClickThroughUrl(o.clickThroughUrl); | |
| 2165 checkUnnamed3087(o.companionCreativeOverrides); | |
| 2166 checkUnnamed3088(o.creativeGroupAssignments); | |
| 2167 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 2168 checkDimensionValue(o.creativeIdDimensionValue); | |
| 2169 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | |
| 2170 checkUnnamed3089(o.richMediaExitOverrides); | |
| 2171 unittest.expect(o.sequence, unittest.equals(42)); | |
| 2172 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2173 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | |
| 2174 unittest.expect(o.weight, unittest.equals(42)); | |
| 2175 } | |
| 2176 buildCounterCreativeAssignment--; | |
| 2177 } | |
| 2178 | |
| 2179 core.int buildCounterCreativeCustomEvent = 0; | |
| 2180 buildCreativeCustomEvent() { | |
| 2181 var o = new api.CreativeCustomEvent(); | |
| 2182 buildCounterCreativeCustomEvent++; | |
| 2183 if (buildCounterCreativeCustomEvent < 3) { | |
| 2184 o.advertiserCustomEventName = "foo"; | |
| 2185 o.advertiserCustomEventType = "foo"; | |
| 2186 o.artworkLabel = "foo"; | |
| 2187 o.artworkType = "foo"; | |
| 2188 o.exitUrl = "foo"; | |
| 2189 o.id = "foo"; | |
| 2190 o.popupWindowProperties = buildPopupWindowProperties(); | |
| 2191 o.targetType = "foo"; | |
| 2192 o.videoReportingId = "foo"; | |
| 2193 } | |
| 2194 buildCounterCreativeCustomEvent--; | |
| 2195 return o; | |
| 2196 } | |
| 2197 | |
| 2198 checkCreativeCustomEvent(api.CreativeCustomEvent o) { | |
| 2199 buildCounterCreativeCustomEvent++; | |
| 2200 if (buildCounterCreativeCustomEvent < 3) { | |
| 2201 unittest.expect(o.advertiserCustomEventName, unittest.equals('foo')); | |
| 2202 unittest.expect(o.advertiserCustomEventType, unittest.equals('foo')); | |
| 2203 unittest.expect(o.artworkLabel, unittest.equals('foo')); | |
| 2204 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2205 unittest.expect(o.exitUrl, unittest.equals('foo')); | |
| 2206 unittest.expect(o.id, unittest.equals('foo')); | |
| 2207 checkPopupWindowProperties(o.popupWindowProperties); | |
| 2208 unittest.expect(o.targetType, unittest.equals('foo')); | |
| 2209 unittest.expect(o.videoReportingId, unittest.equals('foo')); | |
| 2210 } | |
| 2211 buildCounterCreativeCustomEvent--; | |
| 2212 } | |
| 2213 | |
| 2214 core.int buildCounterCreativeField = 0; | |
| 2215 buildCreativeField() { | |
| 2216 var o = new api.CreativeField(); | |
| 2217 buildCounterCreativeField++; | |
| 2218 if (buildCounterCreativeField < 3) { | |
| 2219 o.accountId = "foo"; | |
| 2220 o.advertiserId = "foo"; | |
| 2221 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2222 o.id = "foo"; | |
| 2223 o.kind = "foo"; | |
| 2224 o.name = "foo"; | |
| 2225 o.subaccountId = "foo"; | |
| 2226 } | |
| 2227 buildCounterCreativeField--; | |
| 2228 return o; | |
| 2229 } | |
| 2230 | |
| 2231 checkCreativeField(api.CreativeField o) { | |
| 2232 buildCounterCreativeField++; | |
| 2233 if (buildCounterCreativeField < 3) { | |
| 2234 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2235 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2236 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2237 unittest.expect(o.id, unittest.equals('foo')); | |
| 2238 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2239 unittest.expect(o.name, unittest.equals('foo')); | |
| 2240 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2241 } | |
| 2242 buildCounterCreativeField--; | |
| 2243 } | |
| 2244 | |
| 2245 core.int buildCounterCreativeFieldAssignment = 0; | |
| 2246 buildCreativeFieldAssignment() { | |
| 2247 var o = new api.CreativeFieldAssignment(); | |
| 2248 buildCounterCreativeFieldAssignment++; | |
| 2249 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2250 o.creativeFieldId = "foo"; | |
| 2251 o.creativeFieldValueId = "foo"; | |
| 2252 } | |
| 2253 buildCounterCreativeFieldAssignment--; | |
| 2254 return o; | |
| 2255 } | |
| 2256 | |
| 2257 checkCreativeFieldAssignment(api.CreativeFieldAssignment o) { | |
| 2258 buildCounterCreativeFieldAssignment++; | |
| 2259 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2260 unittest.expect(o.creativeFieldId, unittest.equals('foo')); | |
| 2261 unittest.expect(o.creativeFieldValueId, unittest.equals('foo')); | |
| 2262 } | |
| 2263 buildCounterCreativeFieldAssignment--; | |
| 2264 } | |
| 2265 | |
| 2266 core.int buildCounterCreativeFieldValue = 0; | |
| 2267 buildCreativeFieldValue() { | |
| 2268 var o = new api.CreativeFieldValue(); | |
| 2269 buildCounterCreativeFieldValue++; | |
| 2270 if (buildCounterCreativeFieldValue < 3) { | |
| 2271 o.id = "foo"; | |
| 2272 o.kind = "foo"; | |
| 2273 o.value = "foo"; | |
| 2274 } | |
| 2275 buildCounterCreativeFieldValue--; | |
| 2276 return o; | |
| 2277 } | |
| 2278 | |
| 2279 checkCreativeFieldValue(api.CreativeFieldValue o) { | |
| 2280 buildCounterCreativeFieldValue++; | |
| 2281 if (buildCounterCreativeFieldValue < 3) { | |
| 2282 unittest.expect(o.id, unittest.equals('foo')); | |
| 2283 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2284 unittest.expect(o.value, unittest.equals('foo')); | |
| 2285 } | |
| 2286 buildCounterCreativeFieldValue--; | |
| 2287 } | |
| 2288 | |
| 2289 buildUnnamed3090() { | |
| 2290 var o = new core.List<api.CreativeFieldValue>(); | |
| 2291 o.add(buildCreativeFieldValue()); | |
| 2292 o.add(buildCreativeFieldValue()); | |
| 2293 return o; | |
| 2294 } | |
| 2295 | |
| 2296 checkUnnamed3090(core.List<api.CreativeFieldValue> o) { | |
| 2297 unittest.expect(o, unittest.hasLength(2)); | |
| 2298 checkCreativeFieldValue(o[0]); | |
| 2299 checkCreativeFieldValue(o[1]); | |
| 2300 } | |
| 2301 | |
| 2302 core.int buildCounterCreativeFieldValuesListResponse = 0; | |
| 2303 buildCreativeFieldValuesListResponse() { | |
| 2304 var o = new api.CreativeFieldValuesListResponse(); | |
| 2305 buildCounterCreativeFieldValuesListResponse++; | |
| 2306 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2307 o.creativeFieldValues = buildUnnamed3090(); | |
| 2308 o.kind = "foo"; | |
| 2309 o.nextPageToken = "foo"; | |
| 2310 } | |
| 2311 buildCounterCreativeFieldValuesListResponse--; | |
| 2312 return o; | |
| 2313 } | |
| 2314 | |
| 2315 checkCreativeFieldValuesListResponse(api.CreativeFieldValuesListResponse o) { | |
| 2316 buildCounterCreativeFieldValuesListResponse++; | |
| 2317 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2318 checkUnnamed3090(o.creativeFieldValues); | |
| 2319 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2320 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2321 } | |
| 2322 buildCounterCreativeFieldValuesListResponse--; | |
| 2323 } | |
| 2324 | |
| 2325 buildUnnamed3091() { | |
| 2326 var o = new core.List<api.CreativeField>(); | |
| 2327 o.add(buildCreativeField()); | |
| 2328 o.add(buildCreativeField()); | |
| 2329 return o; | |
| 2330 } | |
| 2331 | |
| 2332 checkUnnamed3091(core.List<api.CreativeField> o) { | |
| 2333 unittest.expect(o, unittest.hasLength(2)); | |
| 2334 checkCreativeField(o[0]); | |
| 2335 checkCreativeField(o[1]); | |
| 2336 } | |
| 2337 | |
| 2338 core.int buildCounterCreativeFieldsListResponse = 0; | |
| 2339 buildCreativeFieldsListResponse() { | |
| 2340 var o = new api.CreativeFieldsListResponse(); | |
| 2341 buildCounterCreativeFieldsListResponse++; | |
| 2342 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2343 o.creativeFields = buildUnnamed3091(); | |
| 2344 o.kind = "foo"; | |
| 2345 o.nextPageToken = "foo"; | |
| 2346 } | |
| 2347 buildCounterCreativeFieldsListResponse--; | |
| 2348 return o; | |
| 2349 } | |
| 2350 | |
| 2351 checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { | |
| 2352 buildCounterCreativeFieldsListResponse++; | |
| 2353 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2354 checkUnnamed3091(o.creativeFields); | |
| 2355 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2356 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2357 } | |
| 2358 buildCounterCreativeFieldsListResponse--; | |
| 2359 } | |
| 2360 | |
| 2361 core.int buildCounterCreativeGroup = 0; | |
| 2362 buildCreativeGroup() { | |
| 2363 var o = new api.CreativeGroup(); | |
| 2364 buildCounterCreativeGroup++; | |
| 2365 if (buildCounterCreativeGroup < 3) { | |
| 2366 o.accountId = "foo"; | |
| 2367 o.advertiserId = "foo"; | |
| 2368 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2369 o.groupNumber = 42; | |
| 2370 o.id = "foo"; | |
| 2371 o.kind = "foo"; | |
| 2372 o.name = "foo"; | |
| 2373 o.subaccountId = "foo"; | |
| 2374 } | |
| 2375 buildCounterCreativeGroup--; | |
| 2376 return o; | |
| 2377 } | |
| 2378 | |
| 2379 checkCreativeGroup(api.CreativeGroup o) { | |
| 2380 buildCounterCreativeGroup++; | |
| 2381 if (buildCounterCreativeGroup < 3) { | |
| 2382 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2383 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2384 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2385 unittest.expect(o.groupNumber, unittest.equals(42)); | |
| 2386 unittest.expect(o.id, unittest.equals('foo')); | |
| 2387 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2388 unittest.expect(o.name, unittest.equals('foo')); | |
| 2389 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2390 } | |
| 2391 buildCounterCreativeGroup--; | |
| 2392 } | |
| 2393 | |
| 2394 core.int buildCounterCreativeGroupAssignment = 0; | |
| 2395 buildCreativeGroupAssignment() { | |
| 2396 var o = new api.CreativeGroupAssignment(); | |
| 2397 buildCounterCreativeGroupAssignment++; | |
| 2398 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2399 o.creativeGroupId = "foo"; | |
| 2400 o.creativeGroupNumber = "foo"; | |
| 2401 } | |
| 2402 buildCounterCreativeGroupAssignment--; | |
| 2403 return o; | |
| 2404 } | |
| 2405 | |
| 2406 checkCreativeGroupAssignment(api.CreativeGroupAssignment o) { | |
| 2407 buildCounterCreativeGroupAssignment++; | |
| 2408 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2409 unittest.expect(o.creativeGroupId, unittest.equals('foo')); | |
| 2410 unittest.expect(o.creativeGroupNumber, unittest.equals('foo')); | |
| 2411 } | |
| 2412 buildCounterCreativeGroupAssignment--; | |
| 2413 } | |
| 2414 | |
| 2415 buildUnnamed3092() { | |
| 2416 var o = new core.List<api.CreativeGroup>(); | |
| 2417 o.add(buildCreativeGroup()); | |
| 2418 o.add(buildCreativeGroup()); | |
| 2419 return o; | |
| 2420 } | |
| 2421 | |
| 2422 checkUnnamed3092(core.List<api.CreativeGroup> o) { | |
| 2423 unittest.expect(o, unittest.hasLength(2)); | |
| 2424 checkCreativeGroup(o[0]); | |
| 2425 checkCreativeGroup(o[1]); | |
| 2426 } | |
| 2427 | |
| 2428 core.int buildCounterCreativeGroupsListResponse = 0; | |
| 2429 buildCreativeGroupsListResponse() { | |
| 2430 var o = new api.CreativeGroupsListResponse(); | |
| 2431 buildCounterCreativeGroupsListResponse++; | |
| 2432 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2433 o.creativeGroups = buildUnnamed3092(); | |
| 2434 o.kind = "foo"; | |
| 2435 o.nextPageToken = "foo"; | |
| 2436 } | |
| 2437 buildCounterCreativeGroupsListResponse--; | |
| 2438 return o; | |
| 2439 } | |
| 2440 | |
| 2441 checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { | |
| 2442 buildCounterCreativeGroupsListResponse++; | |
| 2443 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2444 checkUnnamed3092(o.creativeGroups); | |
| 2445 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2446 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2447 } | |
| 2448 buildCounterCreativeGroupsListResponse--; | |
| 2449 } | |
| 2450 | |
| 2451 buildUnnamed3093() { | |
| 2452 var o = new core.List<api.OptimizationActivity>(); | |
| 2453 o.add(buildOptimizationActivity()); | |
| 2454 o.add(buildOptimizationActivity()); | |
| 2455 return o; | |
| 2456 } | |
| 2457 | |
| 2458 checkUnnamed3093(core.List<api.OptimizationActivity> o) { | |
| 2459 unittest.expect(o, unittest.hasLength(2)); | |
| 2460 checkOptimizationActivity(o[0]); | |
| 2461 checkOptimizationActivity(o[1]); | |
| 2462 } | |
| 2463 | |
| 2464 core.int buildCounterCreativeOptimizationConfiguration = 0; | |
| 2465 buildCreativeOptimizationConfiguration() { | |
| 2466 var o = new api.CreativeOptimizationConfiguration(); | |
| 2467 buildCounterCreativeOptimizationConfiguration++; | |
| 2468 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2469 o.id = "foo"; | |
| 2470 o.name = "foo"; | |
| 2471 o.optimizationActivitys = buildUnnamed3093(); | |
| 2472 o.optimizationModel = "foo"; | |
| 2473 } | |
| 2474 buildCounterCreativeOptimizationConfiguration--; | |
| 2475 return o; | |
| 2476 } | |
| 2477 | |
| 2478 checkCreativeOptimizationConfiguration(api.CreativeOptimizationConfiguration o)
{ | |
| 2479 buildCounterCreativeOptimizationConfiguration++; | |
| 2480 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2481 unittest.expect(o.id, unittest.equals('foo')); | |
| 2482 unittest.expect(o.name, unittest.equals('foo')); | |
| 2483 checkUnnamed3093(o.optimizationActivitys); | |
| 2484 unittest.expect(o.optimizationModel, unittest.equals('foo')); | |
| 2485 } | |
| 2486 buildCounterCreativeOptimizationConfiguration--; | |
| 2487 } | |
| 2488 | |
| 2489 buildUnnamed3094() { | |
| 2490 var o = new core.List<api.CreativeAssignment>(); | |
| 2491 o.add(buildCreativeAssignment()); | |
| 2492 o.add(buildCreativeAssignment()); | |
| 2493 return o; | |
| 2494 } | |
| 2495 | |
| 2496 checkUnnamed3094(core.List<api.CreativeAssignment> o) { | |
| 2497 unittest.expect(o, unittest.hasLength(2)); | |
| 2498 checkCreativeAssignment(o[0]); | |
| 2499 checkCreativeAssignment(o[1]); | |
| 2500 } | |
| 2501 | |
| 2502 core.int buildCounterCreativeRotation = 0; | |
| 2503 buildCreativeRotation() { | |
| 2504 var o = new api.CreativeRotation(); | |
| 2505 buildCounterCreativeRotation++; | |
| 2506 if (buildCounterCreativeRotation < 3) { | |
| 2507 o.creativeAssignments = buildUnnamed3094(); | |
| 2508 o.creativeOptimizationConfigurationId = "foo"; | |
| 2509 o.type = "foo"; | |
| 2510 o.weightCalculationStrategy = "foo"; | |
| 2511 } | |
| 2512 buildCounterCreativeRotation--; | |
| 2513 return o; | |
| 2514 } | |
| 2515 | |
| 2516 checkCreativeRotation(api.CreativeRotation o) { | |
| 2517 buildCounterCreativeRotation++; | |
| 2518 if (buildCounterCreativeRotation < 3) { | |
| 2519 checkUnnamed3094(o.creativeAssignments); | |
| 2520 unittest.expect(o.creativeOptimizationConfigurationId, unittest.equals('foo'
)); | |
| 2521 unittest.expect(o.type, unittest.equals('foo')); | |
| 2522 unittest.expect(o.weightCalculationStrategy, unittest.equals('foo')); | |
| 2523 } | |
| 2524 buildCounterCreativeRotation--; | |
| 2525 } | |
| 2526 | |
| 2527 core.int buildCounterCreativeSettings = 0; | |
| 2528 buildCreativeSettings() { | |
| 2529 var o = new api.CreativeSettings(); | |
| 2530 buildCounterCreativeSettings++; | |
| 2531 if (buildCounterCreativeSettings < 3) { | |
| 2532 o.iFrameFooter = "foo"; | |
| 2533 o.iFrameHeader = "foo"; | |
| 2534 } | |
| 2535 buildCounterCreativeSettings--; | |
| 2536 return o; | |
| 2537 } | |
| 2538 | |
| 2539 checkCreativeSettings(api.CreativeSettings o) { | |
| 2540 buildCounterCreativeSettings++; | |
| 2541 if (buildCounterCreativeSettings < 3) { | |
| 2542 unittest.expect(o.iFrameFooter, unittest.equals('foo')); | |
| 2543 unittest.expect(o.iFrameHeader, unittest.equals('foo')); | |
| 2544 } | |
| 2545 buildCounterCreativeSettings--; | |
| 2546 } | |
| 2547 | |
| 2548 buildUnnamed3095() { | |
| 2549 var o = new core.List<api.Creative>(); | |
| 2550 o.add(buildCreative()); | |
| 2551 o.add(buildCreative()); | |
| 2552 return o; | |
| 2553 } | |
| 2554 | |
| 2555 checkUnnamed3095(core.List<api.Creative> o) { | |
| 2556 unittest.expect(o, unittest.hasLength(2)); | |
| 2557 checkCreative(o[0]); | |
| 2558 checkCreative(o[1]); | |
| 2559 } | |
| 2560 | |
| 2561 core.int buildCounterCreativesListResponse = 0; | |
| 2562 buildCreativesListResponse() { | |
| 2563 var o = new api.CreativesListResponse(); | |
| 2564 buildCounterCreativesListResponse++; | |
| 2565 if (buildCounterCreativesListResponse < 3) { | |
| 2566 o.creatives = buildUnnamed3095(); | |
| 2567 o.kind = "foo"; | |
| 2568 o.nextPageToken = "foo"; | |
| 2569 } | |
| 2570 buildCounterCreativesListResponse--; | |
| 2571 return o; | |
| 2572 } | |
| 2573 | |
| 2574 checkCreativesListResponse(api.CreativesListResponse o) { | |
| 2575 buildCounterCreativesListResponse++; | |
| 2576 if (buildCounterCreativesListResponse < 3) { | |
| 2577 checkUnnamed3095(o.creatives); | |
| 2578 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2579 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2580 } | |
| 2581 buildCounterCreativesListResponse--; | |
| 2582 } | |
| 2583 | |
| 2584 buildUnnamed3096() { | |
| 2585 var o = new core.List<api.Dimension>(); | |
| 2586 o.add(buildDimension()); | |
| 2587 o.add(buildDimension()); | |
| 2588 return o; | |
| 2589 } | |
| 2590 | |
| 2591 checkUnnamed3096(core.List<api.Dimension> o) { | |
| 2592 unittest.expect(o, unittest.hasLength(2)); | |
| 2593 checkDimension(o[0]); | |
| 2594 checkDimension(o[1]); | |
| 2595 } | |
| 2596 | |
| 2597 buildUnnamed3097() { | |
| 2598 var o = new core.List<api.Dimension>(); | |
| 2599 o.add(buildDimension()); | |
| 2600 o.add(buildDimension()); | |
| 2601 return o; | |
| 2602 } | |
| 2603 | |
| 2604 checkUnnamed3097(core.List<api.Dimension> o) { | |
| 2605 unittest.expect(o, unittest.hasLength(2)); | |
| 2606 checkDimension(o[0]); | |
| 2607 checkDimension(o[1]); | |
| 2608 } | |
| 2609 | |
| 2610 buildUnnamed3098() { | |
| 2611 var o = new core.List<api.Metric>(); | |
| 2612 o.add(buildMetric()); | |
| 2613 o.add(buildMetric()); | |
| 2614 return o; | |
| 2615 } | |
| 2616 | |
| 2617 checkUnnamed3098(core.List<api.Metric> o) { | |
| 2618 unittest.expect(o, unittest.hasLength(2)); | |
| 2619 checkMetric(o[0]); | |
| 2620 checkMetric(o[1]); | |
| 2621 } | |
| 2622 | |
| 2623 buildUnnamed3099() { | |
| 2624 var o = new core.List<api.Metric>(); | |
| 2625 o.add(buildMetric()); | |
| 2626 o.add(buildMetric()); | |
| 2627 return o; | |
| 2628 } | |
| 2629 | |
| 2630 checkUnnamed3099(core.List<api.Metric> o) { | |
| 2631 unittest.expect(o, unittest.hasLength(2)); | |
| 2632 checkMetric(o[0]); | |
| 2633 checkMetric(o[1]); | |
| 2634 } | |
| 2635 | |
| 2636 core.int buildCounterCrossDimensionReachReportCompatibleFields = 0; | |
| 2637 buildCrossDimensionReachReportCompatibleFields() { | |
| 2638 var o = new api.CrossDimensionReachReportCompatibleFields(); | |
| 2639 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2640 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2641 o.breakdown = buildUnnamed3096(); | |
| 2642 o.dimensionFilters = buildUnnamed3097(); | |
| 2643 o.kind = "foo"; | |
| 2644 o.metrics = buildUnnamed3098(); | |
| 2645 o.overlapMetrics = buildUnnamed3099(); | |
| 2646 } | |
| 2647 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2648 return o; | |
| 2649 } | |
| 2650 | |
| 2651 checkCrossDimensionReachReportCompatibleFields(api.CrossDimensionReachReportComp
atibleFields o) { | |
| 2652 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2653 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2654 checkUnnamed3096(o.breakdown); | |
| 2655 checkUnnamed3097(o.dimensionFilters); | |
| 2656 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2657 checkUnnamed3098(o.metrics); | |
| 2658 checkUnnamed3099(o.overlapMetrics); | |
| 2659 } | |
| 2660 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2661 } | |
| 2662 | |
| 2663 buildUnnamed3100() { | |
| 2664 var o = new core.List<api.DimensionValue>(); | |
| 2665 o.add(buildDimensionValue()); | |
| 2666 o.add(buildDimensionValue()); | |
| 2667 return o; | |
| 2668 } | |
| 2669 | |
| 2670 checkUnnamed3100(core.List<api.DimensionValue> o) { | |
| 2671 unittest.expect(o, unittest.hasLength(2)); | |
| 2672 checkDimensionValue(o[0]); | |
| 2673 checkDimensionValue(o[1]); | |
| 2674 } | |
| 2675 | |
| 2676 core.int buildCounterCustomRichMediaEvents = 0; | |
| 2677 buildCustomRichMediaEvents() { | |
| 2678 var o = new api.CustomRichMediaEvents(); | |
| 2679 buildCounterCustomRichMediaEvents++; | |
| 2680 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2681 o.filteredEventIds = buildUnnamed3100(); | |
| 2682 o.kind = "foo"; | |
| 2683 } | |
| 2684 buildCounterCustomRichMediaEvents--; | |
| 2685 return o; | |
| 2686 } | |
| 2687 | |
| 2688 checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { | |
| 2689 buildCounterCustomRichMediaEvents++; | |
| 2690 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2691 checkUnnamed3100(o.filteredEventIds); | |
| 2692 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2693 } | |
| 2694 buildCounterCustomRichMediaEvents--; | |
| 2695 } | |
| 2696 | |
| 2697 core.int buildCounterDateRange = 0; | |
| 2698 buildDateRange() { | |
| 2699 var o = new api.DateRange(); | |
| 2700 buildCounterDateRange++; | |
| 2701 if (buildCounterDateRange < 3) { | |
| 2702 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2703 o.kind = "foo"; | |
| 2704 o.relativeDateRange = "foo"; | |
| 2705 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2706 } | |
| 2707 buildCounterDateRange--; | |
| 2708 return o; | |
| 2709 } | |
| 2710 | |
| 2711 checkDateRange(api.DateRange o) { | |
| 2712 buildCounterDateRange++; | |
| 2713 if (buildCounterDateRange < 3) { | |
| 2714 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2715 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2716 unittest.expect(o.relativeDateRange, unittest.equals('foo')); | |
| 2717 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2718 } | |
| 2719 buildCounterDateRange--; | |
| 2720 } | |
| 2721 | |
| 2722 buildUnnamed3101() { | |
| 2723 var o = new core.List<core.String>(); | |
| 2724 o.add("foo"); | |
| 2725 o.add("foo"); | |
| 2726 return o; | |
| 2727 } | |
| 2728 | |
| 2729 checkUnnamed3101(core.List<core.String> o) { | |
| 2730 unittest.expect(o, unittest.hasLength(2)); | |
| 2731 unittest.expect(o[0], unittest.equals('foo')); | |
| 2732 unittest.expect(o[1], unittest.equals('foo')); | |
| 2733 } | |
| 2734 | |
| 2735 buildUnnamed3102() { | |
| 2736 var o = new core.List<core.int>(); | |
| 2737 o.add(42); | |
| 2738 o.add(42); | |
| 2739 return o; | |
| 2740 } | |
| 2741 | |
| 2742 checkUnnamed3102(core.List<core.int> o) { | |
| 2743 unittest.expect(o, unittest.hasLength(2)); | |
| 2744 unittest.expect(o[0], unittest.equals(42)); | |
| 2745 unittest.expect(o[1], unittest.equals(42)); | |
| 2746 } | |
| 2747 | |
| 2748 core.int buildCounterDayPartTargeting = 0; | |
| 2749 buildDayPartTargeting() { | |
| 2750 var o = new api.DayPartTargeting(); | |
| 2751 buildCounterDayPartTargeting++; | |
| 2752 if (buildCounterDayPartTargeting < 3) { | |
| 2753 o.daysOfWeek = buildUnnamed3101(); | |
| 2754 o.hoursOfDay = buildUnnamed3102(); | |
| 2755 o.userLocalTime = true; | |
| 2756 } | |
| 2757 buildCounterDayPartTargeting--; | |
| 2758 return o; | |
| 2759 } | |
| 2760 | |
| 2761 checkDayPartTargeting(api.DayPartTargeting o) { | |
| 2762 buildCounterDayPartTargeting++; | |
| 2763 if (buildCounterDayPartTargeting < 3) { | |
| 2764 checkUnnamed3101(o.daysOfWeek); | |
| 2765 checkUnnamed3102(o.hoursOfDay); | |
| 2766 unittest.expect(o.userLocalTime, unittest.isTrue); | |
| 2767 } | |
| 2768 buildCounterDayPartTargeting--; | |
| 2769 } | |
| 2770 | |
| 2771 core.int buildCounterDefaultClickThroughEventTagProperties = 0; | |
| 2772 buildDefaultClickThroughEventTagProperties() { | |
| 2773 var o = new api.DefaultClickThroughEventTagProperties(); | |
| 2774 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2775 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2776 o.defaultClickThroughEventTagId = "foo"; | |
| 2777 o.overrideInheritedEventTag = true; | |
| 2778 } | |
| 2779 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2780 return o; | |
| 2781 } | |
| 2782 | |
| 2783 checkDefaultClickThroughEventTagProperties(api.DefaultClickThroughEventTagProper
ties o) { | |
| 2784 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2785 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2786 unittest.expect(o.defaultClickThroughEventTagId, unittest.equals('foo')); | |
| 2787 unittest.expect(o.overrideInheritedEventTag, unittest.isTrue); | |
| 2788 } | |
| 2789 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2790 } | |
| 2791 | |
| 2792 core.int buildCounterDeliverySchedule = 0; | |
| 2793 buildDeliverySchedule() { | |
| 2794 var o = new api.DeliverySchedule(); | |
| 2795 buildCounterDeliverySchedule++; | |
| 2796 if (buildCounterDeliverySchedule < 3) { | |
| 2797 o.frequencyCap = buildFrequencyCap(); | |
| 2798 o.hardCutoff = true; | |
| 2799 o.impressionRatio = "foo"; | |
| 2800 o.priority = "foo"; | |
| 2801 } | |
| 2802 buildCounterDeliverySchedule--; | |
| 2803 return o; | |
| 2804 } | |
| 2805 | |
| 2806 checkDeliverySchedule(api.DeliverySchedule o) { | |
| 2807 buildCounterDeliverySchedule++; | |
| 2808 if (buildCounterDeliverySchedule < 3) { | |
| 2809 checkFrequencyCap(o.frequencyCap); | |
| 2810 unittest.expect(o.hardCutoff, unittest.isTrue); | |
| 2811 unittest.expect(o.impressionRatio, unittest.equals('foo')); | |
| 2812 unittest.expect(o.priority, unittest.equals('foo')); | |
| 2813 } | |
| 2814 buildCounterDeliverySchedule--; | |
| 2815 } | |
| 2816 | |
| 2817 core.int buildCounterDfpSettings = 0; | |
| 2818 buildDfpSettings() { | |
| 2819 var o = new api.DfpSettings(); | |
| 2820 buildCounterDfpSettings++; | |
| 2821 if (buildCounterDfpSettings < 3) { | |
| 2822 o.dfpNetworkCode = "foo"; | |
| 2823 o.dfpNetworkName = "foo"; | |
| 2824 o.programmaticPlacementAccepted = true; | |
| 2825 o.pubPaidPlacementAccepted = true; | |
| 2826 o.publisherPortalOnly = true; | |
| 2827 } | |
| 2828 buildCounterDfpSettings--; | |
| 2829 return o; | |
| 2830 } | |
| 2831 | |
| 2832 checkDfpSettings(api.DfpSettings o) { | |
| 2833 buildCounterDfpSettings++; | |
| 2834 if (buildCounterDfpSettings < 3) { | |
| 2835 unittest.expect(o.dfpNetworkCode, unittest.equals('foo')); | |
| 2836 unittest.expect(o.dfpNetworkName, unittest.equals('foo')); | |
| 2837 unittest.expect(o.programmaticPlacementAccepted, unittest.isTrue); | |
| 2838 unittest.expect(o.pubPaidPlacementAccepted, unittest.isTrue); | |
| 2839 unittest.expect(o.publisherPortalOnly, unittest.isTrue); | |
| 2840 } | |
| 2841 buildCounterDfpSettings--; | |
| 2842 } | |
| 2843 | |
| 2844 core.int buildCounterDimension = 0; | |
| 2845 buildDimension() { | |
| 2846 var o = new api.Dimension(); | |
| 2847 buildCounterDimension++; | |
| 2848 if (buildCounterDimension < 3) { | |
| 2849 o.kind = "foo"; | |
| 2850 o.name = "foo"; | |
| 2851 } | |
| 2852 buildCounterDimension--; | |
| 2853 return o; | |
| 2854 } | |
| 2855 | |
| 2856 checkDimension(api.Dimension o) { | |
| 2857 buildCounterDimension++; | |
| 2858 if (buildCounterDimension < 3) { | |
| 2859 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2860 unittest.expect(o.name, unittest.equals('foo')); | |
| 2861 } | |
| 2862 buildCounterDimension--; | |
| 2863 } | |
| 2864 | |
| 2865 core.int buildCounterDimensionFilter = 0; | |
| 2866 buildDimensionFilter() { | |
| 2867 var o = new api.DimensionFilter(); | |
| 2868 buildCounterDimensionFilter++; | |
| 2869 if (buildCounterDimensionFilter < 3) { | |
| 2870 o.dimensionName = "foo"; | |
| 2871 o.kind = "foo"; | |
| 2872 o.value = "foo"; | |
| 2873 } | |
| 2874 buildCounterDimensionFilter--; | |
| 2875 return o; | |
| 2876 } | |
| 2877 | |
| 2878 checkDimensionFilter(api.DimensionFilter o) { | |
| 2879 buildCounterDimensionFilter++; | |
| 2880 if (buildCounterDimensionFilter < 3) { | |
| 2881 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2882 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2883 unittest.expect(o.value, unittest.equals('foo')); | |
| 2884 } | |
| 2885 buildCounterDimensionFilter--; | |
| 2886 } | |
| 2887 | |
| 2888 core.int buildCounterDimensionValue = 0; | |
| 2889 buildDimensionValue() { | |
| 2890 var o = new api.DimensionValue(); | |
| 2891 buildCounterDimensionValue++; | |
| 2892 if (buildCounterDimensionValue < 3) { | |
| 2893 o.dimensionName = "foo"; | |
| 2894 o.etag = "foo"; | |
| 2895 o.id = "foo"; | |
| 2896 o.kind = "foo"; | |
| 2897 o.matchType = "foo"; | |
| 2898 o.value = "foo"; | |
| 2899 } | |
| 2900 buildCounterDimensionValue--; | |
| 2901 return o; | |
| 2902 } | |
| 2903 | |
| 2904 checkDimensionValue(api.DimensionValue o) { | |
| 2905 buildCounterDimensionValue++; | |
| 2906 if (buildCounterDimensionValue < 3) { | |
| 2907 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2908 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2909 unittest.expect(o.id, unittest.equals('foo')); | |
| 2910 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2911 unittest.expect(o.matchType, unittest.equals('foo')); | |
| 2912 unittest.expect(o.value, unittest.equals('foo')); | |
| 2913 } | |
| 2914 buildCounterDimensionValue--; | |
| 2915 } | |
| 2916 | |
| 2917 buildUnnamed3103() { | |
| 2918 var o = new core.List<api.DimensionValue>(); | |
| 2919 o.add(buildDimensionValue()); | |
| 2920 o.add(buildDimensionValue()); | |
| 2921 return o; | |
| 2922 } | |
| 2923 | |
| 2924 checkUnnamed3103(core.List<api.DimensionValue> o) { | |
| 2925 unittest.expect(o, unittest.hasLength(2)); | |
| 2926 checkDimensionValue(o[0]); | |
| 2927 checkDimensionValue(o[1]); | |
| 2928 } | |
| 2929 | |
| 2930 core.int buildCounterDimensionValueList = 0; | |
| 2931 buildDimensionValueList() { | |
| 2932 var o = new api.DimensionValueList(); | |
| 2933 buildCounterDimensionValueList++; | |
| 2934 if (buildCounterDimensionValueList < 3) { | |
| 2935 o.etag = "foo"; | |
| 2936 o.items = buildUnnamed3103(); | |
| 2937 o.kind = "foo"; | |
| 2938 o.nextPageToken = "foo"; | |
| 2939 } | |
| 2940 buildCounterDimensionValueList--; | |
| 2941 return o; | |
| 2942 } | |
| 2943 | |
| 2944 checkDimensionValueList(api.DimensionValueList o) { | |
| 2945 buildCounterDimensionValueList++; | |
| 2946 if (buildCounterDimensionValueList < 3) { | |
| 2947 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2948 checkUnnamed3103(o.items); | |
| 2949 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2950 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2951 } | |
| 2952 buildCounterDimensionValueList--; | |
| 2953 } | |
| 2954 | |
| 2955 buildUnnamed3104() { | |
| 2956 var o = new core.List<api.DimensionFilter>(); | |
| 2957 o.add(buildDimensionFilter()); | |
| 2958 o.add(buildDimensionFilter()); | |
| 2959 return o; | |
| 2960 } | |
| 2961 | |
| 2962 checkUnnamed3104(core.List<api.DimensionFilter> o) { | |
| 2963 unittest.expect(o, unittest.hasLength(2)); | |
| 2964 checkDimensionFilter(o[0]); | |
| 2965 checkDimensionFilter(o[1]); | |
| 2966 } | |
| 2967 | |
| 2968 core.int buildCounterDimensionValueRequest = 0; | |
| 2969 buildDimensionValueRequest() { | |
| 2970 var o = new api.DimensionValueRequest(); | |
| 2971 buildCounterDimensionValueRequest++; | |
| 2972 if (buildCounterDimensionValueRequest < 3) { | |
| 2973 o.dimensionName = "foo"; | |
| 2974 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2975 o.filters = buildUnnamed3104(); | |
| 2976 o.kind = "foo"; | |
| 2977 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2978 } | |
| 2979 buildCounterDimensionValueRequest--; | |
| 2980 return o; | |
| 2981 } | |
| 2982 | |
| 2983 checkDimensionValueRequest(api.DimensionValueRequest o) { | |
| 2984 buildCounterDimensionValueRequest++; | |
| 2985 if (buildCounterDimensionValueRequest < 3) { | |
| 2986 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2987 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2988 checkUnnamed3104(o.filters); | |
| 2989 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2990 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2991 } | |
| 2992 buildCounterDimensionValueRequest--; | |
| 2993 } | |
| 2994 | |
| 2995 buildUnnamed3105() { | |
| 2996 var o = new core.List<api.DirectorySiteContactAssignment>(); | |
| 2997 o.add(buildDirectorySiteContactAssignment()); | |
| 2998 o.add(buildDirectorySiteContactAssignment()); | |
| 2999 return o; | |
| 3000 } | |
| 3001 | |
| 3002 checkUnnamed3105(core.List<api.DirectorySiteContactAssignment> o) { | |
| 3003 unittest.expect(o, unittest.hasLength(2)); | |
| 3004 checkDirectorySiteContactAssignment(o[0]); | |
| 3005 checkDirectorySiteContactAssignment(o[1]); | |
| 3006 } | |
| 3007 | |
| 3008 buildUnnamed3106() { | |
| 3009 var o = new core.List<core.String>(); | |
| 3010 o.add("foo"); | |
| 3011 o.add("foo"); | |
| 3012 return o; | |
| 3013 } | |
| 3014 | |
| 3015 checkUnnamed3106(core.List<core.String> o) { | |
| 3016 unittest.expect(o, unittest.hasLength(2)); | |
| 3017 unittest.expect(o[0], unittest.equals('foo')); | |
| 3018 unittest.expect(o[1], unittest.equals('foo')); | |
| 3019 } | |
| 3020 | |
| 3021 buildUnnamed3107() { | |
| 3022 var o = new core.List<core.String>(); | |
| 3023 o.add("foo"); | |
| 3024 o.add("foo"); | |
| 3025 return o; | |
| 3026 } | |
| 3027 | |
| 3028 checkUnnamed3107(core.List<core.String> o) { | |
| 3029 unittest.expect(o, unittest.hasLength(2)); | |
| 3030 unittest.expect(o[0], unittest.equals('foo')); | |
| 3031 unittest.expect(o[1], unittest.equals('foo')); | |
| 3032 } | |
| 3033 | |
| 3034 core.int buildCounterDirectorySite = 0; | |
| 3035 buildDirectorySite() { | |
| 3036 var o = new api.DirectorySite(); | |
| 3037 buildCounterDirectorySite++; | |
| 3038 if (buildCounterDirectorySite < 3) { | |
| 3039 o.active = true; | |
| 3040 o.contactAssignments = buildUnnamed3105(); | |
| 3041 o.countryId = "foo"; | |
| 3042 o.currencyId = "foo"; | |
| 3043 o.description = "foo"; | |
| 3044 o.id = "foo"; | |
| 3045 o.idDimensionValue = buildDimensionValue(); | |
| 3046 o.inpageTagFormats = buildUnnamed3106(); | |
| 3047 o.interstitialTagFormats = buildUnnamed3107(); | |
| 3048 o.kind = "foo"; | |
| 3049 o.name = "foo"; | |
| 3050 o.parentId = "foo"; | |
| 3051 o.settings = buildDirectorySiteSettings(); | |
| 3052 o.url = "foo"; | |
| 3053 } | |
| 3054 buildCounterDirectorySite--; | |
| 3055 return o; | |
| 3056 } | |
| 3057 | |
| 3058 checkDirectorySite(api.DirectorySite o) { | |
| 3059 buildCounterDirectorySite++; | |
| 3060 if (buildCounterDirectorySite < 3) { | |
| 3061 unittest.expect(o.active, unittest.isTrue); | |
| 3062 checkUnnamed3105(o.contactAssignments); | |
| 3063 unittest.expect(o.countryId, unittest.equals('foo')); | |
| 3064 unittest.expect(o.currencyId, unittest.equals('foo')); | |
| 3065 unittest.expect(o.description, unittest.equals('foo')); | |
| 3066 unittest.expect(o.id, unittest.equals('foo')); | |
| 3067 checkDimensionValue(o.idDimensionValue); | |
| 3068 checkUnnamed3106(o.inpageTagFormats); | |
| 3069 checkUnnamed3107(o.interstitialTagFormats); | |
| 3070 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3071 unittest.expect(o.name, unittest.equals('foo')); | |
| 3072 unittest.expect(o.parentId, unittest.equals('foo')); | |
| 3073 checkDirectorySiteSettings(o.settings); | |
| 3074 unittest.expect(o.url, unittest.equals('foo')); | |
| 3075 } | |
| 3076 buildCounterDirectorySite--; | |
| 3077 } | |
| 3078 | |
| 3079 core.int buildCounterDirectorySiteContact = 0; | |
| 3080 buildDirectorySiteContact() { | |
| 3081 var o = new api.DirectorySiteContact(); | |
| 3082 buildCounterDirectorySiteContact++; | |
| 3083 if (buildCounterDirectorySiteContact < 3) { | |
| 3084 o.address = "foo"; | |
| 3085 o.email = "foo"; | |
| 3086 o.firstName = "foo"; | |
| 3087 o.id = "foo"; | |
| 3088 o.kind = "foo"; | |
| 3089 o.lastName = "foo"; | |
| 3090 o.phone = "foo"; | |
| 3091 o.role = "foo"; | |
| 3092 o.title = "foo"; | |
| 3093 o.type = "foo"; | |
| 3094 } | |
| 3095 buildCounterDirectorySiteContact--; | |
| 3096 return o; | |
| 3097 } | |
| 3098 | |
| 3099 checkDirectorySiteContact(api.DirectorySiteContact o) { | |
| 3100 buildCounterDirectorySiteContact++; | |
| 3101 if (buildCounterDirectorySiteContact < 3) { | |
| 3102 unittest.expect(o.address, unittest.equals('foo')); | |
| 3103 unittest.expect(o.email, unittest.equals('foo')); | |
| 3104 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 3105 unittest.expect(o.id, unittest.equals('foo')); | |
| 3106 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3107 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 3108 unittest.expect(o.phone, unittest.equals('foo')); | |
| 3109 unittest.expect(o.role, unittest.equals('foo')); | |
| 3110 unittest.expect(o.title, unittest.equals('foo')); | |
| 3111 unittest.expect(o.type, unittest.equals('foo')); | |
| 3112 } | |
| 3113 buildCounterDirectorySiteContact--; | |
| 3114 } | |
| 3115 | |
| 3116 core.int buildCounterDirectorySiteContactAssignment = 0; | |
| 3117 buildDirectorySiteContactAssignment() { | |
| 3118 var o = new api.DirectorySiteContactAssignment(); | |
| 3119 buildCounterDirectorySiteContactAssignment++; | |
| 3120 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3121 o.contactId = "foo"; | |
| 3122 o.visibility = "foo"; | |
| 3123 } | |
| 3124 buildCounterDirectorySiteContactAssignment--; | |
| 3125 return o; | |
| 3126 } | |
| 3127 | |
| 3128 checkDirectorySiteContactAssignment(api.DirectorySiteContactAssignment o) { | |
| 3129 buildCounterDirectorySiteContactAssignment++; | |
| 3130 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3131 unittest.expect(o.contactId, unittest.equals('foo')); | |
| 3132 unittest.expect(o.visibility, unittest.equals('foo')); | |
| 3133 } | |
| 3134 buildCounterDirectorySiteContactAssignment--; | |
| 3135 } | |
| 3136 | |
| 3137 buildUnnamed3108() { | |
| 3138 var o = new core.List<api.DirectorySiteContact>(); | |
| 3139 o.add(buildDirectorySiteContact()); | |
| 3140 o.add(buildDirectorySiteContact()); | |
| 3141 return o; | |
| 3142 } | |
| 3143 | |
| 3144 checkUnnamed3108(core.List<api.DirectorySiteContact> o) { | |
| 3145 unittest.expect(o, unittest.hasLength(2)); | |
| 3146 checkDirectorySiteContact(o[0]); | |
| 3147 checkDirectorySiteContact(o[1]); | |
| 3148 } | |
| 3149 | |
| 3150 core.int buildCounterDirectorySiteContactsListResponse = 0; | |
| 3151 buildDirectorySiteContactsListResponse() { | |
| 3152 var o = new api.DirectorySiteContactsListResponse(); | |
| 3153 buildCounterDirectorySiteContactsListResponse++; | |
| 3154 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3155 o.directorySiteContacts = buildUnnamed3108(); | |
| 3156 o.kind = "foo"; | |
| 3157 o.nextPageToken = "foo"; | |
| 3158 } | |
| 3159 buildCounterDirectorySiteContactsListResponse--; | |
| 3160 return o; | |
| 3161 } | |
| 3162 | |
| 3163 checkDirectorySiteContactsListResponse(api.DirectorySiteContactsListResponse o)
{ | |
| 3164 buildCounterDirectorySiteContactsListResponse++; | |
| 3165 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3166 checkUnnamed3108(o.directorySiteContacts); | |
| 3167 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3168 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3169 } | |
| 3170 buildCounterDirectorySiteContactsListResponse--; | |
| 3171 } | |
| 3172 | |
| 3173 core.int buildCounterDirectorySiteSettings = 0; | |
| 3174 buildDirectorySiteSettings() { | |
| 3175 var o = new api.DirectorySiteSettings(); | |
| 3176 buildCounterDirectorySiteSettings++; | |
| 3177 if (buildCounterDirectorySiteSettings < 3) { | |
| 3178 o.activeViewOptOut = true; | |
| 3179 o.dfpSettings = buildDfpSettings(); | |
| 3180 o.instreamVideoPlacementAccepted = true; | |
| 3181 o.interstitialPlacementAccepted = true; | |
| 3182 o.nielsenOcrOptOut = true; | |
| 3183 o.verificationTagOptOut = true; | |
| 3184 o.videoActiveViewOptOut = true; | |
| 3185 } | |
| 3186 buildCounterDirectorySiteSettings--; | |
| 3187 return o; | |
| 3188 } | |
| 3189 | |
| 3190 checkDirectorySiteSettings(api.DirectorySiteSettings o) { | |
| 3191 buildCounterDirectorySiteSettings++; | |
| 3192 if (buildCounterDirectorySiteSettings < 3) { | |
| 3193 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 3194 checkDfpSettings(o.dfpSettings); | |
| 3195 unittest.expect(o.instreamVideoPlacementAccepted, unittest.isTrue); | |
| 3196 unittest.expect(o.interstitialPlacementAccepted, unittest.isTrue); | |
| 3197 unittest.expect(o.nielsenOcrOptOut, unittest.isTrue); | |
| 3198 unittest.expect(o.verificationTagOptOut, unittest.isTrue); | |
| 3199 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 3200 } | |
| 3201 buildCounterDirectorySiteSettings--; | |
| 3202 } | |
| 3203 | |
| 3204 buildUnnamed3109() { | |
| 3205 var o = new core.List<api.DirectorySite>(); | |
| 3206 o.add(buildDirectorySite()); | |
| 3207 o.add(buildDirectorySite()); | |
| 3208 return o; | |
| 3209 } | |
| 3210 | |
| 3211 checkUnnamed3109(core.List<api.DirectorySite> o) { | |
| 3212 unittest.expect(o, unittest.hasLength(2)); | |
| 3213 checkDirectorySite(o[0]); | |
| 3214 checkDirectorySite(o[1]); | |
| 3215 } | |
| 3216 | |
| 3217 core.int buildCounterDirectorySitesListResponse = 0; | |
| 3218 buildDirectorySitesListResponse() { | |
| 3219 var o = new api.DirectorySitesListResponse(); | |
| 3220 buildCounterDirectorySitesListResponse++; | |
| 3221 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3222 o.directorySites = buildUnnamed3109(); | |
| 3223 o.kind = "foo"; | |
| 3224 o.nextPageToken = "foo"; | |
| 3225 } | |
| 3226 buildCounterDirectorySitesListResponse--; | |
| 3227 return o; | |
| 3228 } | |
| 3229 | |
| 3230 checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { | |
| 3231 buildCounterDirectorySitesListResponse++; | |
| 3232 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3233 checkUnnamed3109(o.directorySites); | |
| 3234 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3235 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3236 } | |
| 3237 buildCounterDirectorySitesListResponse--; | |
| 3238 } | |
| 3239 | |
| 3240 buildUnnamed3110() { | |
| 3241 var o = new core.List<core.String>(); | |
| 3242 o.add("foo"); | |
| 3243 o.add("foo"); | |
| 3244 return o; | |
| 3245 } | |
| 3246 | |
| 3247 checkUnnamed3110(core.List<core.String> o) { | |
| 3248 unittest.expect(o, unittest.hasLength(2)); | |
| 3249 unittest.expect(o[0], unittest.equals('foo')); | |
| 3250 unittest.expect(o[1], unittest.equals('foo')); | |
| 3251 } | |
| 3252 | |
| 3253 core.int buildCounterEventTag = 0; | |
| 3254 buildEventTag() { | |
| 3255 var o = new api.EventTag(); | |
| 3256 buildCounterEventTag++; | |
| 3257 if (buildCounterEventTag < 3) { | |
| 3258 o.accountId = "foo"; | |
| 3259 o.advertiserId = "foo"; | |
| 3260 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3261 o.campaignId = "foo"; | |
| 3262 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 3263 o.enabledByDefault = true; | |
| 3264 o.excludeFromAdxRequests = true; | |
| 3265 o.id = "foo"; | |
| 3266 o.kind = "foo"; | |
| 3267 o.name = "foo"; | |
| 3268 o.siteFilterType = "foo"; | |
| 3269 o.siteIds = buildUnnamed3110(); | |
| 3270 o.sslCompliant = true; | |
| 3271 o.status = "foo"; | |
| 3272 o.subaccountId = "foo"; | |
| 3273 o.type = "foo"; | |
| 3274 o.url = "foo"; | |
| 3275 o.urlEscapeLevels = 42; | |
| 3276 } | |
| 3277 buildCounterEventTag--; | |
| 3278 return o; | |
| 3279 } | |
| 3280 | |
| 3281 checkEventTag(api.EventTag o) { | |
| 3282 buildCounterEventTag++; | |
| 3283 if (buildCounterEventTag < 3) { | |
| 3284 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3285 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3286 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3287 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 3288 checkDimensionValue(o.campaignIdDimensionValue); | |
| 3289 unittest.expect(o.enabledByDefault, unittest.isTrue); | |
| 3290 unittest.expect(o.excludeFromAdxRequests, unittest.isTrue); | |
| 3291 unittest.expect(o.id, unittest.equals('foo')); | |
| 3292 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3293 unittest.expect(o.name, unittest.equals('foo')); | |
| 3294 unittest.expect(o.siteFilterType, unittest.equals('foo')); | |
| 3295 checkUnnamed3110(o.siteIds); | |
| 3296 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3297 unittest.expect(o.status, unittest.equals('foo')); | |
| 3298 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3299 unittest.expect(o.type, unittest.equals('foo')); | |
| 3300 unittest.expect(o.url, unittest.equals('foo')); | |
| 3301 unittest.expect(o.urlEscapeLevels, unittest.equals(42)); | |
| 3302 } | |
| 3303 buildCounterEventTag--; | |
| 3304 } | |
| 3305 | |
| 3306 core.int buildCounterEventTagOverride = 0; | |
| 3307 buildEventTagOverride() { | |
| 3308 var o = new api.EventTagOverride(); | |
| 3309 buildCounterEventTagOverride++; | |
| 3310 if (buildCounterEventTagOverride < 3) { | |
| 3311 o.enabled = true; | |
| 3312 o.id = "foo"; | |
| 3313 } | |
| 3314 buildCounterEventTagOverride--; | |
| 3315 return o; | |
| 3316 } | |
| 3317 | |
| 3318 checkEventTagOverride(api.EventTagOverride o) { | |
| 3319 buildCounterEventTagOverride++; | |
| 3320 if (buildCounterEventTagOverride < 3) { | |
| 3321 unittest.expect(o.enabled, unittest.isTrue); | |
| 3322 unittest.expect(o.id, unittest.equals('foo')); | |
| 3323 } | |
| 3324 buildCounterEventTagOverride--; | |
| 3325 } | |
| 3326 | |
| 3327 buildUnnamed3111() { | |
| 3328 var o = new core.List<api.EventTag>(); | |
| 3329 o.add(buildEventTag()); | |
| 3330 o.add(buildEventTag()); | |
| 3331 return o; | |
| 3332 } | |
| 3333 | |
| 3334 checkUnnamed3111(core.List<api.EventTag> o) { | |
| 3335 unittest.expect(o, unittest.hasLength(2)); | |
| 3336 checkEventTag(o[0]); | |
| 3337 checkEventTag(o[1]); | |
| 3338 } | |
| 3339 | |
| 3340 core.int buildCounterEventTagsListResponse = 0; | |
| 3341 buildEventTagsListResponse() { | |
| 3342 var o = new api.EventTagsListResponse(); | |
| 3343 buildCounterEventTagsListResponse++; | |
| 3344 if (buildCounterEventTagsListResponse < 3) { | |
| 3345 o.eventTags = buildUnnamed3111(); | |
| 3346 o.kind = "foo"; | |
| 3347 } | |
| 3348 buildCounterEventTagsListResponse--; | |
| 3349 return o; | |
| 3350 } | |
| 3351 | |
| 3352 checkEventTagsListResponse(api.EventTagsListResponse o) { | |
| 3353 buildCounterEventTagsListResponse++; | |
| 3354 if (buildCounterEventTagsListResponse < 3) { | |
| 3355 checkUnnamed3111(o.eventTags); | |
| 3356 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3357 } | |
| 3358 buildCounterEventTagsListResponse--; | |
| 3359 } | |
| 3360 | |
| 3361 core.int buildCounterFileUrls = 0; | |
| 3362 buildFileUrls() { | |
| 3363 var o = new api.FileUrls(); | |
| 3364 buildCounterFileUrls++; | |
| 3365 if (buildCounterFileUrls < 3) { | |
| 3366 o.apiUrl = "foo"; | |
| 3367 o.browserUrl = "foo"; | |
| 3368 } | |
| 3369 buildCounterFileUrls--; | |
| 3370 return o; | |
| 3371 } | |
| 3372 | |
| 3373 checkFileUrls(api.FileUrls o) { | |
| 3374 buildCounterFileUrls++; | |
| 3375 if (buildCounterFileUrls < 3) { | |
| 3376 unittest.expect(o.apiUrl, unittest.equals('foo')); | |
| 3377 unittest.expect(o.browserUrl, unittest.equals('foo')); | |
| 3378 } | |
| 3379 buildCounterFileUrls--; | |
| 3380 } | |
| 3381 | |
| 3382 core.int buildCounterFile = 0; | |
| 3383 buildFile() { | |
| 3384 var o = new api.File(); | |
| 3385 buildCounterFile++; | |
| 3386 if (buildCounterFile < 3) { | |
| 3387 o.dateRange = buildDateRange(); | |
| 3388 o.etag = "foo"; | |
| 3389 o.fileName = "foo"; | |
| 3390 o.format = "foo"; | |
| 3391 o.id = "foo"; | |
| 3392 o.kind = "foo"; | |
| 3393 o.lastModifiedTime = "foo"; | |
| 3394 o.reportId = "foo"; | |
| 3395 o.status = "foo"; | |
| 3396 o.urls = buildFileUrls(); | |
| 3397 } | |
| 3398 buildCounterFile--; | |
| 3399 return o; | |
| 3400 } | |
| 3401 | |
| 3402 checkFile(api.File o) { | |
| 3403 buildCounterFile++; | |
| 3404 if (buildCounterFile < 3) { | |
| 3405 checkDateRange(o.dateRange); | |
| 3406 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3407 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 3408 unittest.expect(o.format, unittest.equals('foo')); | |
| 3409 unittest.expect(o.id, unittest.equals('foo')); | |
| 3410 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3411 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 3412 unittest.expect(o.reportId, unittest.equals('foo')); | |
| 3413 unittest.expect(o.status, unittest.equals('foo')); | |
| 3414 checkFileUrls(o.urls); | |
| 3415 } | |
| 3416 buildCounterFile--; | |
| 3417 } | |
| 3418 | |
| 3419 buildUnnamed3112() { | |
| 3420 var o = new core.List<api.File>(); | |
| 3421 o.add(buildFile()); | |
| 3422 o.add(buildFile()); | |
| 3423 return o; | |
| 3424 } | |
| 3425 | |
| 3426 checkUnnamed3112(core.List<api.File> o) { | |
| 3427 unittest.expect(o, unittest.hasLength(2)); | |
| 3428 checkFile(o[0]); | |
| 3429 checkFile(o[1]); | |
| 3430 } | |
| 3431 | |
| 3432 core.int buildCounterFileList = 0; | |
| 3433 buildFileList() { | |
| 3434 var o = new api.FileList(); | |
| 3435 buildCounterFileList++; | |
| 3436 if (buildCounterFileList < 3) { | |
| 3437 o.etag = "foo"; | |
| 3438 o.items = buildUnnamed3112(); | |
| 3439 o.kind = "foo"; | |
| 3440 o.nextPageToken = "foo"; | |
| 3441 } | |
| 3442 buildCounterFileList--; | |
| 3443 return o; | |
| 3444 } | |
| 3445 | |
| 3446 checkFileList(api.FileList o) { | |
| 3447 buildCounterFileList++; | |
| 3448 if (buildCounterFileList < 3) { | |
| 3449 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3450 checkUnnamed3112(o.items); | |
| 3451 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3452 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3453 } | |
| 3454 buildCounterFileList--; | |
| 3455 } | |
| 3456 | |
| 3457 core.int buildCounterFlight = 0; | |
| 3458 buildFlight() { | |
| 3459 var o = new api.Flight(); | |
| 3460 buildCounterFlight++; | |
| 3461 if (buildCounterFlight < 3) { | |
| 3462 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3463 o.rateOrCost = "foo"; | |
| 3464 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3465 o.units = "foo"; | |
| 3466 } | |
| 3467 buildCounterFlight--; | |
| 3468 return o; | |
| 3469 } | |
| 3470 | |
| 3471 checkFlight(api.Flight o) { | |
| 3472 buildCounterFlight++; | |
| 3473 if (buildCounterFlight < 3) { | |
| 3474 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 3475 unittest.expect(o.rateOrCost, unittest.equals('foo')); | |
| 3476 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 3477 unittest.expect(o.units, unittest.equals('foo')); | |
| 3478 } | |
| 3479 buildCounterFlight--; | |
| 3480 } | |
| 3481 | |
| 3482 core.int buildCounterFloodlightActivitiesGenerateTagResponse = 0; | |
| 3483 buildFloodlightActivitiesGenerateTagResponse() { | |
| 3484 var o = new api.FloodlightActivitiesGenerateTagResponse(); | |
| 3485 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3486 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3487 o.floodlightActivityTag = "foo"; | |
| 3488 o.kind = "foo"; | |
| 3489 } | |
| 3490 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3491 return o; | |
| 3492 } | |
| 3493 | |
| 3494 checkFloodlightActivitiesGenerateTagResponse(api.FloodlightActivitiesGenerateTag
Response o) { | |
| 3495 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3496 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3497 unittest.expect(o.floodlightActivityTag, unittest.equals('foo')); | |
| 3498 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3499 } | |
| 3500 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3501 } | |
| 3502 | |
| 3503 buildUnnamed3113() { | |
| 3504 var o = new core.List<api.FloodlightActivity>(); | |
| 3505 o.add(buildFloodlightActivity()); | |
| 3506 o.add(buildFloodlightActivity()); | |
| 3507 return o; | |
| 3508 } | |
| 3509 | |
| 3510 checkUnnamed3113(core.List<api.FloodlightActivity> o) { | |
| 3511 unittest.expect(o, unittest.hasLength(2)); | |
| 3512 checkFloodlightActivity(o[0]); | |
| 3513 checkFloodlightActivity(o[1]); | |
| 3514 } | |
| 3515 | |
| 3516 core.int buildCounterFloodlightActivitiesListResponse = 0; | |
| 3517 buildFloodlightActivitiesListResponse() { | |
| 3518 var o = new api.FloodlightActivitiesListResponse(); | |
| 3519 buildCounterFloodlightActivitiesListResponse++; | |
| 3520 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3521 o.floodlightActivities = buildUnnamed3113(); | |
| 3522 o.kind = "foo"; | |
| 3523 o.nextPageToken = "foo"; | |
| 3524 } | |
| 3525 buildCounterFloodlightActivitiesListResponse--; | |
| 3526 return o; | |
| 3527 } | |
| 3528 | |
| 3529 checkFloodlightActivitiesListResponse(api.FloodlightActivitiesListResponse o) { | |
| 3530 buildCounterFloodlightActivitiesListResponse++; | |
| 3531 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3532 checkUnnamed3113(o.floodlightActivities); | |
| 3533 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3534 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3535 } | |
| 3536 buildCounterFloodlightActivitiesListResponse--; | |
| 3537 } | |
| 3538 | |
| 3539 buildUnnamed3114() { | |
| 3540 var o = new core.List<api.FloodlightActivityDynamicTag>(); | |
| 3541 o.add(buildFloodlightActivityDynamicTag()); | |
| 3542 o.add(buildFloodlightActivityDynamicTag()); | |
| 3543 return o; | |
| 3544 } | |
| 3545 | |
| 3546 checkUnnamed3114(core.List<api.FloodlightActivityDynamicTag> o) { | |
| 3547 unittest.expect(o, unittest.hasLength(2)); | |
| 3548 checkFloodlightActivityDynamicTag(o[0]); | |
| 3549 checkFloodlightActivityDynamicTag(o[1]); | |
| 3550 } | |
| 3551 | |
| 3552 buildUnnamed3115() { | |
| 3553 var o = new core.List<api.FloodlightActivityPublisherDynamicTag>(); | |
| 3554 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3555 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3556 return o; | |
| 3557 } | |
| 3558 | |
| 3559 checkUnnamed3115(core.List<api.FloodlightActivityPublisherDynamicTag> o) { | |
| 3560 unittest.expect(o, unittest.hasLength(2)); | |
| 3561 checkFloodlightActivityPublisherDynamicTag(o[0]); | |
| 3562 checkFloodlightActivityPublisherDynamicTag(o[1]); | |
| 3563 } | |
| 3564 | |
| 3565 buildUnnamed3116() { | |
| 3566 var o = new core.List<core.String>(); | |
| 3567 o.add("foo"); | |
| 3568 o.add("foo"); | |
| 3569 return o; | |
| 3570 } | |
| 3571 | |
| 3572 checkUnnamed3116(core.List<core.String> o) { | |
| 3573 unittest.expect(o, unittest.hasLength(2)); | |
| 3574 unittest.expect(o[0], unittest.equals('foo')); | |
| 3575 unittest.expect(o[1], unittest.equals('foo')); | |
| 3576 } | |
| 3577 | |
| 3578 core.int buildCounterFloodlightActivity = 0; | |
| 3579 buildFloodlightActivity() { | |
| 3580 var o = new api.FloodlightActivity(); | |
| 3581 buildCounterFloodlightActivity++; | |
| 3582 if (buildCounterFloodlightActivity < 3) { | |
| 3583 o.accountId = "foo"; | |
| 3584 o.advertiserId = "foo"; | |
| 3585 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3586 o.cacheBustingType = "foo"; | |
| 3587 o.countingMethod = "foo"; | |
| 3588 o.defaultTags = buildUnnamed3114(); | |
| 3589 o.expectedUrl = "foo"; | |
| 3590 o.floodlightActivityGroupId = "foo"; | |
| 3591 o.floodlightActivityGroupName = "foo"; | |
| 3592 o.floodlightActivityGroupTagString = "foo"; | |
| 3593 o.floodlightActivityGroupType = "foo"; | |
| 3594 o.floodlightConfigurationId = "foo"; | |
| 3595 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3596 o.hidden = true; | |
| 3597 o.id = "foo"; | |
| 3598 o.idDimensionValue = buildDimensionValue(); | |
| 3599 o.imageTagEnabled = true; | |
| 3600 o.kind = "foo"; | |
| 3601 o.name = "foo"; | |
| 3602 o.notes = "foo"; | |
| 3603 o.publisherTags = buildUnnamed3115(); | |
| 3604 o.secure = true; | |
| 3605 o.sslCompliant = true; | |
| 3606 o.sslRequired = true; | |
| 3607 o.subaccountId = "foo"; | |
| 3608 o.tagFormat = "foo"; | |
| 3609 o.tagString = "foo"; | |
| 3610 o.userDefinedVariableTypes = buildUnnamed3116(); | |
| 3611 } | |
| 3612 buildCounterFloodlightActivity--; | |
| 3613 return o; | |
| 3614 } | |
| 3615 | |
| 3616 checkFloodlightActivity(api.FloodlightActivity o) { | |
| 3617 buildCounterFloodlightActivity++; | |
| 3618 if (buildCounterFloodlightActivity < 3) { | |
| 3619 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3620 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3621 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3622 unittest.expect(o.cacheBustingType, unittest.equals('foo')); | |
| 3623 unittest.expect(o.countingMethod, unittest.equals('foo')); | |
| 3624 checkUnnamed3114(o.defaultTags); | |
| 3625 unittest.expect(o.expectedUrl, unittest.equals('foo')); | |
| 3626 unittest.expect(o.floodlightActivityGroupId, unittest.equals('foo')); | |
| 3627 unittest.expect(o.floodlightActivityGroupName, unittest.equals('foo')); | |
| 3628 unittest.expect(o.floodlightActivityGroupTagString, unittest.equals('foo')); | |
| 3629 unittest.expect(o.floodlightActivityGroupType, unittest.equals('foo')); | |
| 3630 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3631 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3632 unittest.expect(o.hidden, unittest.isTrue); | |
| 3633 unittest.expect(o.id, unittest.equals('foo')); | |
| 3634 checkDimensionValue(o.idDimensionValue); | |
| 3635 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 3636 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3637 unittest.expect(o.name, unittest.equals('foo')); | |
| 3638 unittest.expect(o.notes, unittest.equals('foo')); | |
| 3639 checkUnnamed3115(o.publisherTags); | |
| 3640 unittest.expect(o.secure, unittest.isTrue); | |
| 3641 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3642 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 3643 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3644 unittest.expect(o.tagFormat, unittest.equals('foo')); | |
| 3645 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3646 checkUnnamed3116(o.userDefinedVariableTypes); | |
| 3647 } | |
| 3648 buildCounterFloodlightActivity--; | |
| 3649 } | |
| 3650 | |
| 3651 core.int buildCounterFloodlightActivityDynamicTag = 0; | |
| 3652 buildFloodlightActivityDynamicTag() { | |
| 3653 var o = new api.FloodlightActivityDynamicTag(); | |
| 3654 buildCounterFloodlightActivityDynamicTag++; | |
| 3655 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3656 o.id = "foo"; | |
| 3657 o.name = "foo"; | |
| 3658 o.tag = "foo"; | |
| 3659 } | |
| 3660 buildCounterFloodlightActivityDynamicTag--; | |
| 3661 return o; | |
| 3662 } | |
| 3663 | |
| 3664 checkFloodlightActivityDynamicTag(api.FloodlightActivityDynamicTag o) { | |
| 3665 buildCounterFloodlightActivityDynamicTag++; | |
| 3666 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3667 unittest.expect(o.id, unittest.equals('foo')); | |
| 3668 unittest.expect(o.name, unittest.equals('foo')); | |
| 3669 unittest.expect(o.tag, unittest.equals('foo')); | |
| 3670 } | |
| 3671 buildCounterFloodlightActivityDynamicTag--; | |
| 3672 } | |
| 3673 | |
| 3674 core.int buildCounterFloodlightActivityGroup = 0; | |
| 3675 buildFloodlightActivityGroup() { | |
| 3676 var o = new api.FloodlightActivityGroup(); | |
| 3677 buildCounterFloodlightActivityGroup++; | |
| 3678 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3679 o.accountId = "foo"; | |
| 3680 o.advertiserId = "foo"; | |
| 3681 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3682 o.floodlightConfigurationId = "foo"; | |
| 3683 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3684 o.id = "foo"; | |
| 3685 o.idDimensionValue = buildDimensionValue(); | |
| 3686 o.kind = "foo"; | |
| 3687 o.name = "foo"; | |
| 3688 o.subaccountId = "foo"; | |
| 3689 o.tagString = "foo"; | |
| 3690 o.type = "foo"; | |
| 3691 } | |
| 3692 buildCounterFloodlightActivityGroup--; | |
| 3693 return o; | |
| 3694 } | |
| 3695 | |
| 3696 checkFloodlightActivityGroup(api.FloodlightActivityGroup o) { | |
| 3697 buildCounterFloodlightActivityGroup++; | |
| 3698 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3699 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3700 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3701 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3702 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3703 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3704 unittest.expect(o.id, unittest.equals('foo')); | |
| 3705 checkDimensionValue(o.idDimensionValue); | |
| 3706 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3707 unittest.expect(o.name, unittest.equals('foo')); | |
| 3708 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3709 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3710 unittest.expect(o.type, unittest.equals('foo')); | |
| 3711 } | |
| 3712 buildCounterFloodlightActivityGroup--; | |
| 3713 } | |
| 3714 | |
| 3715 buildUnnamed3117() { | |
| 3716 var o = new core.List<api.FloodlightActivityGroup>(); | |
| 3717 o.add(buildFloodlightActivityGroup()); | |
| 3718 o.add(buildFloodlightActivityGroup()); | |
| 3719 return o; | |
| 3720 } | |
| 3721 | |
| 3722 checkUnnamed3117(core.List<api.FloodlightActivityGroup> o) { | |
| 3723 unittest.expect(o, unittest.hasLength(2)); | |
| 3724 checkFloodlightActivityGroup(o[0]); | |
| 3725 checkFloodlightActivityGroup(o[1]); | |
| 3726 } | |
| 3727 | |
| 3728 core.int buildCounterFloodlightActivityGroupsListResponse = 0; | |
| 3729 buildFloodlightActivityGroupsListResponse() { | |
| 3730 var o = new api.FloodlightActivityGroupsListResponse(); | |
| 3731 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3732 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3733 o.floodlightActivityGroups = buildUnnamed3117(); | |
| 3734 o.kind = "foo"; | |
| 3735 o.nextPageToken = "foo"; | |
| 3736 } | |
| 3737 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3738 return o; | |
| 3739 } | |
| 3740 | |
| 3741 checkFloodlightActivityGroupsListResponse(api.FloodlightActivityGroupsListRespon
se o) { | |
| 3742 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3743 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3744 checkUnnamed3117(o.floodlightActivityGroups); | |
| 3745 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3746 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3747 } | |
| 3748 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3749 } | |
| 3750 | |
| 3751 core.int buildCounterFloodlightActivityPublisherDynamicTag = 0; | |
| 3752 buildFloodlightActivityPublisherDynamicTag() { | |
| 3753 var o = new api.FloodlightActivityPublisherDynamicTag(); | |
| 3754 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3755 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3756 o.clickThrough = true; | |
| 3757 o.directorySiteId = "foo"; | |
| 3758 o.dynamicTag = buildFloodlightActivityDynamicTag(); | |
| 3759 o.siteId = "foo"; | |
| 3760 o.siteIdDimensionValue = buildDimensionValue(); | |
| 3761 o.viewThrough = true; | |
| 3762 } | |
| 3763 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3764 return o; | |
| 3765 } | |
| 3766 | |
| 3767 checkFloodlightActivityPublisherDynamicTag(api.FloodlightActivityPublisherDynami
cTag o) { | |
| 3768 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3769 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3770 unittest.expect(o.clickThrough, unittest.isTrue); | |
| 3771 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 3772 checkFloodlightActivityDynamicTag(o.dynamicTag); | |
| 3773 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 3774 checkDimensionValue(o.siteIdDimensionValue); | |
| 3775 unittest.expect(o.viewThrough, unittest.isTrue); | |
| 3776 } | |
| 3777 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3778 } | |
| 3779 | |
| 3780 buildUnnamed3118() { | |
| 3781 var o = new core.List<core.String>(); | |
| 3782 o.add("foo"); | |
| 3783 o.add("foo"); | |
| 3784 return o; | |
| 3785 } | |
| 3786 | |
| 3787 checkUnnamed3118(core.List<core.String> o) { | |
| 3788 unittest.expect(o, unittest.hasLength(2)); | |
| 3789 unittest.expect(o[0], unittest.equals('foo')); | |
| 3790 unittest.expect(o[1], unittest.equals('foo')); | |
| 3791 } | |
| 3792 | |
| 3793 buildUnnamed3119() { | |
| 3794 var o = new core.List<api.ThirdPartyAuthenticationToken>(); | |
| 3795 o.add(buildThirdPartyAuthenticationToken()); | |
| 3796 o.add(buildThirdPartyAuthenticationToken()); | |
| 3797 return o; | |
| 3798 } | |
| 3799 | |
| 3800 checkUnnamed3119(core.List<api.ThirdPartyAuthenticationToken> o) { | |
| 3801 unittest.expect(o, unittest.hasLength(2)); | |
| 3802 checkThirdPartyAuthenticationToken(o[0]); | |
| 3803 checkThirdPartyAuthenticationToken(o[1]); | |
| 3804 } | |
| 3805 | |
| 3806 buildUnnamed3120() { | |
| 3807 var o = new core.List<api.UserDefinedVariableConfiguration>(); | |
| 3808 o.add(buildUserDefinedVariableConfiguration()); | |
| 3809 o.add(buildUserDefinedVariableConfiguration()); | |
| 3810 return o; | |
| 3811 } | |
| 3812 | |
| 3813 checkUnnamed3120(core.List<api.UserDefinedVariableConfiguration> o) { | |
| 3814 unittest.expect(o, unittest.hasLength(2)); | |
| 3815 checkUserDefinedVariableConfiguration(o[0]); | |
| 3816 checkUserDefinedVariableConfiguration(o[1]); | |
| 3817 } | |
| 3818 | |
| 3819 core.int buildCounterFloodlightConfiguration = 0; | |
| 3820 buildFloodlightConfiguration() { | |
| 3821 var o = new api.FloodlightConfiguration(); | |
| 3822 buildCounterFloodlightConfiguration++; | |
| 3823 if (buildCounterFloodlightConfiguration < 3) { | |
| 3824 o.accountId = "foo"; | |
| 3825 o.advertiserId = "foo"; | |
| 3826 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3827 o.analyticsDataSharingEnabled = true; | |
| 3828 o.exposureToConversionEnabled = true; | |
| 3829 o.firstDayOfWeek = "foo"; | |
| 3830 o.id = "foo"; | |
| 3831 o.idDimensionValue = buildDimensionValue(); | |
| 3832 o.inAppAttributionTrackingEnabled = true; | |
| 3833 o.kind = "foo"; | |
| 3834 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 3835 o.naturalSearchConversionAttributionOption = "foo"; | |
| 3836 o.omnitureSettings = buildOmnitureSettings(); | |
| 3837 o.sslRequired = true; | |
| 3838 o.standardVariableTypes = buildUnnamed3118(); | |
| 3839 o.subaccountId = "foo"; | |
| 3840 o.tagSettings = buildTagSettings(); | |
| 3841 o.thirdPartyAuthenticationTokens = buildUnnamed3119(); | |
| 3842 o.userDefinedVariableConfigurations = buildUnnamed3120(); | |
| 3843 } | |
| 3844 buildCounterFloodlightConfiguration--; | |
| 3845 return o; | |
| 3846 } | |
| 3847 | |
| 3848 checkFloodlightConfiguration(api.FloodlightConfiguration o) { | |
| 3849 buildCounterFloodlightConfiguration++; | |
| 3850 if (buildCounterFloodlightConfiguration < 3) { | |
| 3851 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3852 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3853 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3854 unittest.expect(o.analyticsDataSharingEnabled, unittest.isTrue); | |
| 3855 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 3856 unittest.expect(o.firstDayOfWeek, unittest.equals('foo')); | |
| 3857 unittest.expect(o.id, unittest.equals('foo')); | |
| 3858 checkDimensionValue(o.idDimensionValue); | |
| 3859 unittest.expect(o.inAppAttributionTrackingEnabled, unittest.isTrue); | |
| 3860 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3861 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 3862 unittest.expect(o.naturalSearchConversionAttributionOption, unittest.equals(
'foo')); | |
| 3863 checkOmnitureSettings(o.omnitureSettings); | |
| 3864 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 3865 checkUnnamed3118(o.standardVariableTypes); | |
| 3866 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3867 checkTagSettings(o.tagSettings); | |
| 3868 checkUnnamed3119(o.thirdPartyAuthenticationTokens); | |
| 3869 checkUnnamed3120(o.userDefinedVariableConfigurations); | |
| 3870 } | |
| 3871 buildCounterFloodlightConfiguration--; | |
| 3872 } | |
| 3873 | |
| 3874 buildUnnamed3121() { | |
| 3875 var o = new core.List<api.FloodlightConfiguration>(); | |
| 3876 o.add(buildFloodlightConfiguration()); | |
| 3877 o.add(buildFloodlightConfiguration()); | |
| 3878 return o; | |
| 3879 } | |
| 3880 | |
| 3881 checkUnnamed3121(core.List<api.FloodlightConfiguration> o) { | |
| 3882 unittest.expect(o, unittest.hasLength(2)); | |
| 3883 checkFloodlightConfiguration(o[0]); | |
| 3884 checkFloodlightConfiguration(o[1]); | |
| 3885 } | |
| 3886 | |
| 3887 core.int buildCounterFloodlightConfigurationsListResponse = 0; | |
| 3888 buildFloodlightConfigurationsListResponse() { | |
| 3889 var o = new api.FloodlightConfigurationsListResponse(); | |
| 3890 buildCounterFloodlightConfigurationsListResponse++; | |
| 3891 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3892 o.floodlightConfigurations = buildUnnamed3121(); | |
| 3893 o.kind = "foo"; | |
| 3894 } | |
| 3895 buildCounterFloodlightConfigurationsListResponse--; | |
| 3896 return o; | |
| 3897 } | |
| 3898 | |
| 3899 checkFloodlightConfigurationsListResponse(api.FloodlightConfigurationsListRespon
se o) { | |
| 3900 buildCounterFloodlightConfigurationsListResponse++; | |
| 3901 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3902 checkUnnamed3121(o.floodlightConfigurations); | |
| 3903 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3904 } | |
| 3905 buildCounterFloodlightConfigurationsListResponse--; | |
| 3906 } | |
| 3907 | |
| 3908 buildUnnamed3122() { | |
| 3909 var o = new core.List<api.Dimension>(); | |
| 3910 o.add(buildDimension()); | |
| 3911 o.add(buildDimension()); | |
| 3912 return o; | |
| 3913 } | |
| 3914 | |
| 3915 checkUnnamed3122(core.List<api.Dimension> o) { | |
| 3916 unittest.expect(o, unittest.hasLength(2)); | |
| 3917 checkDimension(o[0]); | |
| 3918 checkDimension(o[1]); | |
| 3919 } | |
| 3920 | |
| 3921 buildUnnamed3123() { | |
| 3922 var o = new core.List<api.Dimension>(); | |
| 3923 o.add(buildDimension()); | |
| 3924 o.add(buildDimension()); | |
| 3925 return o; | |
| 3926 } | |
| 3927 | |
| 3928 checkUnnamed3123(core.List<api.Dimension> o) { | |
| 3929 unittest.expect(o, unittest.hasLength(2)); | |
| 3930 checkDimension(o[0]); | |
| 3931 checkDimension(o[1]); | |
| 3932 } | |
| 3933 | |
| 3934 buildUnnamed3124() { | |
| 3935 var o = new core.List<api.Metric>(); | |
| 3936 o.add(buildMetric()); | |
| 3937 o.add(buildMetric()); | |
| 3938 return o; | |
| 3939 } | |
| 3940 | |
| 3941 checkUnnamed3124(core.List<api.Metric> o) { | |
| 3942 unittest.expect(o, unittest.hasLength(2)); | |
| 3943 checkMetric(o[0]); | |
| 3944 checkMetric(o[1]); | |
| 3945 } | |
| 3946 | |
| 3947 core.int buildCounterFloodlightReportCompatibleFields = 0; | |
| 3948 buildFloodlightReportCompatibleFields() { | |
| 3949 var o = new api.FloodlightReportCompatibleFields(); | |
| 3950 buildCounterFloodlightReportCompatibleFields++; | |
| 3951 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3952 o.dimensionFilters = buildUnnamed3122(); | |
| 3953 o.dimensions = buildUnnamed3123(); | |
| 3954 o.kind = "foo"; | |
| 3955 o.metrics = buildUnnamed3124(); | |
| 3956 } | |
| 3957 buildCounterFloodlightReportCompatibleFields--; | |
| 3958 return o; | |
| 3959 } | |
| 3960 | |
| 3961 checkFloodlightReportCompatibleFields(api.FloodlightReportCompatibleFields o) { | |
| 3962 buildCounterFloodlightReportCompatibleFields++; | |
| 3963 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3964 checkUnnamed3122(o.dimensionFilters); | |
| 3965 checkUnnamed3123(o.dimensions); | |
| 3966 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3967 checkUnnamed3124(o.metrics); | |
| 3968 } | |
| 3969 buildCounterFloodlightReportCompatibleFields--; | |
| 3970 } | |
| 3971 | |
| 3972 core.int buildCounterFrequencyCap = 0; | |
| 3973 buildFrequencyCap() { | |
| 3974 var o = new api.FrequencyCap(); | |
| 3975 buildCounterFrequencyCap++; | |
| 3976 if (buildCounterFrequencyCap < 3) { | |
| 3977 o.duration = "foo"; | |
| 3978 o.impressions = "foo"; | |
| 3979 } | |
| 3980 buildCounterFrequencyCap--; | |
| 3981 return o; | |
| 3982 } | |
| 3983 | |
| 3984 checkFrequencyCap(api.FrequencyCap o) { | |
| 3985 buildCounterFrequencyCap++; | |
| 3986 if (buildCounterFrequencyCap < 3) { | |
| 3987 unittest.expect(o.duration, unittest.equals('foo')); | |
| 3988 unittest.expect(o.impressions, unittest.equals('foo')); | |
| 3989 } | |
| 3990 buildCounterFrequencyCap--; | |
| 3991 } | |
| 3992 | |
| 3993 core.int buildCounterFsCommand = 0; | |
| 3994 buildFsCommand() { | |
| 3995 var o = new api.FsCommand(); | |
| 3996 buildCounterFsCommand++; | |
| 3997 if (buildCounterFsCommand < 3) { | |
| 3998 o.left = 42; | |
| 3999 o.positionOption = "foo"; | |
| 4000 o.top = 42; | |
| 4001 o.windowHeight = 42; | |
| 4002 o.windowWidth = 42; | |
| 4003 } | |
| 4004 buildCounterFsCommand--; | |
| 4005 return o; | |
| 4006 } | |
| 4007 | |
| 4008 checkFsCommand(api.FsCommand o) { | |
| 4009 buildCounterFsCommand++; | |
| 4010 if (buildCounterFsCommand < 3) { | |
| 4011 unittest.expect(o.left, unittest.equals(42)); | |
| 4012 unittest.expect(o.positionOption, unittest.equals('foo')); | |
| 4013 unittest.expect(o.top, unittest.equals(42)); | |
| 4014 unittest.expect(o.windowHeight, unittest.equals(42)); | |
| 4015 unittest.expect(o.windowWidth, unittest.equals(42)); | |
| 4016 } | |
| 4017 buildCounterFsCommand--; | |
| 4018 } | |
| 4019 | |
| 4020 buildUnnamed3125() { | |
| 4021 var o = new core.List<api.City>(); | |
| 4022 o.add(buildCity()); | |
| 4023 o.add(buildCity()); | |
| 4024 return o; | |
| 4025 } | |
| 4026 | |
| 4027 checkUnnamed3125(core.List<api.City> o) { | |
| 4028 unittest.expect(o, unittest.hasLength(2)); | |
| 4029 checkCity(o[0]); | |
| 4030 checkCity(o[1]); | |
| 4031 } | |
| 4032 | |
| 4033 buildUnnamed3126() { | |
| 4034 var o = new core.List<api.Country>(); | |
| 4035 o.add(buildCountry()); | |
| 4036 o.add(buildCountry()); | |
| 4037 return o; | |
| 4038 } | |
| 4039 | |
| 4040 checkUnnamed3126(core.List<api.Country> o) { | |
| 4041 unittest.expect(o, unittest.hasLength(2)); | |
| 4042 checkCountry(o[0]); | |
| 4043 checkCountry(o[1]); | |
| 4044 } | |
| 4045 | |
| 4046 buildUnnamed3127() { | |
| 4047 var o = new core.List<api.Metro>(); | |
| 4048 o.add(buildMetro()); | |
| 4049 o.add(buildMetro()); | |
| 4050 return o; | |
| 4051 } | |
| 4052 | |
| 4053 checkUnnamed3127(core.List<api.Metro> o) { | |
| 4054 unittest.expect(o, unittest.hasLength(2)); | |
| 4055 checkMetro(o[0]); | |
| 4056 checkMetro(o[1]); | |
| 4057 } | |
| 4058 | |
| 4059 buildUnnamed3128() { | |
| 4060 var o = new core.List<api.PostalCode>(); | |
| 4061 o.add(buildPostalCode()); | |
| 4062 o.add(buildPostalCode()); | |
| 4063 return o; | |
| 4064 } | |
| 4065 | |
| 4066 checkUnnamed3128(core.List<api.PostalCode> o) { | |
| 4067 unittest.expect(o, unittest.hasLength(2)); | |
| 4068 checkPostalCode(o[0]); | |
| 4069 checkPostalCode(o[1]); | |
| 4070 } | |
| 4071 | |
| 4072 buildUnnamed3129() { | |
| 4073 var o = new core.List<api.Region>(); | |
| 4074 o.add(buildRegion()); | |
| 4075 o.add(buildRegion()); | |
| 4076 return o; | |
| 4077 } | |
| 4078 | |
| 4079 checkUnnamed3129(core.List<api.Region> o) { | |
| 4080 unittest.expect(o, unittest.hasLength(2)); | |
| 4081 checkRegion(o[0]); | |
| 4082 checkRegion(o[1]); | |
| 4083 } | |
| 4084 | |
| 4085 core.int buildCounterGeoTargeting = 0; | |
| 4086 buildGeoTargeting() { | |
| 4087 var o = new api.GeoTargeting(); | |
| 4088 buildCounterGeoTargeting++; | |
| 4089 if (buildCounterGeoTargeting < 3) { | |
| 4090 o.cities = buildUnnamed3125(); | |
| 4091 o.countries = buildUnnamed3126(); | |
| 4092 o.excludeCountries = true; | |
| 4093 o.metros = buildUnnamed3127(); | |
| 4094 o.postalCodes = buildUnnamed3128(); | |
| 4095 o.regions = buildUnnamed3129(); | |
| 4096 } | |
| 4097 buildCounterGeoTargeting--; | |
| 4098 return o; | |
| 4099 } | |
| 4100 | |
| 4101 checkGeoTargeting(api.GeoTargeting o) { | |
| 4102 buildCounterGeoTargeting++; | |
| 4103 if (buildCounterGeoTargeting < 3) { | |
| 4104 checkUnnamed3125(o.cities); | |
| 4105 checkUnnamed3126(o.countries); | |
| 4106 unittest.expect(o.excludeCountries, unittest.isTrue); | |
| 4107 checkUnnamed3127(o.metros); | |
| 4108 checkUnnamed3128(o.postalCodes); | |
| 4109 checkUnnamed3129(o.regions); | |
| 4110 } | |
| 4111 buildCounterGeoTargeting--; | |
| 4112 } | |
| 4113 | |
| 4114 buildUnnamed3130() { | |
| 4115 var o = new core.List<api.AdSlot>(); | |
| 4116 o.add(buildAdSlot()); | |
| 4117 o.add(buildAdSlot()); | |
| 4118 return o; | |
| 4119 } | |
| 4120 | |
| 4121 checkUnnamed3130(core.List<api.AdSlot> o) { | |
| 4122 unittest.expect(o, unittest.hasLength(2)); | |
| 4123 checkAdSlot(o[0]); | |
| 4124 checkAdSlot(o[1]); | |
| 4125 } | |
| 4126 | |
| 4127 core.int buildCounterInventoryItem = 0; | |
| 4128 buildInventoryItem() { | |
| 4129 var o = new api.InventoryItem(); | |
| 4130 buildCounterInventoryItem++; | |
| 4131 if (buildCounterInventoryItem < 3) { | |
| 4132 o.accountId = "foo"; | |
| 4133 o.adSlots = buildUnnamed3130(); | |
| 4134 o.advertiserId = "foo"; | |
| 4135 o.contentCategoryId = "foo"; | |
| 4136 o.estimatedClickThroughRate = "foo"; | |
| 4137 o.estimatedConversionRate = "foo"; | |
| 4138 o.id = "foo"; | |
| 4139 o.inPlan = true; | |
| 4140 o.kind = "foo"; | |
| 4141 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4142 o.name = "foo"; | |
| 4143 o.negotiationChannelId = "foo"; | |
| 4144 o.orderId = "foo"; | |
| 4145 o.placementStrategyId = "foo"; | |
| 4146 o.pricing = buildPricing(); | |
| 4147 o.projectId = "foo"; | |
| 4148 o.rfpId = "foo"; | |
| 4149 o.siteId = "foo"; | |
| 4150 o.subaccountId = "foo"; | |
| 4151 } | |
| 4152 buildCounterInventoryItem--; | |
| 4153 return o; | |
| 4154 } | |
| 4155 | |
| 4156 checkInventoryItem(api.InventoryItem o) { | |
| 4157 buildCounterInventoryItem++; | |
| 4158 if (buildCounterInventoryItem < 3) { | |
| 4159 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4160 checkUnnamed3130(o.adSlots); | |
| 4161 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4162 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 4163 unittest.expect(o.estimatedClickThroughRate, unittest.equals('foo')); | |
| 4164 unittest.expect(o.estimatedConversionRate, unittest.equals('foo')); | |
| 4165 unittest.expect(o.id, unittest.equals('foo')); | |
| 4166 unittest.expect(o.inPlan, unittest.isTrue); | |
| 4167 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4168 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4169 unittest.expect(o.name, unittest.equals('foo')); | |
| 4170 unittest.expect(o.negotiationChannelId, unittest.equals('foo')); | |
| 4171 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 4172 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 4173 checkPricing(o.pricing); | |
| 4174 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4175 unittest.expect(o.rfpId, unittest.equals('foo')); | |
| 4176 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 4177 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4178 } | |
| 4179 buildCounterInventoryItem--; | |
| 4180 } | |
| 4181 | |
| 4182 buildUnnamed3131() { | |
| 4183 var o = new core.List<api.InventoryItem>(); | |
| 4184 o.add(buildInventoryItem()); | |
| 4185 o.add(buildInventoryItem()); | |
| 4186 return o; | |
| 4187 } | |
| 4188 | |
| 4189 checkUnnamed3131(core.List<api.InventoryItem> o) { | |
| 4190 unittest.expect(o, unittest.hasLength(2)); | |
| 4191 checkInventoryItem(o[0]); | |
| 4192 checkInventoryItem(o[1]); | |
| 4193 } | |
| 4194 | |
| 4195 core.int buildCounterInventoryItemsListResponse = 0; | |
| 4196 buildInventoryItemsListResponse() { | |
| 4197 var o = new api.InventoryItemsListResponse(); | |
| 4198 buildCounterInventoryItemsListResponse++; | |
| 4199 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4200 o.inventoryItems = buildUnnamed3131(); | |
| 4201 o.kind = "foo"; | |
| 4202 o.nextPageToken = "foo"; | |
| 4203 } | |
| 4204 buildCounterInventoryItemsListResponse--; | |
| 4205 return o; | |
| 4206 } | |
| 4207 | |
| 4208 checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { | |
| 4209 buildCounterInventoryItemsListResponse++; | |
| 4210 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4211 checkUnnamed3131(o.inventoryItems); | |
| 4212 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4213 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 4214 } | |
| 4215 buildCounterInventoryItemsListResponse--; | |
| 4216 } | |
| 4217 | |
| 4218 core.int buildCounterKeyValueTargetingExpression = 0; | |
| 4219 buildKeyValueTargetingExpression() { | |
| 4220 var o = new api.KeyValueTargetingExpression(); | |
| 4221 buildCounterKeyValueTargetingExpression++; | |
| 4222 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4223 o.expression = "foo"; | |
| 4224 } | |
| 4225 buildCounterKeyValueTargetingExpression--; | |
| 4226 return o; | |
| 4227 } | |
| 4228 | |
| 4229 checkKeyValueTargetingExpression(api.KeyValueTargetingExpression o) { | |
| 4230 buildCounterKeyValueTargetingExpression++; | |
| 4231 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4232 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4233 } | |
| 4234 buildCounterKeyValueTargetingExpression--; | |
| 4235 } | |
| 4236 | |
| 4237 core.int buildCounterLandingPage = 0; | |
| 4238 buildLandingPage() { | |
| 4239 var o = new api.LandingPage(); | |
| 4240 buildCounterLandingPage++; | |
| 4241 if (buildCounterLandingPage < 3) { | |
| 4242 o.default_ = true; | |
| 4243 o.id = "foo"; | |
| 4244 o.kind = "foo"; | |
| 4245 o.name = "foo"; | |
| 4246 o.url = "foo"; | |
| 4247 } | |
| 4248 buildCounterLandingPage--; | |
| 4249 return o; | |
| 4250 } | |
| 4251 | |
| 4252 checkLandingPage(api.LandingPage o) { | |
| 4253 buildCounterLandingPage++; | |
| 4254 if (buildCounterLandingPage < 3) { | |
| 4255 unittest.expect(o.default_, unittest.isTrue); | |
| 4256 unittest.expect(o.id, unittest.equals('foo')); | |
| 4257 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4258 unittest.expect(o.name, unittest.equals('foo')); | |
| 4259 unittest.expect(o.url, unittest.equals('foo')); | |
| 4260 } | |
| 4261 buildCounterLandingPage--; | |
| 4262 } | |
| 4263 | |
| 4264 buildUnnamed3132() { | |
| 4265 var o = new core.List<api.LandingPage>(); | |
| 4266 o.add(buildLandingPage()); | |
| 4267 o.add(buildLandingPage()); | |
| 4268 return o; | |
| 4269 } | |
| 4270 | |
| 4271 checkUnnamed3132(core.List<api.LandingPage> o) { | |
| 4272 unittest.expect(o, unittest.hasLength(2)); | |
| 4273 checkLandingPage(o[0]); | |
| 4274 checkLandingPage(o[1]); | |
| 4275 } | |
| 4276 | |
| 4277 core.int buildCounterLandingPagesListResponse = 0; | |
| 4278 buildLandingPagesListResponse() { | |
| 4279 var o = new api.LandingPagesListResponse(); | |
| 4280 buildCounterLandingPagesListResponse++; | |
| 4281 if (buildCounterLandingPagesListResponse < 3) { | |
| 4282 o.kind = "foo"; | |
| 4283 o.landingPages = buildUnnamed3132(); | |
| 4284 } | |
| 4285 buildCounterLandingPagesListResponse--; | |
| 4286 return o; | |
| 4287 } | |
| 4288 | |
| 4289 checkLandingPagesListResponse(api.LandingPagesListResponse o) { | |
| 4290 buildCounterLandingPagesListResponse++; | |
| 4291 if (buildCounterLandingPagesListResponse < 3) { | |
| 4292 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4293 checkUnnamed3132(o.landingPages); | |
| 4294 } | |
| 4295 buildCounterLandingPagesListResponse--; | |
| 4296 } | |
| 4297 | |
| 4298 core.int buildCounterLastModifiedInfo = 0; | |
| 4299 buildLastModifiedInfo() { | |
| 4300 var o = new api.LastModifiedInfo(); | |
| 4301 buildCounterLastModifiedInfo++; | |
| 4302 if (buildCounterLastModifiedInfo < 3) { | |
| 4303 o.time = "foo"; | |
| 4304 } | |
| 4305 buildCounterLastModifiedInfo--; | |
| 4306 return o; | |
| 4307 } | |
| 4308 | |
| 4309 checkLastModifiedInfo(api.LastModifiedInfo o) { | |
| 4310 buildCounterLastModifiedInfo++; | |
| 4311 if (buildCounterLastModifiedInfo < 3) { | |
| 4312 unittest.expect(o.time, unittest.equals('foo')); | |
| 4313 } | |
| 4314 buildCounterLastModifiedInfo--; | |
| 4315 } | |
| 4316 | |
| 4317 buildUnnamed3133() { | |
| 4318 var o = new core.List<api.ListPopulationTerm>(); | |
| 4319 o.add(buildListPopulationTerm()); | |
| 4320 o.add(buildListPopulationTerm()); | |
| 4321 return o; | |
| 4322 } | |
| 4323 | |
| 4324 checkUnnamed3133(core.List<api.ListPopulationTerm> o) { | |
| 4325 unittest.expect(o, unittest.hasLength(2)); | |
| 4326 checkListPopulationTerm(o[0]); | |
| 4327 checkListPopulationTerm(o[1]); | |
| 4328 } | |
| 4329 | |
| 4330 core.int buildCounterListPopulationClause = 0; | |
| 4331 buildListPopulationClause() { | |
| 4332 var o = new api.ListPopulationClause(); | |
| 4333 buildCounterListPopulationClause++; | |
| 4334 if (buildCounterListPopulationClause < 3) { | |
| 4335 o.terms = buildUnnamed3133(); | |
| 4336 } | |
| 4337 buildCounterListPopulationClause--; | |
| 4338 return o; | |
| 4339 } | |
| 4340 | |
| 4341 checkListPopulationClause(api.ListPopulationClause o) { | |
| 4342 buildCounterListPopulationClause++; | |
| 4343 if (buildCounterListPopulationClause < 3) { | |
| 4344 checkUnnamed3133(o.terms); | |
| 4345 } | |
| 4346 buildCounterListPopulationClause--; | |
| 4347 } | |
| 4348 | |
| 4349 buildUnnamed3134() { | |
| 4350 var o = new core.List<api.ListPopulationClause>(); | |
| 4351 o.add(buildListPopulationClause()); | |
| 4352 o.add(buildListPopulationClause()); | |
| 4353 return o; | |
| 4354 } | |
| 4355 | |
| 4356 checkUnnamed3134(core.List<api.ListPopulationClause> o) { | |
| 4357 unittest.expect(o, unittest.hasLength(2)); | |
| 4358 checkListPopulationClause(o[0]); | |
| 4359 checkListPopulationClause(o[1]); | |
| 4360 } | |
| 4361 | |
| 4362 core.int buildCounterListPopulationRule = 0; | |
| 4363 buildListPopulationRule() { | |
| 4364 var o = new api.ListPopulationRule(); | |
| 4365 buildCounterListPopulationRule++; | |
| 4366 if (buildCounterListPopulationRule < 3) { | |
| 4367 o.floodlightActivityId = "foo"; | |
| 4368 o.floodlightActivityName = "foo"; | |
| 4369 o.listPopulationClauses = buildUnnamed3134(); | |
| 4370 } | |
| 4371 buildCounterListPopulationRule--; | |
| 4372 return o; | |
| 4373 } | |
| 4374 | |
| 4375 checkListPopulationRule(api.ListPopulationRule o) { | |
| 4376 buildCounterListPopulationRule++; | |
| 4377 if (buildCounterListPopulationRule < 3) { | |
| 4378 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4379 unittest.expect(o.floodlightActivityName, unittest.equals('foo')); | |
| 4380 checkUnnamed3134(o.listPopulationClauses); | |
| 4381 } | |
| 4382 buildCounterListPopulationRule--; | |
| 4383 } | |
| 4384 | |
| 4385 core.int buildCounterListPopulationTerm = 0; | |
| 4386 buildListPopulationTerm() { | |
| 4387 var o = new api.ListPopulationTerm(); | |
| 4388 buildCounterListPopulationTerm++; | |
| 4389 if (buildCounterListPopulationTerm < 3) { | |
| 4390 o.contains = true; | |
| 4391 o.negation = true; | |
| 4392 o.operator = "foo"; | |
| 4393 o.remarketingListId = "foo"; | |
| 4394 o.type = "foo"; | |
| 4395 o.value = "foo"; | |
| 4396 o.variableFriendlyName = "foo"; | |
| 4397 o.variableName = "foo"; | |
| 4398 } | |
| 4399 buildCounterListPopulationTerm--; | |
| 4400 return o; | |
| 4401 } | |
| 4402 | |
| 4403 checkListPopulationTerm(api.ListPopulationTerm o) { | |
| 4404 buildCounterListPopulationTerm++; | |
| 4405 if (buildCounterListPopulationTerm < 3) { | |
| 4406 unittest.expect(o.contains, unittest.isTrue); | |
| 4407 unittest.expect(o.negation, unittest.isTrue); | |
| 4408 unittest.expect(o.operator, unittest.equals('foo')); | |
| 4409 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 4410 unittest.expect(o.type, unittest.equals('foo')); | |
| 4411 unittest.expect(o.value, unittest.equals('foo')); | |
| 4412 unittest.expect(o.variableFriendlyName, unittest.equals('foo')); | |
| 4413 unittest.expect(o.variableName, unittest.equals('foo')); | |
| 4414 } | |
| 4415 buildCounterListPopulationTerm--; | |
| 4416 } | |
| 4417 | |
| 4418 core.int buildCounterListTargetingExpression = 0; | |
| 4419 buildListTargetingExpression() { | |
| 4420 var o = new api.ListTargetingExpression(); | |
| 4421 buildCounterListTargetingExpression++; | |
| 4422 if (buildCounterListTargetingExpression < 3) { | |
| 4423 o.expression = "foo"; | |
| 4424 } | |
| 4425 buildCounterListTargetingExpression--; | |
| 4426 return o; | |
| 4427 } | |
| 4428 | |
| 4429 checkListTargetingExpression(api.ListTargetingExpression o) { | |
| 4430 buildCounterListTargetingExpression++; | |
| 4431 if (buildCounterListTargetingExpression < 3) { | |
| 4432 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4433 } | |
| 4434 buildCounterListTargetingExpression--; | |
| 4435 } | |
| 4436 | |
| 4437 core.int buildCounterLookbackConfiguration = 0; | |
| 4438 buildLookbackConfiguration() { | |
| 4439 var o = new api.LookbackConfiguration(); | |
| 4440 buildCounterLookbackConfiguration++; | |
| 4441 if (buildCounterLookbackConfiguration < 3) { | |
| 4442 o.clickDuration = 42; | |
| 4443 o.postImpressionActivitiesDuration = 42; | |
| 4444 } | |
| 4445 buildCounterLookbackConfiguration--; | |
| 4446 return o; | |
| 4447 } | |
| 4448 | |
| 4449 checkLookbackConfiguration(api.LookbackConfiguration o) { | |
| 4450 buildCounterLookbackConfiguration++; | |
| 4451 if (buildCounterLookbackConfiguration < 3) { | |
| 4452 unittest.expect(o.clickDuration, unittest.equals(42)); | |
| 4453 unittest.expect(o.postImpressionActivitiesDuration, unittest.equals(42)); | |
| 4454 } | |
| 4455 buildCounterLookbackConfiguration--; | |
| 4456 } | |
| 4457 | |
| 4458 core.int buildCounterMetric = 0; | |
| 4459 buildMetric() { | |
| 4460 var o = new api.Metric(); | |
| 4461 buildCounterMetric++; | |
| 4462 if (buildCounterMetric < 3) { | |
| 4463 o.kind = "foo"; | |
| 4464 o.name = "foo"; | |
| 4465 } | |
| 4466 buildCounterMetric--; | |
| 4467 return o; | |
| 4468 } | |
| 4469 | |
| 4470 checkMetric(api.Metric o) { | |
| 4471 buildCounterMetric++; | |
| 4472 if (buildCounterMetric < 3) { | |
| 4473 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4474 unittest.expect(o.name, unittest.equals('foo')); | |
| 4475 } | |
| 4476 buildCounterMetric--; | |
| 4477 } | |
| 4478 | |
| 4479 core.int buildCounterMetro = 0; | |
| 4480 buildMetro() { | |
| 4481 var o = new api.Metro(); | |
| 4482 buildCounterMetro++; | |
| 4483 if (buildCounterMetro < 3) { | |
| 4484 o.countryCode = "foo"; | |
| 4485 o.countryDartId = "foo"; | |
| 4486 o.dartId = "foo"; | |
| 4487 o.dmaId = "foo"; | |
| 4488 o.kind = "foo"; | |
| 4489 o.metroCode = "foo"; | |
| 4490 o.name = "foo"; | |
| 4491 } | |
| 4492 buildCounterMetro--; | |
| 4493 return o; | |
| 4494 } | |
| 4495 | |
| 4496 checkMetro(api.Metro o) { | |
| 4497 buildCounterMetro++; | |
| 4498 if (buildCounterMetro < 3) { | |
| 4499 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4500 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4501 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4502 unittest.expect(o.dmaId, unittest.equals('foo')); | |
| 4503 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4504 unittest.expect(o.metroCode, unittest.equals('foo')); | |
| 4505 unittest.expect(o.name, unittest.equals('foo')); | |
| 4506 } | |
| 4507 buildCounterMetro--; | |
| 4508 } | |
| 4509 | |
| 4510 buildUnnamed3135() { | |
| 4511 var o = new core.List<api.Metro>(); | |
| 4512 o.add(buildMetro()); | |
| 4513 o.add(buildMetro()); | |
| 4514 return o; | |
| 4515 } | |
| 4516 | |
| 4517 checkUnnamed3135(core.List<api.Metro> o) { | |
| 4518 unittest.expect(o, unittest.hasLength(2)); | |
| 4519 checkMetro(o[0]); | |
| 4520 checkMetro(o[1]); | |
| 4521 } | |
| 4522 | |
| 4523 core.int buildCounterMetrosListResponse = 0; | |
| 4524 buildMetrosListResponse() { | |
| 4525 var o = new api.MetrosListResponse(); | |
| 4526 buildCounterMetrosListResponse++; | |
| 4527 if (buildCounterMetrosListResponse < 3) { | |
| 4528 o.kind = "foo"; | |
| 4529 o.metros = buildUnnamed3135(); | |
| 4530 } | |
| 4531 buildCounterMetrosListResponse--; | |
| 4532 return o; | |
| 4533 } | |
| 4534 | |
| 4535 checkMetrosListResponse(api.MetrosListResponse o) { | |
| 4536 buildCounterMetrosListResponse++; | |
| 4537 if (buildCounterMetrosListResponse < 3) { | |
| 4538 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4539 checkUnnamed3135(o.metros); | |
| 4540 } | |
| 4541 buildCounterMetrosListResponse--; | |
| 4542 } | |
| 4543 | |
| 4544 core.int buildCounterMobileCarrier = 0; | |
| 4545 buildMobileCarrier() { | |
| 4546 var o = new api.MobileCarrier(); | |
| 4547 buildCounterMobileCarrier++; | |
| 4548 if (buildCounterMobileCarrier < 3) { | |
| 4549 o.countryCode = "foo"; | |
| 4550 o.countryDartId = "foo"; | |
| 4551 o.id = "foo"; | |
| 4552 o.kind = "foo"; | |
| 4553 o.name = "foo"; | |
| 4554 } | |
| 4555 buildCounterMobileCarrier--; | |
| 4556 return o; | |
| 4557 } | |
| 4558 | |
| 4559 checkMobileCarrier(api.MobileCarrier o) { | |
| 4560 buildCounterMobileCarrier++; | |
| 4561 if (buildCounterMobileCarrier < 3) { | |
| 4562 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4563 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4564 unittest.expect(o.id, unittest.equals('foo')); | |
| 4565 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4566 unittest.expect(o.name, unittest.equals('foo')); | |
| 4567 } | |
| 4568 buildCounterMobileCarrier--; | |
| 4569 } | |
| 4570 | |
| 4571 buildUnnamed3136() { | |
| 4572 var o = new core.List<api.MobileCarrier>(); | |
| 4573 o.add(buildMobileCarrier()); | |
| 4574 o.add(buildMobileCarrier()); | |
| 4575 return o; | |
| 4576 } | |
| 4577 | |
| 4578 checkUnnamed3136(core.List<api.MobileCarrier> o) { | |
| 4579 unittest.expect(o, unittest.hasLength(2)); | |
| 4580 checkMobileCarrier(o[0]); | |
| 4581 checkMobileCarrier(o[1]); | |
| 4582 } | |
| 4583 | |
| 4584 core.int buildCounterMobileCarriersListResponse = 0; | |
| 4585 buildMobileCarriersListResponse() { | |
| 4586 var o = new api.MobileCarriersListResponse(); | |
| 4587 buildCounterMobileCarriersListResponse++; | |
| 4588 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4589 o.kind = "foo"; | |
| 4590 o.mobileCarriers = buildUnnamed3136(); | |
| 4591 } | |
| 4592 buildCounterMobileCarriersListResponse--; | |
| 4593 return o; | |
| 4594 } | |
| 4595 | |
| 4596 checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { | |
| 4597 buildCounterMobileCarriersListResponse++; | |
| 4598 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4599 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4600 checkUnnamed3136(o.mobileCarriers); | |
| 4601 } | |
| 4602 buildCounterMobileCarriersListResponse--; | |
| 4603 } | |
| 4604 | |
| 4605 buildUnnamed3137() { | |
| 4606 var o = new core.List<core.String>(); | |
| 4607 o.add("foo"); | |
| 4608 o.add("foo"); | |
| 4609 return o; | |
| 4610 } | |
| 4611 | |
| 4612 checkUnnamed3137(core.List<core.String> o) { | |
| 4613 unittest.expect(o, unittest.hasLength(2)); | |
| 4614 unittest.expect(o[0], unittest.equals('foo')); | |
| 4615 unittest.expect(o[1], unittest.equals('foo')); | |
| 4616 } | |
| 4617 | |
| 4618 core.int buildCounterObjectFilter = 0; | |
| 4619 buildObjectFilter() { | |
| 4620 var o = new api.ObjectFilter(); | |
| 4621 buildCounterObjectFilter++; | |
| 4622 if (buildCounterObjectFilter < 3) { | |
| 4623 o.kind = "foo"; | |
| 4624 o.objectIds = buildUnnamed3137(); | |
| 4625 o.status = "foo"; | |
| 4626 } | |
| 4627 buildCounterObjectFilter--; | |
| 4628 return o; | |
| 4629 } | |
| 4630 | |
| 4631 checkObjectFilter(api.ObjectFilter o) { | |
| 4632 buildCounterObjectFilter++; | |
| 4633 if (buildCounterObjectFilter < 3) { | |
| 4634 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4635 checkUnnamed3137(o.objectIds); | |
| 4636 unittest.expect(o.status, unittest.equals('foo')); | |
| 4637 } | |
| 4638 buildCounterObjectFilter--; | |
| 4639 } | |
| 4640 | |
| 4641 core.int buildCounterOffsetPosition = 0; | |
| 4642 buildOffsetPosition() { | |
| 4643 var o = new api.OffsetPosition(); | |
| 4644 buildCounterOffsetPosition++; | |
| 4645 if (buildCounterOffsetPosition < 3) { | |
| 4646 o.left = 42; | |
| 4647 o.top = 42; | |
| 4648 } | |
| 4649 buildCounterOffsetPosition--; | |
| 4650 return o; | |
| 4651 } | |
| 4652 | |
| 4653 checkOffsetPosition(api.OffsetPosition o) { | |
| 4654 buildCounterOffsetPosition++; | |
| 4655 if (buildCounterOffsetPosition < 3) { | |
| 4656 unittest.expect(o.left, unittest.equals(42)); | |
| 4657 unittest.expect(o.top, unittest.equals(42)); | |
| 4658 } | |
| 4659 buildCounterOffsetPosition--; | |
| 4660 } | |
| 4661 | |
| 4662 core.int buildCounterOmnitureSettings = 0; | |
| 4663 buildOmnitureSettings() { | |
| 4664 var o = new api.OmnitureSettings(); | |
| 4665 buildCounterOmnitureSettings++; | |
| 4666 if (buildCounterOmnitureSettings < 3) { | |
| 4667 o.omnitureCostDataEnabled = true; | |
| 4668 o.omnitureIntegrationEnabled = true; | |
| 4669 } | |
| 4670 buildCounterOmnitureSettings--; | |
| 4671 return o; | |
| 4672 } | |
| 4673 | |
| 4674 checkOmnitureSettings(api.OmnitureSettings o) { | |
| 4675 buildCounterOmnitureSettings++; | |
| 4676 if (buildCounterOmnitureSettings < 3) { | |
| 4677 unittest.expect(o.omnitureCostDataEnabled, unittest.isTrue); | |
| 4678 unittest.expect(o.omnitureIntegrationEnabled, unittest.isTrue); | |
| 4679 } | |
| 4680 buildCounterOmnitureSettings--; | |
| 4681 } | |
| 4682 | |
| 4683 core.int buildCounterOperatingSystem = 0; | |
| 4684 buildOperatingSystem() { | |
| 4685 var o = new api.OperatingSystem(); | |
| 4686 buildCounterOperatingSystem++; | |
| 4687 if (buildCounterOperatingSystem < 3) { | |
| 4688 o.dartId = "foo"; | |
| 4689 o.desktop = true; | |
| 4690 o.kind = "foo"; | |
| 4691 o.mobile = true; | |
| 4692 o.name = "foo"; | |
| 4693 } | |
| 4694 buildCounterOperatingSystem--; | |
| 4695 return o; | |
| 4696 } | |
| 4697 | |
| 4698 checkOperatingSystem(api.OperatingSystem o) { | |
| 4699 buildCounterOperatingSystem++; | |
| 4700 if (buildCounterOperatingSystem < 3) { | |
| 4701 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4702 unittest.expect(o.desktop, unittest.isTrue); | |
| 4703 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4704 unittest.expect(o.mobile, unittest.isTrue); | |
| 4705 unittest.expect(o.name, unittest.equals('foo')); | |
| 4706 } | |
| 4707 buildCounterOperatingSystem--; | |
| 4708 } | |
| 4709 | |
| 4710 core.int buildCounterOperatingSystemVersion = 0; | |
| 4711 buildOperatingSystemVersion() { | |
| 4712 var o = new api.OperatingSystemVersion(); | |
| 4713 buildCounterOperatingSystemVersion++; | |
| 4714 if (buildCounterOperatingSystemVersion < 3) { | |
| 4715 o.id = "foo"; | |
| 4716 o.kind = "foo"; | |
| 4717 o.majorVersion = "foo"; | |
| 4718 o.minorVersion = "foo"; | |
| 4719 o.name = "foo"; | |
| 4720 o.operatingSystem = buildOperatingSystem(); | |
| 4721 } | |
| 4722 buildCounterOperatingSystemVersion--; | |
| 4723 return o; | |
| 4724 } | |
| 4725 | |
| 4726 checkOperatingSystemVersion(api.OperatingSystemVersion o) { | |
| 4727 buildCounterOperatingSystemVersion++; | |
| 4728 if (buildCounterOperatingSystemVersion < 3) { | |
| 4729 unittest.expect(o.id, unittest.equals('foo')); | |
| 4730 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4731 unittest.expect(o.majorVersion, unittest.equals('foo')); | |
| 4732 unittest.expect(o.minorVersion, unittest.equals('foo')); | |
| 4733 unittest.expect(o.name, unittest.equals('foo')); | |
| 4734 checkOperatingSystem(o.operatingSystem); | |
| 4735 } | |
| 4736 buildCounterOperatingSystemVersion--; | |
| 4737 } | |
| 4738 | |
| 4739 buildUnnamed3138() { | |
| 4740 var o = new core.List<api.OperatingSystemVersion>(); | |
| 4741 o.add(buildOperatingSystemVersion()); | |
| 4742 o.add(buildOperatingSystemVersion()); | |
| 4743 return o; | |
| 4744 } | |
| 4745 | |
| 4746 checkUnnamed3138(core.List<api.OperatingSystemVersion> o) { | |
| 4747 unittest.expect(o, unittest.hasLength(2)); | |
| 4748 checkOperatingSystemVersion(o[0]); | |
| 4749 checkOperatingSystemVersion(o[1]); | |
| 4750 } | |
| 4751 | |
| 4752 core.int buildCounterOperatingSystemVersionsListResponse = 0; | |
| 4753 buildOperatingSystemVersionsListResponse() { | |
| 4754 var o = new api.OperatingSystemVersionsListResponse(); | |
| 4755 buildCounterOperatingSystemVersionsListResponse++; | |
| 4756 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4757 o.kind = "foo"; | |
| 4758 o.operatingSystemVersions = buildUnnamed3138(); | |
| 4759 } | |
| 4760 buildCounterOperatingSystemVersionsListResponse--; | |
| 4761 return o; | |
| 4762 } | |
| 4763 | |
| 4764 checkOperatingSystemVersionsListResponse(api.OperatingSystemVersionsListResponse
o) { | |
| 4765 buildCounterOperatingSystemVersionsListResponse++; | |
| 4766 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4767 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4768 checkUnnamed3138(o.operatingSystemVersions); | |
| 4769 } | |
| 4770 buildCounterOperatingSystemVersionsListResponse--; | |
| 4771 } | |
| 4772 | |
| 4773 buildUnnamed3139() { | |
| 4774 var o = new core.List<api.OperatingSystem>(); | |
| 4775 o.add(buildOperatingSystem()); | |
| 4776 o.add(buildOperatingSystem()); | |
| 4777 return o; | |
| 4778 } | |
| 4779 | |
| 4780 checkUnnamed3139(core.List<api.OperatingSystem> o) { | |
| 4781 unittest.expect(o, unittest.hasLength(2)); | |
| 4782 checkOperatingSystem(o[0]); | |
| 4783 checkOperatingSystem(o[1]); | |
| 4784 } | |
| 4785 | |
| 4786 core.int buildCounterOperatingSystemsListResponse = 0; | |
| 4787 buildOperatingSystemsListResponse() { | |
| 4788 var o = new api.OperatingSystemsListResponse(); | |
| 4789 buildCounterOperatingSystemsListResponse++; | |
| 4790 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4791 o.kind = "foo"; | |
| 4792 o.operatingSystems = buildUnnamed3139(); | |
| 4793 } | |
| 4794 buildCounterOperatingSystemsListResponse--; | |
| 4795 return o; | |
| 4796 } | |
| 4797 | |
| 4798 checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { | |
| 4799 buildCounterOperatingSystemsListResponse++; | |
| 4800 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4801 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4802 checkUnnamed3139(o.operatingSystems); | |
| 4803 } | |
| 4804 buildCounterOperatingSystemsListResponse--; | |
| 4805 } | |
| 4806 | |
| 4807 core.int buildCounterOptimizationActivity = 0; | |
| 4808 buildOptimizationActivity() { | |
| 4809 var o = new api.OptimizationActivity(); | |
| 4810 buildCounterOptimizationActivity++; | |
| 4811 if (buildCounterOptimizationActivity < 3) { | |
| 4812 o.floodlightActivityId = "foo"; | |
| 4813 o.floodlightActivityIdDimensionValue = buildDimensionValue(); | |
| 4814 o.weight = 42; | |
| 4815 } | |
| 4816 buildCounterOptimizationActivity--; | |
| 4817 return o; | |
| 4818 } | |
| 4819 | |
| 4820 checkOptimizationActivity(api.OptimizationActivity o) { | |
| 4821 buildCounterOptimizationActivity++; | |
| 4822 if (buildCounterOptimizationActivity < 3) { | |
| 4823 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4824 checkDimensionValue(o.floodlightActivityIdDimensionValue); | |
| 4825 unittest.expect(o.weight, unittest.equals(42)); | |
| 4826 } | |
| 4827 buildCounterOptimizationActivity--; | |
| 4828 } | |
| 4829 | |
| 4830 buildUnnamed3140() { | |
| 4831 var o = new core.List<core.String>(); | |
| 4832 o.add("foo"); | |
| 4833 o.add("foo"); | |
| 4834 return o; | |
| 4835 } | |
| 4836 | |
| 4837 checkUnnamed3140(core.List<core.String> o) { | |
| 4838 unittest.expect(o, unittest.hasLength(2)); | |
| 4839 unittest.expect(o[0], unittest.equals('foo')); | |
| 4840 unittest.expect(o[1], unittest.equals('foo')); | |
| 4841 } | |
| 4842 | |
| 4843 buildUnnamed3141() { | |
| 4844 var o = new core.List<api.OrderContact>(); | |
| 4845 o.add(buildOrderContact()); | |
| 4846 o.add(buildOrderContact()); | |
| 4847 return o; | |
| 4848 } | |
| 4849 | |
| 4850 checkUnnamed3141(core.List<api.OrderContact> o) { | |
| 4851 unittest.expect(o, unittest.hasLength(2)); | |
| 4852 checkOrderContact(o[0]); | |
| 4853 checkOrderContact(o[1]); | |
| 4854 } | |
| 4855 | |
| 4856 buildUnnamed3142() { | |
| 4857 var o = new core.List<core.String>(); | |
| 4858 o.add("foo"); | |
| 4859 o.add("foo"); | |
| 4860 return o; | |
| 4861 } | |
| 4862 | |
| 4863 checkUnnamed3142(core.List<core.String> o) { | |
| 4864 unittest.expect(o, unittest.hasLength(2)); | |
| 4865 unittest.expect(o[0], unittest.equals('foo')); | |
| 4866 unittest.expect(o[1], unittest.equals('foo')); | |
| 4867 } | |
| 4868 | |
| 4869 buildUnnamed3143() { | |
| 4870 var o = new core.List<core.String>(); | |
| 4871 o.add("foo"); | |
| 4872 o.add("foo"); | |
| 4873 return o; | |
| 4874 } | |
| 4875 | |
| 4876 checkUnnamed3143(core.List<core.String> o) { | |
| 4877 unittest.expect(o, unittest.hasLength(2)); | |
| 4878 unittest.expect(o[0], unittest.equals('foo')); | |
| 4879 unittest.expect(o[1], unittest.equals('foo')); | |
| 4880 } | |
| 4881 | |
| 4882 core.int buildCounterOrder = 0; | |
| 4883 buildOrder() { | |
| 4884 var o = new api.Order(); | |
| 4885 buildCounterOrder++; | |
| 4886 if (buildCounterOrder < 3) { | |
| 4887 o.accountId = "foo"; | |
| 4888 o.advertiserId = "foo"; | |
| 4889 o.approverUserProfileIds = buildUnnamed3140(); | |
| 4890 o.buyerInvoiceId = "foo"; | |
| 4891 o.buyerOrganizationName = "foo"; | |
| 4892 o.comments = "foo"; | |
| 4893 o.contacts = buildUnnamed3141(); | |
| 4894 o.id = "foo"; | |
| 4895 o.kind = "foo"; | |
| 4896 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4897 o.name = "foo"; | |
| 4898 o.notes = "foo"; | |
| 4899 o.planningTermId = "foo"; | |
| 4900 o.projectId = "foo"; | |
| 4901 o.sellerOrderId = "foo"; | |
| 4902 o.sellerOrganizationName = "foo"; | |
| 4903 o.siteId = buildUnnamed3142(); | |
| 4904 o.siteNames = buildUnnamed3143(); | |
| 4905 o.subaccountId = "foo"; | |
| 4906 o.termsAndConditions = "foo"; | |
| 4907 } | |
| 4908 buildCounterOrder--; | |
| 4909 return o; | |
| 4910 } | |
| 4911 | |
| 4912 checkOrder(api.Order o) { | |
| 4913 buildCounterOrder++; | |
| 4914 if (buildCounterOrder < 3) { | |
| 4915 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4916 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4917 checkUnnamed3140(o.approverUserProfileIds); | |
| 4918 unittest.expect(o.buyerInvoiceId, unittest.equals('foo')); | |
| 4919 unittest.expect(o.buyerOrganizationName, unittest.equals('foo')); | |
| 4920 unittest.expect(o.comments, unittest.equals('foo')); | |
| 4921 checkUnnamed3141(o.contacts); | |
| 4922 unittest.expect(o.id, unittest.equals('foo')); | |
| 4923 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4924 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4925 unittest.expect(o.name, unittest.equals('foo')); | |
| 4926 unittest.expect(o.notes, unittest.equals('foo')); | |
| 4927 unittest.expect(o.planningTermId, unittest.equals('foo')); | |
| 4928 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4929 unittest.expect(o.sellerOrderId, unittest.equals('foo')); | |
| 4930 unittest.expect(o.sellerOrganizationName, unittest.equals('foo')); | |
| 4931 checkUnnamed3142(o.siteId); | |
| 4932 checkUnnamed3143(o.siteNames); | |
| 4933 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4934 unittest.expect(o.termsAndConditions, unittest.equals('foo')); | |
| 4935 } | |
| 4936 buildCounterOrder--; | |
| 4937 } | |
| 4938 | |
| 4939 core.int buildCounterOrderContact = 0; | |
| 4940 buildOrderContact() { | |
| 4941 var o = new api.OrderContact(); | |
| 4942 buildCounterOrderContact++; | |
| 4943 if (buildCounterOrderContact < 3) { | |
| 4944 o.contactInfo = "foo"; | |
| 4945 o.contactName = "foo"; | |
| 4946 o.contactTitle = "foo"; | |
| 4947 o.contactType = "foo"; | |
| 4948 o.signatureUserProfileId = "foo"; | |
| 4949 } | |
| 4950 buildCounterOrderContact--; | |
| 4951 return o; | |
| 4952 } | |
| 4953 | |
| 4954 checkOrderContact(api.OrderContact o) { | |
| 4955 buildCounterOrderContact++; | |
| 4956 if (buildCounterOrderContact < 3) { | |
| 4957 unittest.expect(o.contactInfo, unittest.equals('foo')); | |
| 4958 unittest.expect(o.contactName, unittest.equals('foo')); | |
| 4959 unittest.expect(o.contactTitle, unittest.equals('foo')); | |
| 4960 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 4961 unittest.expect(o.signatureUserProfileId, unittest.equals('foo')); | |
| 4962 } | |
| 4963 buildCounterOrderContact--; | |
| 4964 } | |
| 4965 | |
| 4966 buildUnnamed3144() { | |
| 4967 var o = new core.List<core.String>(); | |
| 4968 o.add("foo"); | |
| 4969 o.add("foo"); | |
| 4970 return o; | |
| 4971 } | |
| 4972 | |
| 4973 checkUnnamed3144(core.List<core.String> o) { | |
| 4974 unittest.expect(o, unittest.hasLength(2)); | |
| 4975 unittest.expect(o[0], unittest.equals('foo')); | |
| 4976 unittest.expect(o[1], unittest.equals('foo')); | |
| 4977 } | |
| 4978 | |
| 4979 buildUnnamed3145() { | |
| 4980 var o = new core.List<core.String>(); | |
| 4981 o.add("foo"); | |
| 4982 o.add("foo"); | |
| 4983 return o; | |
| 4984 } | |
| 4985 | |
| 4986 checkUnnamed3145(core.List<core.String> o) { | |
| 4987 unittest.expect(o, unittest.hasLength(2)); | |
| 4988 unittest.expect(o[0], unittest.equals('foo')); | |
| 4989 unittest.expect(o[1], unittest.equals('foo')); | |
| 4990 } | |
| 4991 | |
| 4992 core.int buildCounterOrderDocument = 0; | |
| 4993 buildOrderDocument() { | |
| 4994 var o = new api.OrderDocument(); | |
| 4995 buildCounterOrderDocument++; | |
| 4996 if (buildCounterOrderDocument < 3) { | |
| 4997 o.accountId = "foo"; | |
| 4998 o.advertiserId = "foo"; | |
| 4999 o.amendedOrderDocumentId = "foo"; | |
| 5000 o.approvedByUserProfileIds = buildUnnamed3144(); | |
| 5001 o.cancelled = true; | |
| 5002 o.createdInfo = buildLastModifiedInfo(); | |
| 5003 o.effectiveDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5004 o.id = "foo"; | |
| 5005 o.kind = "foo"; | |
| 5006 o.lastSentRecipients = buildUnnamed3145(); | |
| 5007 o.lastSentTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 5008 o.orderId = "foo"; | |
| 5009 o.projectId = "foo"; | |
| 5010 o.signed = true; | |
| 5011 o.subaccountId = "foo"; | |
| 5012 o.title = "foo"; | |
| 5013 o.type = "foo"; | |
| 5014 } | |
| 5015 buildCounterOrderDocument--; | |
| 5016 return o; | |
| 5017 } | |
| 5018 | |
| 5019 checkOrderDocument(api.OrderDocument o) { | |
| 5020 buildCounterOrderDocument++; | |
| 5021 if (buildCounterOrderDocument < 3) { | |
| 5022 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5023 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5024 unittest.expect(o.amendedOrderDocumentId, unittest.equals('foo')); | |
| 5025 checkUnnamed3144(o.approvedByUserProfileIds); | |
| 5026 unittest.expect(o.cancelled, unittest.isTrue); | |
| 5027 checkLastModifiedInfo(o.createdInfo); | |
| 5028 unittest.expect(o.effectiveDate, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | |
| 5029 unittest.expect(o.id, unittest.equals('foo')); | |
| 5030 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5031 checkUnnamed3145(o.lastSentRecipients); | |
| 5032 unittest.expect(o.lastSentTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | |
| 5033 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 5034 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 5035 unittest.expect(o.signed, unittest.isTrue); | |
| 5036 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5037 unittest.expect(o.title, unittest.equals('foo')); | |
| 5038 unittest.expect(o.type, unittest.equals('foo')); | |
| 5039 } | |
| 5040 buildCounterOrderDocument--; | |
| 5041 } | |
| 5042 | |
| 5043 buildUnnamed3146() { | |
| 5044 var o = new core.List<api.OrderDocument>(); | |
| 5045 o.add(buildOrderDocument()); | |
| 5046 o.add(buildOrderDocument()); | |
| 5047 return o; | |
| 5048 } | |
| 5049 | |
| 5050 checkUnnamed3146(core.List<api.OrderDocument> o) { | |
| 5051 unittest.expect(o, unittest.hasLength(2)); | |
| 5052 checkOrderDocument(o[0]); | |
| 5053 checkOrderDocument(o[1]); | |
| 5054 } | |
| 5055 | |
| 5056 core.int buildCounterOrderDocumentsListResponse = 0; | |
| 5057 buildOrderDocumentsListResponse() { | |
| 5058 var o = new api.OrderDocumentsListResponse(); | |
| 5059 buildCounterOrderDocumentsListResponse++; | |
| 5060 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5061 o.kind = "foo"; | |
| 5062 o.nextPageToken = "foo"; | |
| 5063 o.orderDocuments = buildUnnamed3146(); | |
| 5064 } | |
| 5065 buildCounterOrderDocumentsListResponse--; | |
| 5066 return o; | |
| 5067 } | |
| 5068 | |
| 5069 checkOrderDocumentsListResponse(api.OrderDocumentsListResponse o) { | |
| 5070 buildCounterOrderDocumentsListResponse++; | |
| 5071 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5072 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5073 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5074 checkUnnamed3146(o.orderDocuments); | |
| 5075 } | |
| 5076 buildCounterOrderDocumentsListResponse--; | |
| 5077 } | |
| 5078 | |
| 5079 buildUnnamed3147() { | |
| 5080 var o = new core.List<api.Order>(); | |
| 5081 o.add(buildOrder()); | |
| 5082 o.add(buildOrder()); | |
| 5083 return o; | |
| 5084 } | |
| 5085 | |
| 5086 checkUnnamed3147(core.List<api.Order> o) { | |
| 5087 unittest.expect(o, unittest.hasLength(2)); | |
| 5088 checkOrder(o[0]); | |
| 5089 checkOrder(o[1]); | |
| 5090 } | |
| 5091 | |
| 5092 core.int buildCounterOrdersListResponse = 0; | |
| 5093 buildOrdersListResponse() { | |
| 5094 var o = new api.OrdersListResponse(); | |
| 5095 buildCounterOrdersListResponse++; | |
| 5096 if (buildCounterOrdersListResponse < 3) { | |
| 5097 o.kind = "foo"; | |
| 5098 o.nextPageToken = "foo"; | |
| 5099 o.orders = buildUnnamed3147(); | |
| 5100 } | |
| 5101 buildCounterOrdersListResponse--; | |
| 5102 return o; | |
| 5103 } | |
| 5104 | |
| 5105 checkOrdersListResponse(api.OrdersListResponse o) { | |
| 5106 buildCounterOrdersListResponse++; | |
| 5107 if (buildCounterOrdersListResponse < 3) { | |
| 5108 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5109 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5110 checkUnnamed3147(o.orders); | |
| 5111 } | |
| 5112 buildCounterOrdersListResponse--; | |
| 5113 } | |
| 5114 | |
| 5115 buildUnnamed3148() { | |
| 5116 var o = new core.List<api.Dimension>(); | |
| 5117 o.add(buildDimension()); | |
| 5118 o.add(buildDimension()); | |
| 5119 return o; | |
| 5120 } | |
| 5121 | |
| 5122 checkUnnamed3148(core.List<api.Dimension> o) { | |
| 5123 unittest.expect(o, unittest.hasLength(2)); | |
| 5124 checkDimension(o[0]); | |
| 5125 checkDimension(o[1]); | |
| 5126 } | |
| 5127 | |
| 5128 buildUnnamed3149() { | |
| 5129 var o = new core.List<api.Dimension>(); | |
| 5130 o.add(buildDimension()); | |
| 5131 o.add(buildDimension()); | |
| 5132 return o; | |
| 5133 } | |
| 5134 | |
| 5135 checkUnnamed3149(core.List<api.Dimension> o) { | |
| 5136 unittest.expect(o, unittest.hasLength(2)); | |
| 5137 checkDimension(o[0]); | |
| 5138 checkDimension(o[1]); | |
| 5139 } | |
| 5140 | |
| 5141 buildUnnamed3150() { | |
| 5142 var o = new core.List<api.Metric>(); | |
| 5143 o.add(buildMetric()); | |
| 5144 o.add(buildMetric()); | |
| 5145 return o; | |
| 5146 } | |
| 5147 | |
| 5148 checkUnnamed3150(core.List<api.Metric> o) { | |
| 5149 unittest.expect(o, unittest.hasLength(2)); | |
| 5150 checkMetric(o[0]); | |
| 5151 checkMetric(o[1]); | |
| 5152 } | |
| 5153 | |
| 5154 buildUnnamed3151() { | |
| 5155 var o = new core.List<api.Dimension>(); | |
| 5156 o.add(buildDimension()); | |
| 5157 o.add(buildDimension()); | |
| 5158 return o; | |
| 5159 } | |
| 5160 | |
| 5161 checkUnnamed3151(core.List<api.Dimension> o) { | |
| 5162 unittest.expect(o, unittest.hasLength(2)); | |
| 5163 checkDimension(o[0]); | |
| 5164 checkDimension(o[1]); | |
| 5165 } | |
| 5166 | |
| 5167 core.int buildCounterPathToConversionReportCompatibleFields = 0; | |
| 5168 buildPathToConversionReportCompatibleFields() { | |
| 5169 var o = new api.PathToConversionReportCompatibleFields(); | |
| 5170 buildCounterPathToConversionReportCompatibleFields++; | |
| 5171 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5172 o.conversionDimensions = buildUnnamed3148(); | |
| 5173 o.customFloodlightVariables = buildUnnamed3149(); | |
| 5174 o.kind = "foo"; | |
| 5175 o.metrics = buildUnnamed3150(); | |
| 5176 o.perInteractionDimensions = buildUnnamed3151(); | |
| 5177 } | |
| 5178 buildCounterPathToConversionReportCompatibleFields--; | |
| 5179 return o; | |
| 5180 } | |
| 5181 | |
| 5182 checkPathToConversionReportCompatibleFields(api.PathToConversionReportCompatible
Fields o) { | |
| 5183 buildCounterPathToConversionReportCompatibleFields++; | |
| 5184 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5185 checkUnnamed3148(o.conversionDimensions); | |
| 5186 checkUnnamed3149(o.customFloodlightVariables); | |
| 5187 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5188 checkUnnamed3150(o.metrics); | |
| 5189 checkUnnamed3151(o.perInteractionDimensions); | |
| 5190 } | |
| 5191 buildCounterPathToConversionReportCompatibleFields--; | |
| 5192 } | |
| 5193 | |
| 5194 buildUnnamed3152() { | |
| 5195 var o = new core.List<core.String>(); | |
| 5196 o.add("foo"); | |
| 5197 o.add("foo"); | |
| 5198 return o; | |
| 5199 } | |
| 5200 | |
| 5201 checkUnnamed3152(core.List<core.String> o) { | |
| 5202 unittest.expect(o, unittest.hasLength(2)); | |
| 5203 unittest.expect(o[0], unittest.equals('foo')); | |
| 5204 unittest.expect(o[1], unittest.equals('foo')); | |
| 5205 } | |
| 5206 | |
| 5207 core.int buildCounterPlacement = 0; | |
| 5208 buildPlacement() { | |
| 5209 var o = new api.Placement(); | |
| 5210 buildCounterPlacement++; | |
| 5211 if (buildCounterPlacement < 3) { | |
| 5212 o.accountId = "foo"; | |
| 5213 o.advertiserId = "foo"; | |
| 5214 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5215 o.archived = true; | |
| 5216 o.campaignId = "foo"; | |
| 5217 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5218 o.comment = "foo"; | |
| 5219 o.compatibility = "foo"; | |
| 5220 o.contentCategoryId = "foo"; | |
| 5221 o.createInfo = buildLastModifiedInfo(); | |
| 5222 o.directorySiteId = "foo"; | |
| 5223 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5224 o.externalId = "foo"; | |
| 5225 o.id = "foo"; | |
| 5226 o.idDimensionValue = buildDimensionValue(); | |
| 5227 o.keyName = "foo"; | |
| 5228 o.kind = "foo"; | |
| 5229 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5230 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 5231 o.name = "foo"; | |
| 5232 o.paymentApproved = true; | |
| 5233 o.paymentSource = "foo"; | |
| 5234 o.placementGroupId = "foo"; | |
| 5235 o.placementGroupIdDimensionValue = buildDimensionValue(); | |
| 5236 o.placementStrategyId = "foo"; | |
| 5237 o.pricingSchedule = buildPricingSchedule(); | |
| 5238 o.primary = true; | |
| 5239 o.publisherUpdateInfo = buildLastModifiedInfo(); | |
| 5240 o.siteId = "foo"; | |
| 5241 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5242 o.size = buildSize(); | |
| 5243 o.sslRequired = true; | |
| 5244 o.status = "foo"; | |
| 5245 o.subaccountId = "foo"; | |
| 5246 o.tagFormats = buildUnnamed3152(); | |
| 5247 o.tagSetting = buildTagSetting(); | |
| 5248 } | |
| 5249 buildCounterPlacement--; | |
| 5250 return o; | |
| 5251 } | |
| 5252 | |
| 5253 checkPlacement(api.Placement o) { | |
| 5254 buildCounterPlacement++; | |
| 5255 if (buildCounterPlacement < 3) { | |
| 5256 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5257 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5258 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5259 unittest.expect(o.archived, unittest.isTrue); | |
| 5260 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5261 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5262 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5263 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 5264 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5265 checkLastModifiedInfo(o.createInfo); | |
| 5266 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5267 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5268 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5269 unittest.expect(o.id, unittest.equals('foo')); | |
| 5270 checkDimensionValue(o.idDimensionValue); | |
| 5271 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 5272 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5273 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5274 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 5275 unittest.expect(o.name, unittest.equals('foo')); | |
| 5276 unittest.expect(o.paymentApproved, unittest.isTrue); | |
| 5277 unittest.expect(o.paymentSource, unittest.equals('foo')); | |
| 5278 unittest.expect(o.placementGroupId, unittest.equals('foo')); | |
| 5279 checkDimensionValue(o.placementGroupIdDimensionValue); | |
| 5280 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5281 checkPricingSchedule(o.pricingSchedule); | |
| 5282 unittest.expect(o.primary, unittest.isTrue); | |
| 5283 checkLastModifiedInfo(o.publisherUpdateInfo); | |
| 5284 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5285 checkDimensionValue(o.siteIdDimensionValue); | |
| 5286 checkSize(o.size); | |
| 5287 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5288 unittest.expect(o.status, unittest.equals('foo')); | |
| 5289 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5290 checkUnnamed3152(o.tagFormats); | |
| 5291 checkTagSetting(o.tagSetting); | |
| 5292 } | |
| 5293 buildCounterPlacement--; | |
| 5294 } | |
| 5295 | |
| 5296 core.int buildCounterPlacementAssignment = 0; | |
| 5297 buildPlacementAssignment() { | |
| 5298 var o = new api.PlacementAssignment(); | |
| 5299 buildCounterPlacementAssignment++; | |
| 5300 if (buildCounterPlacementAssignment < 3) { | |
| 5301 o.active = true; | |
| 5302 o.placementId = "foo"; | |
| 5303 o.placementIdDimensionValue = buildDimensionValue(); | |
| 5304 o.sslRequired = true; | |
| 5305 } | |
| 5306 buildCounterPlacementAssignment--; | |
| 5307 return o; | |
| 5308 } | |
| 5309 | |
| 5310 checkPlacementAssignment(api.PlacementAssignment o) { | |
| 5311 buildCounterPlacementAssignment++; | |
| 5312 if (buildCounterPlacementAssignment < 3) { | |
| 5313 unittest.expect(o.active, unittest.isTrue); | |
| 5314 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5315 checkDimensionValue(o.placementIdDimensionValue); | |
| 5316 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5317 } | |
| 5318 buildCounterPlacementAssignment--; | |
| 5319 } | |
| 5320 | |
| 5321 buildUnnamed3153() { | |
| 5322 var o = new core.List<core.String>(); | |
| 5323 o.add("foo"); | |
| 5324 o.add("foo"); | |
| 5325 return o; | |
| 5326 } | |
| 5327 | |
| 5328 checkUnnamed3153(core.List<core.String> o) { | |
| 5329 unittest.expect(o, unittest.hasLength(2)); | |
| 5330 unittest.expect(o[0], unittest.equals('foo')); | |
| 5331 unittest.expect(o[1], unittest.equals('foo')); | |
| 5332 } | |
| 5333 | |
| 5334 core.int buildCounterPlacementGroup = 0; | |
| 5335 buildPlacementGroup() { | |
| 5336 var o = new api.PlacementGroup(); | |
| 5337 buildCounterPlacementGroup++; | |
| 5338 if (buildCounterPlacementGroup < 3) { | |
| 5339 o.accountId = "foo"; | |
| 5340 o.advertiserId = "foo"; | |
| 5341 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5342 o.archived = true; | |
| 5343 o.campaignId = "foo"; | |
| 5344 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5345 o.childPlacementIds = buildUnnamed3153(); | |
| 5346 o.comment = "foo"; | |
| 5347 o.contentCategoryId = "foo"; | |
| 5348 o.createInfo = buildLastModifiedInfo(); | |
| 5349 o.directorySiteId = "foo"; | |
| 5350 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5351 o.externalId = "foo"; | |
| 5352 o.id = "foo"; | |
| 5353 o.idDimensionValue = buildDimensionValue(); | |
| 5354 o.kind = "foo"; | |
| 5355 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5356 o.name = "foo"; | |
| 5357 o.placementGroupType = "foo"; | |
| 5358 o.placementStrategyId = "foo"; | |
| 5359 o.pricingSchedule = buildPricingSchedule(); | |
| 5360 o.primaryPlacementId = "foo"; | |
| 5361 o.primaryPlacementIdDimensionValue = buildDimensionValue(); | |
| 5362 o.siteId = "foo"; | |
| 5363 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5364 o.subaccountId = "foo"; | |
| 5365 } | |
| 5366 buildCounterPlacementGroup--; | |
| 5367 return o; | |
| 5368 } | |
| 5369 | |
| 5370 checkPlacementGroup(api.PlacementGroup o) { | |
| 5371 buildCounterPlacementGroup++; | |
| 5372 if (buildCounterPlacementGroup < 3) { | |
| 5373 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5374 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5375 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5376 unittest.expect(o.archived, unittest.isTrue); | |
| 5377 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5378 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5379 checkUnnamed3153(o.childPlacementIds); | |
| 5380 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5381 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5382 checkLastModifiedInfo(o.createInfo); | |
| 5383 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5384 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5385 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5386 unittest.expect(o.id, unittest.equals('foo')); | |
| 5387 checkDimensionValue(o.idDimensionValue); | |
| 5388 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5389 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5390 unittest.expect(o.name, unittest.equals('foo')); | |
| 5391 unittest.expect(o.placementGroupType, unittest.equals('foo')); | |
| 5392 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5393 checkPricingSchedule(o.pricingSchedule); | |
| 5394 unittest.expect(o.primaryPlacementId, unittest.equals('foo')); | |
| 5395 checkDimensionValue(o.primaryPlacementIdDimensionValue); | |
| 5396 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5397 checkDimensionValue(o.siteIdDimensionValue); | |
| 5398 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5399 } | |
| 5400 buildCounterPlacementGroup--; | |
| 5401 } | |
| 5402 | |
| 5403 buildUnnamed3154() { | |
| 5404 var o = new core.List<api.PlacementGroup>(); | |
| 5405 o.add(buildPlacementGroup()); | |
| 5406 o.add(buildPlacementGroup()); | |
| 5407 return o; | |
| 5408 } | |
| 5409 | |
| 5410 checkUnnamed3154(core.List<api.PlacementGroup> o) { | |
| 5411 unittest.expect(o, unittest.hasLength(2)); | |
| 5412 checkPlacementGroup(o[0]); | |
| 5413 checkPlacementGroup(o[1]); | |
| 5414 } | |
| 5415 | |
| 5416 core.int buildCounterPlacementGroupsListResponse = 0; | |
| 5417 buildPlacementGroupsListResponse() { | |
| 5418 var o = new api.PlacementGroupsListResponse(); | |
| 5419 buildCounterPlacementGroupsListResponse++; | |
| 5420 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5421 o.kind = "foo"; | |
| 5422 o.nextPageToken = "foo"; | |
| 5423 o.placementGroups = buildUnnamed3154(); | |
| 5424 } | |
| 5425 buildCounterPlacementGroupsListResponse--; | |
| 5426 return o; | |
| 5427 } | |
| 5428 | |
| 5429 checkPlacementGroupsListResponse(api.PlacementGroupsListResponse o) { | |
| 5430 buildCounterPlacementGroupsListResponse++; | |
| 5431 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5432 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5433 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5434 checkUnnamed3154(o.placementGroups); | |
| 5435 } | |
| 5436 buildCounterPlacementGroupsListResponse--; | |
| 5437 } | |
| 5438 | |
| 5439 buildUnnamed3155() { | |
| 5440 var o = new core.List<api.PlacementStrategy>(); | |
| 5441 o.add(buildPlacementStrategy()); | |
| 5442 o.add(buildPlacementStrategy()); | |
| 5443 return o; | |
| 5444 } | |
| 5445 | |
| 5446 checkUnnamed3155(core.List<api.PlacementStrategy> o) { | |
| 5447 unittest.expect(o, unittest.hasLength(2)); | |
| 5448 checkPlacementStrategy(o[0]); | |
| 5449 checkPlacementStrategy(o[1]); | |
| 5450 } | |
| 5451 | |
| 5452 core.int buildCounterPlacementStrategiesListResponse = 0; | |
| 5453 buildPlacementStrategiesListResponse() { | |
| 5454 var o = new api.PlacementStrategiesListResponse(); | |
| 5455 buildCounterPlacementStrategiesListResponse++; | |
| 5456 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5457 o.kind = "foo"; | |
| 5458 o.nextPageToken = "foo"; | |
| 5459 o.placementStrategies = buildUnnamed3155(); | |
| 5460 } | |
| 5461 buildCounterPlacementStrategiesListResponse--; | |
| 5462 return o; | |
| 5463 } | |
| 5464 | |
| 5465 checkPlacementStrategiesListResponse(api.PlacementStrategiesListResponse o) { | |
| 5466 buildCounterPlacementStrategiesListResponse++; | |
| 5467 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5468 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5469 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5470 checkUnnamed3155(o.placementStrategies); | |
| 5471 } | |
| 5472 buildCounterPlacementStrategiesListResponse--; | |
| 5473 } | |
| 5474 | |
| 5475 core.int buildCounterPlacementStrategy = 0; | |
| 5476 buildPlacementStrategy() { | |
| 5477 var o = new api.PlacementStrategy(); | |
| 5478 buildCounterPlacementStrategy++; | |
| 5479 if (buildCounterPlacementStrategy < 3) { | |
| 5480 o.accountId = "foo"; | |
| 5481 o.id = "foo"; | |
| 5482 o.kind = "foo"; | |
| 5483 o.name = "foo"; | |
| 5484 } | |
| 5485 buildCounterPlacementStrategy--; | |
| 5486 return o; | |
| 5487 } | |
| 5488 | |
| 5489 checkPlacementStrategy(api.PlacementStrategy o) { | |
| 5490 buildCounterPlacementStrategy++; | |
| 5491 if (buildCounterPlacementStrategy < 3) { | |
| 5492 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5493 unittest.expect(o.id, unittest.equals('foo')); | |
| 5494 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5495 unittest.expect(o.name, unittest.equals('foo')); | |
| 5496 } | |
| 5497 buildCounterPlacementStrategy--; | |
| 5498 } | |
| 5499 | |
| 5500 buildUnnamed3156() { | |
| 5501 var o = new core.List<api.TagData>(); | |
| 5502 o.add(buildTagData()); | |
| 5503 o.add(buildTagData()); | |
| 5504 return o; | |
| 5505 } | |
| 5506 | |
| 5507 checkUnnamed3156(core.List<api.TagData> o) { | |
| 5508 unittest.expect(o, unittest.hasLength(2)); | |
| 5509 checkTagData(o[0]); | |
| 5510 checkTagData(o[1]); | |
| 5511 } | |
| 5512 | |
| 5513 core.int buildCounterPlacementTag = 0; | |
| 5514 buildPlacementTag() { | |
| 5515 var o = new api.PlacementTag(); | |
| 5516 buildCounterPlacementTag++; | |
| 5517 if (buildCounterPlacementTag < 3) { | |
| 5518 o.placementId = "foo"; | |
| 5519 o.tagDatas = buildUnnamed3156(); | |
| 5520 } | |
| 5521 buildCounterPlacementTag--; | |
| 5522 return o; | |
| 5523 } | |
| 5524 | |
| 5525 checkPlacementTag(api.PlacementTag o) { | |
| 5526 buildCounterPlacementTag++; | |
| 5527 if (buildCounterPlacementTag < 3) { | |
| 5528 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5529 checkUnnamed3156(o.tagDatas); | |
| 5530 } | |
| 5531 buildCounterPlacementTag--; | |
| 5532 } | |
| 5533 | |
| 5534 buildUnnamed3157() { | |
| 5535 var o = new core.List<api.PlacementTag>(); | |
| 5536 o.add(buildPlacementTag()); | |
| 5537 o.add(buildPlacementTag()); | |
| 5538 return o; | |
| 5539 } | |
| 5540 | |
| 5541 checkUnnamed3157(core.List<api.PlacementTag> o) { | |
| 5542 unittest.expect(o, unittest.hasLength(2)); | |
| 5543 checkPlacementTag(o[0]); | |
| 5544 checkPlacementTag(o[1]); | |
| 5545 } | |
| 5546 | |
| 5547 core.int buildCounterPlacementsGenerateTagsResponse = 0; | |
| 5548 buildPlacementsGenerateTagsResponse() { | |
| 5549 var o = new api.PlacementsGenerateTagsResponse(); | |
| 5550 buildCounterPlacementsGenerateTagsResponse++; | |
| 5551 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5552 o.kind = "foo"; | |
| 5553 o.placementTags = buildUnnamed3157(); | |
| 5554 } | |
| 5555 buildCounterPlacementsGenerateTagsResponse--; | |
| 5556 return o; | |
| 5557 } | |
| 5558 | |
| 5559 checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { | |
| 5560 buildCounterPlacementsGenerateTagsResponse++; | |
| 5561 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5562 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5563 checkUnnamed3157(o.placementTags); | |
| 5564 } | |
| 5565 buildCounterPlacementsGenerateTagsResponse--; | |
| 5566 } | |
| 5567 | |
| 5568 buildUnnamed3158() { | |
| 5569 var o = new core.List<api.Placement>(); | |
| 5570 o.add(buildPlacement()); | |
| 5571 o.add(buildPlacement()); | |
| 5572 return o; | |
| 5573 } | |
| 5574 | |
| 5575 checkUnnamed3158(core.List<api.Placement> o) { | |
| 5576 unittest.expect(o, unittest.hasLength(2)); | |
| 5577 checkPlacement(o[0]); | |
| 5578 checkPlacement(o[1]); | |
| 5579 } | |
| 5580 | |
| 5581 core.int buildCounterPlacementsListResponse = 0; | |
| 5582 buildPlacementsListResponse() { | |
| 5583 var o = new api.PlacementsListResponse(); | |
| 5584 buildCounterPlacementsListResponse++; | |
| 5585 if (buildCounterPlacementsListResponse < 3) { | |
| 5586 o.kind = "foo"; | |
| 5587 o.nextPageToken = "foo"; | |
| 5588 o.placements = buildUnnamed3158(); | |
| 5589 } | |
| 5590 buildCounterPlacementsListResponse--; | |
| 5591 return o; | |
| 5592 } | |
| 5593 | |
| 5594 checkPlacementsListResponse(api.PlacementsListResponse o) { | |
| 5595 buildCounterPlacementsListResponse++; | |
| 5596 if (buildCounterPlacementsListResponse < 3) { | |
| 5597 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5598 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5599 checkUnnamed3158(o.placements); | |
| 5600 } | |
| 5601 buildCounterPlacementsListResponse--; | |
| 5602 } | |
| 5603 | |
| 5604 core.int buildCounterPlatformType = 0; | |
| 5605 buildPlatformType() { | |
| 5606 var o = new api.PlatformType(); | |
| 5607 buildCounterPlatformType++; | |
| 5608 if (buildCounterPlatformType < 3) { | |
| 5609 o.id = "foo"; | |
| 5610 o.kind = "foo"; | |
| 5611 o.name = "foo"; | |
| 5612 } | |
| 5613 buildCounterPlatformType--; | |
| 5614 return o; | |
| 5615 } | |
| 5616 | |
| 5617 checkPlatformType(api.PlatformType o) { | |
| 5618 buildCounterPlatformType++; | |
| 5619 if (buildCounterPlatformType < 3) { | |
| 5620 unittest.expect(o.id, unittest.equals('foo')); | |
| 5621 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5622 unittest.expect(o.name, unittest.equals('foo')); | |
| 5623 } | |
| 5624 buildCounterPlatformType--; | |
| 5625 } | |
| 5626 | |
| 5627 buildUnnamed3159() { | |
| 5628 var o = new core.List<api.PlatformType>(); | |
| 5629 o.add(buildPlatformType()); | |
| 5630 o.add(buildPlatformType()); | |
| 5631 return o; | |
| 5632 } | |
| 5633 | |
| 5634 checkUnnamed3159(core.List<api.PlatformType> o) { | |
| 5635 unittest.expect(o, unittest.hasLength(2)); | |
| 5636 checkPlatformType(o[0]); | |
| 5637 checkPlatformType(o[1]); | |
| 5638 } | |
| 5639 | |
| 5640 core.int buildCounterPlatformTypesListResponse = 0; | |
| 5641 buildPlatformTypesListResponse() { | |
| 5642 var o = new api.PlatformTypesListResponse(); | |
| 5643 buildCounterPlatformTypesListResponse++; | |
| 5644 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5645 o.kind = "foo"; | |
| 5646 o.platformTypes = buildUnnamed3159(); | |
| 5647 } | |
| 5648 buildCounterPlatformTypesListResponse--; | |
| 5649 return o; | |
| 5650 } | |
| 5651 | |
| 5652 checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { | |
| 5653 buildCounterPlatformTypesListResponse++; | |
| 5654 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5655 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5656 checkUnnamed3159(o.platformTypes); | |
| 5657 } | |
| 5658 buildCounterPlatformTypesListResponse--; | |
| 5659 } | |
| 5660 | |
| 5661 core.int buildCounterPopupWindowProperties = 0; | |
| 5662 buildPopupWindowProperties() { | |
| 5663 var o = new api.PopupWindowProperties(); | |
| 5664 buildCounterPopupWindowProperties++; | |
| 5665 if (buildCounterPopupWindowProperties < 3) { | |
| 5666 o.dimension = buildSize(); | |
| 5667 o.offset = buildOffsetPosition(); | |
| 5668 o.positionType = "foo"; | |
| 5669 o.showAddressBar = true; | |
| 5670 o.showMenuBar = true; | |
| 5671 o.showScrollBar = true; | |
| 5672 o.showStatusBar = true; | |
| 5673 o.showToolBar = true; | |
| 5674 o.title = "foo"; | |
| 5675 } | |
| 5676 buildCounterPopupWindowProperties--; | |
| 5677 return o; | |
| 5678 } | |
| 5679 | |
| 5680 checkPopupWindowProperties(api.PopupWindowProperties o) { | |
| 5681 buildCounterPopupWindowProperties++; | |
| 5682 if (buildCounterPopupWindowProperties < 3) { | |
| 5683 checkSize(o.dimension); | |
| 5684 checkOffsetPosition(o.offset); | |
| 5685 unittest.expect(o.positionType, unittest.equals('foo')); | |
| 5686 unittest.expect(o.showAddressBar, unittest.isTrue); | |
| 5687 unittest.expect(o.showMenuBar, unittest.isTrue); | |
| 5688 unittest.expect(o.showScrollBar, unittest.isTrue); | |
| 5689 unittest.expect(o.showStatusBar, unittest.isTrue); | |
| 5690 unittest.expect(o.showToolBar, unittest.isTrue); | |
| 5691 unittest.expect(o.title, unittest.equals('foo')); | |
| 5692 } | |
| 5693 buildCounterPopupWindowProperties--; | |
| 5694 } | |
| 5695 | |
| 5696 core.int buildCounterPostalCode = 0; | |
| 5697 buildPostalCode() { | |
| 5698 var o = new api.PostalCode(); | |
| 5699 buildCounterPostalCode++; | |
| 5700 if (buildCounterPostalCode < 3) { | |
| 5701 o.code = "foo"; | |
| 5702 o.countryCode = "foo"; | |
| 5703 o.countryDartId = "foo"; | |
| 5704 o.id = "foo"; | |
| 5705 o.kind = "foo"; | |
| 5706 } | |
| 5707 buildCounterPostalCode--; | |
| 5708 return o; | |
| 5709 } | |
| 5710 | |
| 5711 checkPostalCode(api.PostalCode o) { | |
| 5712 buildCounterPostalCode++; | |
| 5713 if (buildCounterPostalCode < 3) { | |
| 5714 unittest.expect(o.code, unittest.equals('foo')); | |
| 5715 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 5716 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 5717 unittest.expect(o.id, unittest.equals('foo')); | |
| 5718 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5719 } | |
| 5720 buildCounterPostalCode--; | |
| 5721 } | |
| 5722 | |
| 5723 buildUnnamed3160() { | |
| 5724 var o = new core.List<api.PostalCode>(); | |
| 5725 o.add(buildPostalCode()); | |
| 5726 o.add(buildPostalCode()); | |
| 5727 return o; | |
| 5728 } | |
| 5729 | |
| 5730 checkUnnamed3160(core.List<api.PostalCode> o) { | |
| 5731 unittest.expect(o, unittest.hasLength(2)); | |
| 5732 checkPostalCode(o[0]); | |
| 5733 checkPostalCode(o[1]); | |
| 5734 } | |
| 5735 | |
| 5736 core.int buildCounterPostalCodesListResponse = 0; | |
| 5737 buildPostalCodesListResponse() { | |
| 5738 var o = new api.PostalCodesListResponse(); | |
| 5739 buildCounterPostalCodesListResponse++; | |
| 5740 if (buildCounterPostalCodesListResponse < 3) { | |
| 5741 o.kind = "foo"; | |
| 5742 o.postalCodes = buildUnnamed3160(); | |
| 5743 } | |
| 5744 buildCounterPostalCodesListResponse--; | |
| 5745 return o; | |
| 5746 } | |
| 5747 | |
| 5748 checkPostalCodesListResponse(api.PostalCodesListResponse o) { | |
| 5749 buildCounterPostalCodesListResponse++; | |
| 5750 if (buildCounterPostalCodesListResponse < 3) { | |
| 5751 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5752 checkUnnamed3160(o.postalCodes); | |
| 5753 } | |
| 5754 buildCounterPostalCodesListResponse--; | |
| 5755 } | |
| 5756 | |
| 5757 buildUnnamed3161() { | |
| 5758 var o = new core.List<api.Flight>(); | |
| 5759 o.add(buildFlight()); | |
| 5760 o.add(buildFlight()); | |
| 5761 return o; | |
| 5762 } | |
| 5763 | |
| 5764 checkUnnamed3161(core.List<api.Flight> o) { | |
| 5765 unittest.expect(o, unittest.hasLength(2)); | |
| 5766 checkFlight(o[0]); | |
| 5767 checkFlight(o[1]); | |
| 5768 } | |
| 5769 | |
| 5770 core.int buildCounterPricing = 0; | |
| 5771 buildPricing() { | |
| 5772 var o = new api.Pricing(); | |
| 5773 buildCounterPricing++; | |
| 5774 if (buildCounterPricing < 3) { | |
| 5775 o.capCostType = "foo"; | |
| 5776 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5777 o.flights = buildUnnamed3161(); | |
| 5778 o.groupType = "foo"; | |
| 5779 o.pricingType = "foo"; | |
| 5780 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5781 } | |
| 5782 buildCounterPricing--; | |
| 5783 return o; | |
| 5784 } | |
| 5785 | |
| 5786 checkPricing(api.Pricing o) { | |
| 5787 buildCounterPricing++; | |
| 5788 if (buildCounterPricing < 3) { | |
| 5789 unittest.expect(o.capCostType, unittest.equals('foo')); | |
| 5790 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5791 checkUnnamed3161(o.flights); | |
| 5792 unittest.expect(o.groupType, unittest.equals('foo')); | |
| 5793 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5794 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5795 } | |
| 5796 buildCounterPricing--; | |
| 5797 } | |
| 5798 | |
| 5799 buildUnnamed3162() { | |
| 5800 var o = new core.List<api.PricingSchedulePricingPeriod>(); | |
| 5801 o.add(buildPricingSchedulePricingPeriod()); | |
| 5802 o.add(buildPricingSchedulePricingPeriod()); | |
| 5803 return o; | |
| 5804 } | |
| 5805 | |
| 5806 checkUnnamed3162(core.List<api.PricingSchedulePricingPeriod> o) { | |
| 5807 unittest.expect(o, unittest.hasLength(2)); | |
| 5808 checkPricingSchedulePricingPeriod(o[0]); | |
| 5809 checkPricingSchedulePricingPeriod(o[1]); | |
| 5810 } | |
| 5811 | |
| 5812 core.int buildCounterPricingSchedule = 0; | |
| 5813 buildPricingSchedule() { | |
| 5814 var o = new api.PricingSchedule(); | |
| 5815 buildCounterPricingSchedule++; | |
| 5816 if (buildCounterPricingSchedule < 3) { | |
| 5817 o.capCostOption = "foo"; | |
| 5818 o.disregardOverdelivery = true; | |
| 5819 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5820 o.flighted = true; | |
| 5821 o.floodlightActivityId = "foo"; | |
| 5822 o.pricingPeriods = buildUnnamed3162(); | |
| 5823 o.pricingType = "foo"; | |
| 5824 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5825 o.testingStartDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5826 } | |
| 5827 buildCounterPricingSchedule--; | |
| 5828 return o; | |
| 5829 } | |
| 5830 | |
| 5831 checkPricingSchedule(api.PricingSchedule o) { | |
| 5832 buildCounterPricingSchedule++; | |
| 5833 if (buildCounterPricingSchedule < 3) { | |
| 5834 unittest.expect(o.capCostOption, unittest.equals('foo')); | |
| 5835 unittest.expect(o.disregardOverdelivery, unittest.isTrue); | |
| 5836 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5837 unittest.expect(o.flighted, unittest.isTrue); | |
| 5838 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 5839 checkUnnamed3162(o.pricingPeriods); | |
| 5840 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5841 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5842 unittest.expect(o.testingStartDate, unittest.equals(core.DateTime.parse("200
2-02-27T00:00:00"))); | |
| 5843 } | |
| 5844 buildCounterPricingSchedule--; | |
| 5845 } | |
| 5846 | |
| 5847 core.int buildCounterPricingSchedulePricingPeriod = 0; | |
| 5848 buildPricingSchedulePricingPeriod() { | |
| 5849 var o = new api.PricingSchedulePricingPeriod(); | |
| 5850 buildCounterPricingSchedulePricingPeriod++; | |
| 5851 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5852 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5853 o.pricingComment = "foo"; | |
| 5854 o.rateOrCostNanos = "foo"; | |
| 5855 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5856 o.units = "foo"; | |
| 5857 } | |
| 5858 buildCounterPricingSchedulePricingPeriod--; | |
| 5859 return o; | |
| 5860 } | |
| 5861 | |
| 5862 checkPricingSchedulePricingPeriod(api.PricingSchedulePricingPeriod o) { | |
| 5863 buildCounterPricingSchedulePricingPeriod++; | |
| 5864 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5865 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5866 unittest.expect(o.pricingComment, unittest.equals('foo')); | |
| 5867 unittest.expect(o.rateOrCostNanos, unittest.equals('foo')); | |
| 5868 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5869 unittest.expect(o.units, unittest.equals('foo')); | |
| 5870 } | |
| 5871 buildCounterPricingSchedulePricingPeriod--; | |
| 5872 } | |
| 5873 | |
| 5874 core.int buildCounterProject = 0; | |
| 5875 buildProject() { | |
| 5876 var o = new api.Project(); | |
| 5877 buildCounterProject++; | |
| 5878 if (buildCounterProject < 3) { | |
| 5879 o.accountId = "foo"; | |
| 5880 o.advertiserId = "foo"; | |
| 5881 o.audienceAgeGroup = "foo"; | |
| 5882 o.audienceGender = "foo"; | |
| 5883 o.budget = "foo"; | |
| 5884 o.clientBillingCode = "foo"; | |
| 5885 o.clientName = "foo"; | |
| 5886 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5887 o.id = "foo"; | |
| 5888 o.kind = "foo"; | |
| 5889 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5890 o.name = "foo"; | |
| 5891 o.overview = "foo"; | |
| 5892 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5893 o.subaccountId = "foo"; | |
| 5894 o.targetClicks = "foo"; | |
| 5895 o.targetConversions = "foo"; | |
| 5896 o.targetCpaNanos = "foo"; | |
| 5897 o.targetCpcNanos = "foo"; | |
| 5898 o.targetCpmNanos = "foo"; | |
| 5899 o.targetImpressions = "foo"; | |
| 5900 } | |
| 5901 buildCounterProject--; | |
| 5902 return o; | |
| 5903 } | |
| 5904 | |
| 5905 checkProject(api.Project o) { | |
| 5906 buildCounterProject++; | |
| 5907 if (buildCounterProject < 3) { | |
| 5908 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5909 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5910 unittest.expect(o.audienceAgeGroup, unittest.equals('foo')); | |
| 5911 unittest.expect(o.audienceGender, unittest.equals('foo')); | |
| 5912 unittest.expect(o.budget, unittest.equals('foo')); | |
| 5913 unittest.expect(o.clientBillingCode, unittest.equals('foo')); | |
| 5914 unittest.expect(o.clientName, unittest.equals('foo')); | |
| 5915 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5916 unittest.expect(o.id, unittest.equals('foo')); | |
| 5917 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5918 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5919 unittest.expect(o.name, unittest.equals('foo')); | |
| 5920 unittest.expect(o.overview, unittest.equals('foo')); | |
| 5921 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5922 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5923 unittest.expect(o.targetClicks, unittest.equals('foo')); | |
| 5924 unittest.expect(o.targetConversions, unittest.equals('foo')); | |
| 5925 unittest.expect(o.targetCpaNanos, unittest.equals('foo')); | |
| 5926 unittest.expect(o.targetCpcNanos, unittest.equals('foo')); | |
| 5927 unittest.expect(o.targetCpmNanos, unittest.equals('foo')); | |
| 5928 unittest.expect(o.targetImpressions, unittest.equals('foo')); | |
| 5929 } | |
| 5930 buildCounterProject--; | |
| 5931 } | |
| 5932 | |
| 5933 buildUnnamed3163() { | |
| 5934 var o = new core.List<api.Project>(); | |
| 5935 o.add(buildProject()); | |
| 5936 o.add(buildProject()); | |
| 5937 return o; | |
| 5938 } | |
| 5939 | |
| 5940 checkUnnamed3163(core.List<api.Project> o) { | |
| 5941 unittest.expect(o, unittest.hasLength(2)); | |
| 5942 checkProject(o[0]); | |
| 5943 checkProject(o[1]); | |
| 5944 } | |
| 5945 | |
| 5946 core.int buildCounterProjectsListResponse = 0; | |
| 5947 buildProjectsListResponse() { | |
| 5948 var o = new api.ProjectsListResponse(); | |
| 5949 buildCounterProjectsListResponse++; | |
| 5950 if (buildCounterProjectsListResponse < 3) { | |
| 5951 o.kind = "foo"; | |
| 5952 o.nextPageToken = "foo"; | |
| 5953 o.projects = buildUnnamed3163(); | |
| 5954 } | |
| 5955 buildCounterProjectsListResponse--; | |
| 5956 return o; | |
| 5957 } | |
| 5958 | |
| 5959 checkProjectsListResponse(api.ProjectsListResponse o) { | |
| 5960 buildCounterProjectsListResponse++; | |
| 5961 if (buildCounterProjectsListResponse < 3) { | |
| 5962 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5963 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5964 checkUnnamed3163(o.projects); | |
| 5965 } | |
| 5966 buildCounterProjectsListResponse--; | |
| 5967 } | |
| 5968 | |
| 5969 buildUnnamed3164() { | |
| 5970 var o = new core.List<api.Dimension>(); | |
| 5971 o.add(buildDimension()); | |
| 5972 o.add(buildDimension()); | |
| 5973 return o; | |
| 5974 } | |
| 5975 | |
| 5976 checkUnnamed3164(core.List<api.Dimension> o) { | |
| 5977 unittest.expect(o, unittest.hasLength(2)); | |
| 5978 checkDimension(o[0]); | |
| 5979 checkDimension(o[1]); | |
| 5980 } | |
| 5981 | |
| 5982 buildUnnamed3165() { | |
| 5983 var o = new core.List<api.Dimension>(); | |
| 5984 o.add(buildDimension()); | |
| 5985 o.add(buildDimension()); | |
| 5986 return o; | |
| 5987 } | |
| 5988 | |
| 5989 checkUnnamed3165(core.List<api.Dimension> o) { | |
| 5990 unittest.expect(o, unittest.hasLength(2)); | |
| 5991 checkDimension(o[0]); | |
| 5992 checkDimension(o[1]); | |
| 5993 } | |
| 5994 | |
| 5995 buildUnnamed3166() { | |
| 5996 var o = new core.List<api.Metric>(); | |
| 5997 o.add(buildMetric()); | |
| 5998 o.add(buildMetric()); | |
| 5999 return o; | |
| 6000 } | |
| 6001 | |
| 6002 checkUnnamed3166(core.List<api.Metric> o) { | |
| 6003 unittest.expect(o, unittest.hasLength(2)); | |
| 6004 checkMetric(o[0]); | |
| 6005 checkMetric(o[1]); | |
| 6006 } | |
| 6007 | |
| 6008 buildUnnamed3167() { | |
| 6009 var o = new core.List<api.Metric>(); | |
| 6010 o.add(buildMetric()); | |
| 6011 o.add(buildMetric()); | |
| 6012 return o; | |
| 6013 } | |
| 6014 | |
| 6015 checkUnnamed3167(core.List<api.Metric> o) { | |
| 6016 unittest.expect(o, unittest.hasLength(2)); | |
| 6017 checkMetric(o[0]); | |
| 6018 checkMetric(o[1]); | |
| 6019 } | |
| 6020 | |
| 6021 buildUnnamed3168() { | |
| 6022 var o = new core.List<api.Metric>(); | |
| 6023 o.add(buildMetric()); | |
| 6024 o.add(buildMetric()); | |
| 6025 return o; | |
| 6026 } | |
| 6027 | |
| 6028 checkUnnamed3168(core.List<api.Metric> o) { | |
| 6029 unittest.expect(o, unittest.hasLength(2)); | |
| 6030 checkMetric(o[0]); | |
| 6031 checkMetric(o[1]); | |
| 6032 } | |
| 6033 | |
| 6034 core.int buildCounterReachReportCompatibleFields = 0; | |
| 6035 buildReachReportCompatibleFields() { | |
| 6036 var o = new api.ReachReportCompatibleFields(); | |
| 6037 buildCounterReachReportCompatibleFields++; | |
| 6038 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6039 o.dimensionFilters = buildUnnamed3164(); | |
| 6040 o.dimensions = buildUnnamed3165(); | |
| 6041 o.kind = "foo"; | |
| 6042 o.metrics = buildUnnamed3166(); | |
| 6043 o.pivotedActivityMetrics = buildUnnamed3167(); | |
| 6044 o.reachByFrequencyMetrics = buildUnnamed3168(); | |
| 6045 } | |
| 6046 buildCounterReachReportCompatibleFields--; | |
| 6047 return o; | |
| 6048 } | |
| 6049 | |
| 6050 checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { | |
| 6051 buildCounterReachReportCompatibleFields++; | |
| 6052 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6053 checkUnnamed3164(o.dimensionFilters); | |
| 6054 checkUnnamed3165(o.dimensions); | |
| 6055 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6056 checkUnnamed3166(o.metrics); | |
| 6057 checkUnnamed3167(o.pivotedActivityMetrics); | |
| 6058 checkUnnamed3168(o.reachByFrequencyMetrics); | |
| 6059 } | |
| 6060 buildCounterReachReportCompatibleFields--; | |
| 6061 } | |
| 6062 | |
| 6063 core.int buildCounterRecipient = 0; | |
| 6064 buildRecipient() { | |
| 6065 var o = new api.Recipient(); | |
| 6066 buildCounterRecipient++; | |
| 6067 if (buildCounterRecipient < 3) { | |
| 6068 o.deliveryType = "foo"; | |
| 6069 o.email = "foo"; | |
| 6070 o.kind = "foo"; | |
| 6071 } | |
| 6072 buildCounterRecipient--; | |
| 6073 return o; | |
| 6074 } | |
| 6075 | |
| 6076 checkRecipient(api.Recipient o) { | |
| 6077 buildCounterRecipient++; | |
| 6078 if (buildCounterRecipient < 3) { | |
| 6079 unittest.expect(o.deliveryType, unittest.equals('foo')); | |
| 6080 unittest.expect(o.email, unittest.equals('foo')); | |
| 6081 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6082 } | |
| 6083 buildCounterRecipient--; | |
| 6084 } | |
| 6085 | |
| 6086 core.int buildCounterRegion = 0; | |
| 6087 buildRegion() { | |
| 6088 var o = new api.Region(); | |
| 6089 buildCounterRegion++; | |
| 6090 if (buildCounterRegion < 3) { | |
| 6091 o.countryCode = "foo"; | |
| 6092 o.countryDartId = "foo"; | |
| 6093 o.dartId = "foo"; | |
| 6094 o.kind = "foo"; | |
| 6095 o.name = "foo"; | |
| 6096 o.regionCode = "foo"; | |
| 6097 } | |
| 6098 buildCounterRegion--; | |
| 6099 return o; | |
| 6100 } | |
| 6101 | |
| 6102 checkRegion(api.Region o) { | |
| 6103 buildCounterRegion++; | |
| 6104 if (buildCounterRegion < 3) { | |
| 6105 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 6106 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 6107 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 6108 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6109 unittest.expect(o.name, unittest.equals('foo')); | |
| 6110 unittest.expect(o.regionCode, unittest.equals('foo')); | |
| 6111 } | |
| 6112 buildCounterRegion--; | |
| 6113 } | |
| 6114 | |
| 6115 buildUnnamed3169() { | |
| 6116 var o = new core.List<api.Region>(); | |
| 6117 o.add(buildRegion()); | |
| 6118 o.add(buildRegion()); | |
| 6119 return o; | |
| 6120 } | |
| 6121 | |
| 6122 checkUnnamed3169(core.List<api.Region> o) { | |
| 6123 unittest.expect(o, unittest.hasLength(2)); | |
| 6124 checkRegion(o[0]); | |
| 6125 checkRegion(o[1]); | |
| 6126 } | |
| 6127 | |
| 6128 core.int buildCounterRegionsListResponse = 0; | |
| 6129 buildRegionsListResponse() { | |
| 6130 var o = new api.RegionsListResponse(); | |
| 6131 buildCounterRegionsListResponse++; | |
| 6132 if (buildCounterRegionsListResponse < 3) { | |
| 6133 o.kind = "foo"; | |
| 6134 o.regions = buildUnnamed3169(); | |
| 6135 } | |
| 6136 buildCounterRegionsListResponse--; | |
| 6137 return o; | |
| 6138 } | |
| 6139 | |
| 6140 checkRegionsListResponse(api.RegionsListResponse o) { | |
| 6141 buildCounterRegionsListResponse++; | |
| 6142 if (buildCounterRegionsListResponse < 3) { | |
| 6143 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6144 checkUnnamed3169(o.regions); | |
| 6145 } | |
| 6146 buildCounterRegionsListResponse--; | |
| 6147 } | |
| 6148 | |
| 6149 core.int buildCounterRemarketingList = 0; | |
| 6150 buildRemarketingList() { | |
| 6151 var o = new api.RemarketingList(); | |
| 6152 buildCounterRemarketingList++; | |
| 6153 if (buildCounterRemarketingList < 3) { | |
| 6154 o.accountId = "foo"; | |
| 6155 o.active = true; | |
| 6156 o.advertiserId = "foo"; | |
| 6157 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 6158 o.description = "foo"; | |
| 6159 o.id = "foo"; | |
| 6160 o.kind = "foo"; | |
| 6161 o.lifeSpan = "foo"; | |
| 6162 o.listPopulationRule = buildListPopulationRule(); | |
| 6163 o.listSize = "foo"; | |
| 6164 o.listSource = "foo"; | |
| 6165 o.name = "foo"; | |
| 6166 o.subaccountId = "foo"; | |
| 6167 } | |
| 6168 buildCounterRemarketingList--; | |
| 6169 return o; | |
| 6170 } | |
| 6171 | |
| 6172 checkRemarketingList(api.RemarketingList o) { | |
| 6173 buildCounterRemarketingList++; | |
| 6174 if (buildCounterRemarketingList < 3) { | |
| 6175 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6176 unittest.expect(o.active, unittest.isTrue); | |
| 6177 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 6178 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 6179 unittest.expect(o.description, unittest.equals('foo')); | |
| 6180 unittest.expect(o.id, unittest.equals('foo')); | |
| 6181 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6182 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 6183 checkListPopulationRule(o.listPopulationRule); | |
| 6184 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 6185 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 6186 unittest.expect(o.name, unittest.equals('foo')); | |
| 6187 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 6188 } | |
| 6189 buildCounterRemarketingList--; | |
| 6190 } | |
| 6191 | |
| 6192 buildUnnamed3170() { | |
| 6193 var o = new core.List<core.String>(); | |
| 6194 o.add("foo"); | |
| 6195 o.add("foo"); | |
| 6196 return o; | |
| 6197 } | |
| 6198 | |
| 6199 checkUnnamed3170(core.List<core.String> o) { | |
| 6200 unittest.expect(o, unittest.hasLength(2)); | |
| 6201 unittest.expect(o[0], unittest.equals('foo')); | |
| 6202 unittest.expect(o[1], unittest.equals('foo')); | |
| 6203 } | |
| 6204 | |
| 6205 buildUnnamed3171() { | |
| 6206 var o = new core.List<core.String>(); | |
| 6207 o.add("foo"); | |
| 6208 o.add("foo"); | |
| 6209 return o; | |
| 6210 } | |
| 6211 | |
| 6212 checkUnnamed3171(core.List<core.String> o) { | |
| 6213 unittest.expect(o, unittest.hasLength(2)); | |
| 6214 unittest.expect(o[0], unittest.equals('foo')); | |
| 6215 unittest.expect(o[1], unittest.equals('foo')); | |
| 6216 } | |
| 6217 | |
| 6218 core.int buildCounterRemarketingListShare = 0; | |
| 6219 buildRemarketingListShare() { | |
| 6220 var o = new api.RemarketingListShare(); | |
| 6221 buildCounterRemarketingListShare++; | |
| 6222 if (buildCounterRemarketingListShare < 3) { | |
| 6223 o.kind = "foo"; | |
| 6224 o.remarketingListId = "foo"; | |
| 6225 o.sharedAccountIds = buildUnnamed3170(); | |
| 6226 o.sharedAdvertiserIds = buildUnnamed3171(); | |
| 6227 } | |
| 6228 buildCounterRemarketingListShare--; | |
| 6229 return o; | |
| 6230 } | |
| 6231 | |
| 6232 checkRemarketingListShare(api.RemarketingListShare o) { | |
| 6233 buildCounterRemarketingListShare++; | |
| 6234 if (buildCounterRemarketingListShare < 3) { | |
| 6235 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6236 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 6237 checkUnnamed3170(o.sharedAccountIds); | |
| 6238 checkUnnamed3171(o.sharedAdvertiserIds); | |
| 6239 } | |
| 6240 buildCounterRemarketingListShare--; | |
| 6241 } | |
| 6242 | |
| 6243 buildUnnamed3172() { | |
| 6244 var o = new core.List<api.RemarketingList>(); | |
| 6245 o.add(buildRemarketingList()); | |
| 6246 o.add(buildRemarketingList()); | |
| 6247 return o; | |
| 6248 } | |
| 6249 | |
| 6250 checkUnnamed3172(core.List<api.RemarketingList> o) { | |
| 6251 unittest.expect(o, unittest.hasLength(2)); | |
| 6252 checkRemarketingList(o[0]); | |
| 6253 checkRemarketingList(o[1]); | |
| 6254 } | |
| 6255 | |
| 6256 core.int buildCounterRemarketingListsListResponse = 0; | |
| 6257 buildRemarketingListsListResponse() { | |
| 6258 var o = new api.RemarketingListsListResponse(); | |
| 6259 buildCounterRemarketingListsListResponse++; | |
| 6260 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6261 o.kind = "foo"; | |
| 6262 o.nextPageToken = "foo"; | |
| 6263 o.remarketingLists = buildUnnamed3172(); | |
| 6264 } | |
| 6265 buildCounterRemarketingListsListResponse--; | |
| 6266 return o; | |
| 6267 } | |
| 6268 | |
| 6269 checkRemarketingListsListResponse(api.RemarketingListsListResponse o) { | |
| 6270 buildCounterRemarketingListsListResponse++; | |
| 6271 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6272 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6273 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 6274 checkUnnamed3172(o.remarketingLists); | |
| 6275 } | |
| 6276 buildCounterRemarketingListsListResponse--; | |
| 6277 } | |
| 6278 | |
| 6279 buildUnnamed3173() { | |
| 6280 var o = new core.List<api.DimensionValue>(); | |
| 6281 o.add(buildDimensionValue()); | |
| 6282 o.add(buildDimensionValue()); | |
| 6283 return o; | |
| 6284 } | |
| 6285 | |
| 6286 checkUnnamed3173(core.List<api.DimensionValue> o) { | |
| 6287 unittest.expect(o, unittest.hasLength(2)); | |
| 6288 checkDimensionValue(o[0]); | |
| 6289 checkDimensionValue(o[1]); | |
| 6290 } | |
| 6291 | |
| 6292 buildUnnamed3174() { | |
| 6293 var o = new core.List<api.SortedDimension>(); | |
| 6294 o.add(buildSortedDimension()); | |
| 6295 o.add(buildSortedDimension()); | |
| 6296 return o; | |
| 6297 } | |
| 6298 | |
| 6299 checkUnnamed3174(core.List<api.SortedDimension> o) { | |
| 6300 unittest.expect(o, unittest.hasLength(2)); | |
| 6301 checkSortedDimension(o[0]); | |
| 6302 checkSortedDimension(o[1]); | |
| 6303 } | |
| 6304 | |
| 6305 buildUnnamed3175() { | |
| 6306 var o = new core.List<core.String>(); | |
| 6307 o.add("foo"); | |
| 6308 o.add("foo"); | |
| 6309 return o; | |
| 6310 } | |
| 6311 | |
| 6312 checkUnnamed3175(core.List<core.String> o) { | |
| 6313 unittest.expect(o, unittest.hasLength(2)); | |
| 6314 unittest.expect(o[0], unittest.equals('foo')); | |
| 6315 unittest.expect(o[1], unittest.equals('foo')); | |
| 6316 } | |
| 6317 | |
| 6318 core.int buildCounterReportCriteria = 0; | |
| 6319 buildReportCriteria() { | |
| 6320 var o = new api.ReportCriteria(); | |
| 6321 buildCounterReportCriteria++; | |
| 6322 if (buildCounterReportCriteria < 3) { | |
| 6323 o.activities = buildActivities(); | |
| 6324 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6325 o.dateRange = buildDateRange(); | |
| 6326 o.dimensionFilters = buildUnnamed3173(); | |
| 6327 o.dimensions = buildUnnamed3174(); | |
| 6328 o.metricNames = buildUnnamed3175(); | |
| 6329 } | |
| 6330 buildCounterReportCriteria--; | |
| 6331 return o; | |
| 6332 } | |
| 6333 | |
| 6334 checkReportCriteria(api.ReportCriteria o) { | |
| 6335 buildCounterReportCriteria++; | |
| 6336 if (buildCounterReportCriteria < 3) { | |
| 6337 checkActivities(o.activities); | |
| 6338 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6339 checkDateRange(o.dateRange); | |
| 6340 checkUnnamed3173(o.dimensionFilters); | |
| 6341 checkUnnamed3174(o.dimensions); | |
| 6342 checkUnnamed3175(o.metricNames); | |
| 6343 } | |
| 6344 buildCounterReportCriteria--; | |
| 6345 } | |
| 6346 | |
| 6347 buildUnnamed3176() { | |
| 6348 var o = new core.List<api.SortedDimension>(); | |
| 6349 o.add(buildSortedDimension()); | |
| 6350 o.add(buildSortedDimension()); | |
| 6351 return o; | |
| 6352 } | |
| 6353 | |
| 6354 checkUnnamed3176(core.List<api.SortedDimension> o) { | |
| 6355 unittest.expect(o, unittest.hasLength(2)); | |
| 6356 checkSortedDimension(o[0]); | |
| 6357 checkSortedDimension(o[1]); | |
| 6358 } | |
| 6359 | |
| 6360 buildUnnamed3177() { | |
| 6361 var o = new core.List<api.DimensionValue>(); | |
| 6362 o.add(buildDimensionValue()); | |
| 6363 o.add(buildDimensionValue()); | |
| 6364 return o; | |
| 6365 } | |
| 6366 | |
| 6367 checkUnnamed3177(core.List<api.DimensionValue> o) { | |
| 6368 unittest.expect(o, unittest.hasLength(2)); | |
| 6369 checkDimensionValue(o[0]); | |
| 6370 checkDimensionValue(o[1]); | |
| 6371 } | |
| 6372 | |
| 6373 buildUnnamed3178() { | |
| 6374 var o = new core.List<core.String>(); | |
| 6375 o.add("foo"); | |
| 6376 o.add("foo"); | |
| 6377 return o; | |
| 6378 } | |
| 6379 | |
| 6380 checkUnnamed3178(core.List<core.String> o) { | |
| 6381 unittest.expect(o, unittest.hasLength(2)); | |
| 6382 unittest.expect(o[0], unittest.equals('foo')); | |
| 6383 unittest.expect(o[1], unittest.equals('foo')); | |
| 6384 } | |
| 6385 | |
| 6386 buildUnnamed3179() { | |
| 6387 var o = new core.List<core.String>(); | |
| 6388 o.add("foo"); | |
| 6389 o.add("foo"); | |
| 6390 return o; | |
| 6391 } | |
| 6392 | |
| 6393 checkUnnamed3179(core.List<core.String> o) { | |
| 6394 unittest.expect(o, unittest.hasLength(2)); | |
| 6395 unittest.expect(o[0], unittest.equals('foo')); | |
| 6396 unittest.expect(o[1], unittest.equals('foo')); | |
| 6397 } | |
| 6398 | |
| 6399 core.int buildCounterReportCrossDimensionReachCriteria = 0; | |
| 6400 buildReportCrossDimensionReachCriteria() { | |
| 6401 var o = new api.ReportCrossDimensionReachCriteria(); | |
| 6402 buildCounterReportCrossDimensionReachCriteria++; | |
| 6403 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6404 o.breakdown = buildUnnamed3176(); | |
| 6405 o.dateRange = buildDateRange(); | |
| 6406 o.dimension = "foo"; | |
| 6407 o.dimensionFilters = buildUnnamed3177(); | |
| 6408 o.metricNames = buildUnnamed3178(); | |
| 6409 o.overlapMetricNames = buildUnnamed3179(); | |
| 6410 o.pivoted = true; | |
| 6411 } | |
| 6412 buildCounterReportCrossDimensionReachCriteria--; | |
| 6413 return o; | |
| 6414 } | |
| 6415 | |
| 6416 checkReportCrossDimensionReachCriteria(api.ReportCrossDimensionReachCriteria o)
{ | |
| 6417 buildCounterReportCrossDimensionReachCriteria++; | |
| 6418 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6419 checkUnnamed3176(o.breakdown); | |
| 6420 checkDateRange(o.dateRange); | |
| 6421 unittest.expect(o.dimension, unittest.equals('foo')); | |
| 6422 checkUnnamed3177(o.dimensionFilters); | |
| 6423 checkUnnamed3178(o.metricNames); | |
| 6424 checkUnnamed3179(o.overlapMetricNames); | |
| 6425 unittest.expect(o.pivoted, unittest.isTrue); | |
| 6426 } | |
| 6427 buildCounterReportCrossDimensionReachCriteria--; | |
| 6428 } | |
| 6429 | |
| 6430 buildUnnamed3180() { | |
| 6431 var o = new core.List<api.Recipient>(); | |
| 6432 o.add(buildRecipient()); | |
| 6433 o.add(buildRecipient()); | |
| 6434 return o; | |
| 6435 } | |
| 6436 | |
| 6437 checkUnnamed3180(core.List<api.Recipient> o) { | |
| 6438 unittest.expect(o, unittest.hasLength(2)); | |
| 6439 checkRecipient(o[0]); | |
| 6440 checkRecipient(o[1]); | |
| 6441 } | |
| 6442 | |
| 6443 core.int buildCounterReportDelivery = 0; | |
| 6444 buildReportDelivery() { | |
| 6445 var o = new api.ReportDelivery(); | |
| 6446 buildCounterReportDelivery++; | |
| 6447 if (buildCounterReportDelivery < 3) { | |
| 6448 o.emailOwner = true; | |
| 6449 o.emailOwnerDeliveryType = "foo"; | |
| 6450 o.message = "foo"; | |
| 6451 o.recipients = buildUnnamed3180(); | |
| 6452 } | |
| 6453 buildCounterReportDelivery--; | |
| 6454 return o; | |
| 6455 } | |
| 6456 | |
| 6457 checkReportDelivery(api.ReportDelivery o) { | |
| 6458 buildCounterReportDelivery++; | |
| 6459 if (buildCounterReportDelivery < 3) { | |
| 6460 unittest.expect(o.emailOwner, unittest.isTrue); | |
| 6461 unittest.expect(o.emailOwnerDeliveryType, unittest.equals('foo')); | |
| 6462 unittest.expect(o.message, unittest.equals('foo')); | |
| 6463 checkUnnamed3180(o.recipients); | |
| 6464 } | |
| 6465 buildCounterReportDelivery--; | |
| 6466 } | |
| 6467 | |
| 6468 buildUnnamed3181() { | |
| 6469 var o = new core.List<api.DimensionValue>(); | |
| 6470 o.add(buildDimensionValue()); | |
| 6471 o.add(buildDimensionValue()); | |
| 6472 return o; | |
| 6473 } | |
| 6474 | |
| 6475 checkUnnamed3181(core.List<api.DimensionValue> o) { | |
| 6476 unittest.expect(o, unittest.hasLength(2)); | |
| 6477 checkDimensionValue(o[0]); | |
| 6478 checkDimensionValue(o[1]); | |
| 6479 } | |
| 6480 | |
| 6481 buildUnnamed3182() { | |
| 6482 var o = new core.List<api.DimensionValue>(); | |
| 6483 o.add(buildDimensionValue()); | |
| 6484 o.add(buildDimensionValue()); | |
| 6485 return o; | |
| 6486 } | |
| 6487 | |
| 6488 checkUnnamed3182(core.List<api.DimensionValue> o) { | |
| 6489 unittest.expect(o, unittest.hasLength(2)); | |
| 6490 checkDimensionValue(o[0]); | |
| 6491 checkDimensionValue(o[1]); | |
| 6492 } | |
| 6493 | |
| 6494 buildUnnamed3183() { | |
| 6495 var o = new core.List<api.SortedDimension>(); | |
| 6496 o.add(buildSortedDimension()); | |
| 6497 o.add(buildSortedDimension()); | |
| 6498 return o; | |
| 6499 } | |
| 6500 | |
| 6501 checkUnnamed3183(core.List<api.SortedDimension> o) { | |
| 6502 unittest.expect(o, unittest.hasLength(2)); | |
| 6503 checkSortedDimension(o[0]); | |
| 6504 checkSortedDimension(o[1]); | |
| 6505 } | |
| 6506 | |
| 6507 buildUnnamed3184() { | |
| 6508 var o = new core.List<core.String>(); | |
| 6509 o.add("foo"); | |
| 6510 o.add("foo"); | |
| 6511 return o; | |
| 6512 } | |
| 6513 | |
| 6514 checkUnnamed3184(core.List<core.String> o) { | |
| 6515 unittest.expect(o, unittest.hasLength(2)); | |
| 6516 unittest.expect(o[0], unittest.equals('foo')); | |
| 6517 unittest.expect(o[1], unittest.equals('foo')); | |
| 6518 } | |
| 6519 | |
| 6520 core.int buildCounterReportFloodlightCriteriaReportProperties = 0; | |
| 6521 buildReportFloodlightCriteriaReportProperties() { | |
| 6522 var o = new api.ReportFloodlightCriteriaReportProperties(); | |
| 6523 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6524 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6525 o.includeAttributedIPConversions = true; | |
| 6526 o.includeUnattributedCookieConversions = true; | |
| 6527 o.includeUnattributedIPConversions = true; | |
| 6528 } | |
| 6529 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6530 return o; | |
| 6531 } | |
| 6532 | |
| 6533 checkReportFloodlightCriteriaReportProperties(api.ReportFloodlightCriteriaReport
Properties o) { | |
| 6534 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6535 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6536 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6537 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6538 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6539 } | |
| 6540 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6541 } | |
| 6542 | |
| 6543 core.int buildCounterReportFloodlightCriteria = 0; | |
| 6544 buildReportFloodlightCriteria() { | |
| 6545 var o = new api.ReportFloodlightCriteria(); | |
| 6546 buildCounterReportFloodlightCriteria++; | |
| 6547 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6548 o.customRichMediaEvents = buildUnnamed3181(); | |
| 6549 o.dateRange = buildDateRange(); | |
| 6550 o.dimensionFilters = buildUnnamed3182(); | |
| 6551 o.dimensions = buildUnnamed3183(); | |
| 6552 o.floodlightConfigId = buildDimensionValue(); | |
| 6553 o.metricNames = buildUnnamed3184(); | |
| 6554 o.reportProperties = buildReportFloodlightCriteriaReportProperties(); | |
| 6555 } | |
| 6556 buildCounterReportFloodlightCriteria--; | |
| 6557 return o; | |
| 6558 } | |
| 6559 | |
| 6560 checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { | |
| 6561 buildCounterReportFloodlightCriteria++; | |
| 6562 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6563 checkUnnamed3181(o.customRichMediaEvents); | |
| 6564 checkDateRange(o.dateRange); | |
| 6565 checkUnnamed3182(o.dimensionFilters); | |
| 6566 checkUnnamed3183(o.dimensions); | |
| 6567 checkDimensionValue(o.floodlightConfigId); | |
| 6568 checkUnnamed3184(o.metricNames); | |
| 6569 checkReportFloodlightCriteriaReportProperties(o.reportProperties); | |
| 6570 } | |
| 6571 buildCounterReportFloodlightCriteria--; | |
| 6572 } | |
| 6573 | |
| 6574 buildUnnamed3185() { | |
| 6575 var o = new core.List<api.DimensionValue>(); | |
| 6576 o.add(buildDimensionValue()); | |
| 6577 o.add(buildDimensionValue()); | |
| 6578 return o; | |
| 6579 } | |
| 6580 | |
| 6581 checkUnnamed3185(core.List<api.DimensionValue> o) { | |
| 6582 unittest.expect(o, unittest.hasLength(2)); | |
| 6583 checkDimensionValue(o[0]); | |
| 6584 checkDimensionValue(o[1]); | |
| 6585 } | |
| 6586 | |
| 6587 buildUnnamed3186() { | |
| 6588 var o = new core.List<api.SortedDimension>(); | |
| 6589 o.add(buildSortedDimension()); | |
| 6590 o.add(buildSortedDimension()); | |
| 6591 return o; | |
| 6592 } | |
| 6593 | |
| 6594 checkUnnamed3186(core.List<api.SortedDimension> o) { | |
| 6595 unittest.expect(o, unittest.hasLength(2)); | |
| 6596 checkSortedDimension(o[0]); | |
| 6597 checkSortedDimension(o[1]); | |
| 6598 } | |
| 6599 | |
| 6600 buildUnnamed3187() { | |
| 6601 var o = new core.List<api.SortedDimension>(); | |
| 6602 o.add(buildSortedDimension()); | |
| 6603 o.add(buildSortedDimension()); | |
| 6604 return o; | |
| 6605 } | |
| 6606 | |
| 6607 checkUnnamed3187(core.List<api.SortedDimension> o) { | |
| 6608 unittest.expect(o, unittest.hasLength(2)); | |
| 6609 checkSortedDimension(o[0]); | |
| 6610 checkSortedDimension(o[1]); | |
| 6611 } | |
| 6612 | |
| 6613 buildUnnamed3188() { | |
| 6614 var o = new core.List<api.DimensionValue>(); | |
| 6615 o.add(buildDimensionValue()); | |
| 6616 o.add(buildDimensionValue()); | |
| 6617 return o; | |
| 6618 } | |
| 6619 | |
| 6620 checkUnnamed3188(core.List<api.DimensionValue> o) { | |
| 6621 unittest.expect(o, unittest.hasLength(2)); | |
| 6622 checkDimensionValue(o[0]); | |
| 6623 checkDimensionValue(o[1]); | |
| 6624 } | |
| 6625 | |
| 6626 buildUnnamed3189() { | |
| 6627 var o = new core.List<core.String>(); | |
| 6628 o.add("foo"); | |
| 6629 o.add("foo"); | |
| 6630 return o; | |
| 6631 } | |
| 6632 | |
| 6633 checkUnnamed3189(core.List<core.String> o) { | |
| 6634 unittest.expect(o, unittest.hasLength(2)); | |
| 6635 unittest.expect(o[0], unittest.equals('foo')); | |
| 6636 unittest.expect(o[1], unittest.equals('foo')); | |
| 6637 } | |
| 6638 | |
| 6639 buildUnnamed3190() { | |
| 6640 var o = new core.List<api.SortedDimension>(); | |
| 6641 o.add(buildSortedDimension()); | |
| 6642 o.add(buildSortedDimension()); | |
| 6643 return o; | |
| 6644 } | |
| 6645 | |
| 6646 checkUnnamed3190(core.List<api.SortedDimension> o) { | |
| 6647 unittest.expect(o, unittest.hasLength(2)); | |
| 6648 checkSortedDimension(o[0]); | |
| 6649 checkSortedDimension(o[1]); | |
| 6650 } | |
| 6651 | |
| 6652 core.int buildCounterReportPathToConversionCriteriaReportProperties = 0; | |
| 6653 buildReportPathToConversionCriteriaReportProperties() { | |
| 6654 var o = new api.ReportPathToConversionCriteriaReportProperties(); | |
| 6655 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6656 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6657 o.clicksLookbackWindow = 42; | |
| 6658 o.impressionsLookbackWindow = 42; | |
| 6659 o.includeAttributedIPConversions = true; | |
| 6660 o.includeUnattributedCookieConversions = true; | |
| 6661 o.includeUnattributedIPConversions = true; | |
| 6662 o.maximumClickInteractions = 42; | |
| 6663 o.maximumImpressionInteractions = 42; | |
| 6664 o.maximumInteractionGap = 42; | |
| 6665 o.pivotOnInteractionPath = true; | |
| 6666 } | |
| 6667 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6668 return o; | |
| 6669 } | |
| 6670 | |
| 6671 checkReportPathToConversionCriteriaReportProperties(api.ReportPathToConversionCr
iteriaReportProperties o) { | |
| 6672 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6673 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6674 unittest.expect(o.clicksLookbackWindow, unittest.equals(42)); | |
| 6675 unittest.expect(o.impressionsLookbackWindow, unittest.equals(42)); | |
| 6676 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6677 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6678 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6679 unittest.expect(o.maximumClickInteractions, unittest.equals(42)); | |
| 6680 unittest.expect(o.maximumImpressionInteractions, unittest.equals(42)); | |
| 6681 unittest.expect(o.maximumInteractionGap, unittest.equals(42)); | |
| 6682 unittest.expect(o.pivotOnInteractionPath, unittest.isTrue); | |
| 6683 } | |
| 6684 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6685 } | |
| 6686 | |
| 6687 core.int buildCounterReportPathToConversionCriteria = 0; | |
| 6688 buildReportPathToConversionCriteria() { | |
| 6689 var o = new api.ReportPathToConversionCriteria(); | |
| 6690 buildCounterReportPathToConversionCriteria++; | |
| 6691 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6692 o.activityFilters = buildUnnamed3185(); | |
| 6693 o.conversionDimensions = buildUnnamed3186(); | |
| 6694 o.customFloodlightVariables = buildUnnamed3187(); | |
| 6695 o.customRichMediaEvents = buildUnnamed3188(); | |
| 6696 o.dateRange = buildDateRange(); | |
| 6697 o.floodlightConfigId = buildDimensionValue(); | |
| 6698 o.metricNames = buildUnnamed3189(); | |
| 6699 o.perInteractionDimensions = buildUnnamed3190(); | |
| 6700 o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); | |
| 6701 } | |
| 6702 buildCounterReportPathToConversionCriteria--; | |
| 6703 return o; | |
| 6704 } | |
| 6705 | |
| 6706 checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { | |
| 6707 buildCounterReportPathToConversionCriteria++; | |
| 6708 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6709 checkUnnamed3185(o.activityFilters); | |
| 6710 checkUnnamed3186(o.conversionDimensions); | |
| 6711 checkUnnamed3187(o.customFloodlightVariables); | |
| 6712 checkUnnamed3188(o.customRichMediaEvents); | |
| 6713 checkDateRange(o.dateRange); | |
| 6714 checkDimensionValue(o.floodlightConfigId); | |
| 6715 checkUnnamed3189(o.metricNames); | |
| 6716 checkUnnamed3190(o.perInteractionDimensions); | |
| 6717 checkReportPathToConversionCriteriaReportProperties(o.reportProperties); | |
| 6718 } | |
| 6719 buildCounterReportPathToConversionCriteria--; | |
| 6720 } | |
| 6721 | |
| 6722 buildUnnamed3191() { | |
| 6723 var o = new core.List<api.DimensionValue>(); | |
| 6724 o.add(buildDimensionValue()); | |
| 6725 o.add(buildDimensionValue()); | |
| 6726 return o; | |
| 6727 } | |
| 6728 | |
| 6729 checkUnnamed3191(core.List<api.DimensionValue> o) { | |
| 6730 unittest.expect(o, unittest.hasLength(2)); | |
| 6731 checkDimensionValue(o[0]); | |
| 6732 checkDimensionValue(o[1]); | |
| 6733 } | |
| 6734 | |
| 6735 buildUnnamed3192() { | |
| 6736 var o = new core.List<api.SortedDimension>(); | |
| 6737 o.add(buildSortedDimension()); | |
| 6738 o.add(buildSortedDimension()); | |
| 6739 return o; | |
| 6740 } | |
| 6741 | |
| 6742 checkUnnamed3192(core.List<api.SortedDimension> o) { | |
| 6743 unittest.expect(o, unittest.hasLength(2)); | |
| 6744 checkSortedDimension(o[0]); | |
| 6745 checkSortedDimension(o[1]); | |
| 6746 } | |
| 6747 | |
| 6748 buildUnnamed3193() { | |
| 6749 var o = new core.List<core.String>(); | |
| 6750 o.add("foo"); | |
| 6751 o.add("foo"); | |
| 6752 return o; | |
| 6753 } | |
| 6754 | |
| 6755 checkUnnamed3193(core.List<core.String> o) { | |
| 6756 unittest.expect(o, unittest.hasLength(2)); | |
| 6757 unittest.expect(o[0], unittest.equals('foo')); | |
| 6758 unittest.expect(o[1], unittest.equals('foo')); | |
| 6759 } | |
| 6760 | |
| 6761 buildUnnamed3194() { | |
| 6762 var o = new core.List<core.String>(); | |
| 6763 o.add("foo"); | |
| 6764 o.add("foo"); | |
| 6765 return o; | |
| 6766 } | |
| 6767 | |
| 6768 checkUnnamed3194(core.List<core.String> o) { | |
| 6769 unittest.expect(o, unittest.hasLength(2)); | |
| 6770 unittest.expect(o[0], unittest.equals('foo')); | |
| 6771 unittest.expect(o[1], unittest.equals('foo')); | |
| 6772 } | |
| 6773 | |
| 6774 core.int buildCounterReportReachCriteria = 0; | |
| 6775 buildReportReachCriteria() { | |
| 6776 var o = new api.ReportReachCriteria(); | |
| 6777 buildCounterReportReachCriteria++; | |
| 6778 if (buildCounterReportReachCriteria < 3) { | |
| 6779 o.activities = buildActivities(); | |
| 6780 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6781 o.dateRange = buildDateRange(); | |
| 6782 o.dimensionFilters = buildUnnamed3191(); | |
| 6783 o.dimensions = buildUnnamed3192(); | |
| 6784 o.enableAllDimensionCombinations = true; | |
| 6785 o.metricNames = buildUnnamed3193(); | |
| 6786 o.reachByFrequencyMetricNames = buildUnnamed3194(); | |
| 6787 } | |
| 6788 buildCounterReportReachCriteria--; | |
| 6789 return o; | |
| 6790 } | |
| 6791 | |
| 6792 checkReportReachCriteria(api.ReportReachCriteria o) { | |
| 6793 buildCounterReportReachCriteria++; | |
| 6794 if (buildCounterReportReachCriteria < 3) { | |
| 6795 checkActivities(o.activities); | |
| 6796 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6797 checkDateRange(o.dateRange); | |
| 6798 checkUnnamed3191(o.dimensionFilters); | |
| 6799 checkUnnamed3192(o.dimensions); | |
| 6800 unittest.expect(o.enableAllDimensionCombinations, unittest.isTrue); | |
| 6801 checkUnnamed3193(o.metricNames); | |
| 6802 checkUnnamed3194(o.reachByFrequencyMetricNames); | |
| 6803 } | |
| 6804 buildCounterReportReachCriteria--; | |
| 6805 } | |
| 6806 | |
| 6807 buildUnnamed3195() { | |
| 6808 var o = new core.List<core.String>(); | |
| 6809 o.add("foo"); | |
| 6810 o.add("foo"); | |
| 6811 return o; | |
| 6812 } | |
| 6813 | |
| 6814 checkUnnamed3195(core.List<core.String> o) { | |
| 6815 unittest.expect(o, unittest.hasLength(2)); | |
| 6816 unittest.expect(o[0], unittest.equals('foo')); | |
| 6817 unittest.expect(o[1], unittest.equals('foo')); | |
| 6818 } | |
| 6819 | |
| 6820 core.int buildCounterReportSchedule = 0; | |
| 6821 buildReportSchedule() { | |
| 6822 var o = new api.ReportSchedule(); | |
| 6823 buildCounterReportSchedule++; | |
| 6824 if (buildCounterReportSchedule < 3) { | |
| 6825 o.active = true; | |
| 6826 o.every = 42; | |
| 6827 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6828 o.repeats = "foo"; | |
| 6829 o.repeatsOnWeekDays = buildUnnamed3195(); | |
| 6830 o.runsOnDayOfMonth = "foo"; | |
| 6831 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6832 } | |
| 6833 buildCounterReportSchedule--; | |
| 6834 return o; | |
| 6835 } | |
| 6836 | |
| 6837 checkReportSchedule(api.ReportSchedule o) { | |
| 6838 buildCounterReportSchedule++; | |
| 6839 if (buildCounterReportSchedule < 3) { | |
| 6840 unittest.expect(o.active, unittest.isTrue); | |
| 6841 unittest.expect(o.every, unittest.equals(42)); | |
| 6842 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T00:00:00"))); | |
| 6843 unittest.expect(o.repeats, unittest.equals('foo')); | |
| 6844 checkUnnamed3195(o.repeatsOnWeekDays); | |
| 6845 unittest.expect(o.runsOnDayOfMonth, unittest.equals('foo')); | |
| 6846 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6847 } | |
| 6848 buildCounterReportSchedule--; | |
| 6849 } | |
| 6850 | |
| 6851 core.int buildCounterReport = 0; | |
| 6852 buildReport() { | |
| 6853 var o = new api.Report(); | |
| 6854 buildCounterReport++; | |
| 6855 if (buildCounterReport < 3) { | |
| 6856 o.accountId = "foo"; | |
| 6857 o.criteria = buildReportCriteria(); | |
| 6858 o.crossDimensionReachCriteria = buildReportCrossDimensionReachCriteria(); | |
| 6859 o.delivery = buildReportDelivery(); | |
| 6860 o.etag = "foo"; | |
| 6861 o.fileName = "foo"; | |
| 6862 o.floodlightCriteria = buildReportFloodlightCriteria(); | |
| 6863 o.format = "foo"; | |
| 6864 o.id = "foo"; | |
| 6865 o.kind = "foo"; | |
| 6866 o.lastModifiedTime = "foo"; | |
| 6867 o.name = "foo"; | |
| 6868 o.ownerProfileId = "foo"; | |
| 6869 o.pathToConversionCriteria = buildReportPathToConversionCriteria(); | |
| 6870 o.reachCriteria = buildReportReachCriteria(); | |
| 6871 o.schedule = buildReportSchedule(); | |
| 6872 o.subAccountId = "foo"; | |
| 6873 o.type = "foo"; | |
| 6874 } | |
| 6875 buildCounterReport--; | |
| 6876 return o; | |
| 6877 } | |
| 6878 | |
| 6879 checkReport(api.Report o) { | |
| 6880 buildCounterReport++; | |
| 6881 if (buildCounterReport < 3) { | |
| 6882 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6883 checkReportCriteria(o.criteria); | |
| 6884 checkReportCrossDimensionReachCriteria(o.crossDimensionReachCriteria); | |
| 6885 checkReportDelivery(o.delivery); | |
| 6886 unittest.expect(o.etag, unittest.equals('foo')); | |
| 6887 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 6888 checkReportFloodlightCriteria(o.floodlightCriteria); | |
| 6889 unittest.expect(o.format, unittest.equals('foo')); | |
| 6890 unittest.expect(o.id, unittest.equals('foo')); | |
| 6891 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6892 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 6893 unittest.expect(o.name, unittest.equals('foo')); | |
| 6894 unittest.expect(o.ownerProfileId, unittest.equals('foo')); | |
| 6895 checkReportPathToConversionCriteria(o.pathToConversionCriteria); | |
| 6896 checkReportReachCriteria(o.reachCriteria); | |
| 6897 checkReportSchedule(o.schedule); | |
| 6898 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 6899 unittest.expect(o.type, unittest.equals('foo')); | |
| 6900 } | |
| 6901 buildCounterReport--; | |
| 6902 } | |
| 6903 | |
| 6904 buildUnnamed3196() { | |
| 6905 var o = new core.List<api.Dimension>(); | |
| 6906 o.add(buildDimension()); | |
| 6907 o.add(buildDimension()); | |
| 6908 return o; | |
| 6909 } | |
| 6910 | |
| 6911 checkUnnamed3196(core.List<api.Dimension> o) { | |
| 6912 unittest.expect(o, unittest.hasLength(2)); | |
| 6913 checkDimension(o[0]); | |
| 6914 checkDimension(o[1]); | |
| 6915 } | |
| 6916 | |
| 6917 buildUnnamed3197() { | |
| 6918 var o = new core.List<api.Dimension>(); | |
| 6919 o.add(buildDimension()); | |
| 6920 o.add(buildDimension()); | |
| 6921 return o; | |
| 6922 } | |
| 6923 | |
| 6924 checkUnnamed3197(core.List<api.Dimension> o) { | |
| 6925 unittest.expect(o, unittest.hasLength(2)); | |
| 6926 checkDimension(o[0]); | |
| 6927 checkDimension(o[1]); | |
| 6928 } | |
| 6929 | |
| 6930 buildUnnamed3198() { | |
| 6931 var o = new core.List<api.Metric>(); | |
| 6932 o.add(buildMetric()); | |
| 6933 o.add(buildMetric()); | |
| 6934 return o; | |
| 6935 } | |
| 6936 | |
| 6937 checkUnnamed3198(core.List<api.Metric> o) { | |
| 6938 unittest.expect(o, unittest.hasLength(2)); | |
| 6939 checkMetric(o[0]); | |
| 6940 checkMetric(o[1]); | |
| 6941 } | |
| 6942 | |
| 6943 buildUnnamed3199() { | |
| 6944 var o = new core.List<api.Metric>(); | |
| 6945 o.add(buildMetric()); | |
| 6946 o.add(buildMetric()); | |
| 6947 return o; | |
| 6948 } | |
| 6949 | |
| 6950 checkUnnamed3199(core.List<api.Metric> o) { | |
| 6951 unittest.expect(o, unittest.hasLength(2)); | |
| 6952 checkMetric(o[0]); | |
| 6953 checkMetric(o[1]); | |
| 6954 } | |
| 6955 | |
| 6956 core.int buildCounterReportCompatibleFields = 0; | |
| 6957 buildReportCompatibleFields() { | |
| 6958 var o = new api.ReportCompatibleFields(); | |
| 6959 buildCounterReportCompatibleFields++; | |
| 6960 if (buildCounterReportCompatibleFields < 3) { | |
| 6961 o.dimensionFilters = buildUnnamed3196(); | |
| 6962 o.dimensions = buildUnnamed3197(); | |
| 6963 o.kind = "foo"; | |
| 6964 o.metrics = buildUnnamed3198(); | |
| 6965 o.pivotedActivityMetrics = buildUnnamed3199(); | |
| 6966 } | |
| 6967 buildCounterReportCompatibleFields--; | |
| 6968 return o; | |
| 6969 } | |
| 6970 | |
| 6971 checkReportCompatibleFields(api.ReportCompatibleFields o) { | |
| 6972 buildCounterReportCompatibleFields++; | |
| 6973 if (buildCounterReportCompatibleFields < 3) { | |
| 6974 checkUnnamed3196(o.dimensionFilters); | |
| 6975 checkUnnamed3197(o.dimensions); | |
| 6976 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6977 checkUnnamed3198(o.metrics); | |
| 6978 checkUnnamed3199(o.pivotedActivityMetrics); | |
| 6979 } | |
| 6980 buildCounterReportCompatibleFields--; | |
| 6981 } | |
| 6982 | |
| 6983 buildUnnamed3200() { | |
| 6984 var o = new core.List<api.Report>(); | |
| 6985 o.add(buildReport()); | |
| 6986 o.add(buildReport()); | |
| 6987 return o; | |
| 6988 } | |
| 6989 | |
| 6990 checkUnnamed3200(core.List<api.Report> o) { | |
| 6991 unittest.expect(o, unittest.hasLength(2)); | |
| 6992 checkReport(o[0]); | |
| 6993 checkReport(o[1]); | |
| 6994 } | |
| 6995 | |
| 6996 core.int buildCounterReportList = 0; | |
| 6997 buildReportList() { | |
| 6998 var o = new api.ReportList(); | |
| 6999 buildCounterReportList++; | |
| 7000 if (buildCounterReportList < 3) { | |
| 7001 o.etag = "foo"; | |
| 7002 o.items = buildUnnamed3200(); | |
| 7003 o.kind = "foo"; | |
| 7004 o.nextPageToken = "foo"; | |
| 7005 } | |
| 7006 buildCounterReportList--; | |
| 7007 return o; | |
| 7008 } | |
| 7009 | |
| 7010 checkReportList(api.ReportList o) { | |
| 7011 buildCounterReportList++; | |
| 7012 if (buildCounterReportList < 3) { | |
| 7013 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7014 checkUnnamed3200(o.items); | |
| 7015 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7016 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7017 } | |
| 7018 buildCounterReportList--; | |
| 7019 } | |
| 7020 | |
| 7021 core.int buildCounterReportsConfiguration = 0; | |
| 7022 buildReportsConfiguration() { | |
| 7023 var o = new api.ReportsConfiguration(); | |
| 7024 buildCounterReportsConfiguration++; | |
| 7025 if (buildCounterReportsConfiguration < 3) { | |
| 7026 o.exposureToConversionEnabled = true; | |
| 7027 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7028 o.reportGenerationTimeZoneId = "foo"; | |
| 7029 } | |
| 7030 buildCounterReportsConfiguration--; | |
| 7031 return o; | |
| 7032 } | |
| 7033 | |
| 7034 checkReportsConfiguration(api.ReportsConfiguration o) { | |
| 7035 buildCounterReportsConfiguration++; | |
| 7036 if (buildCounterReportsConfiguration < 3) { | |
| 7037 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 7038 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7039 unittest.expect(o.reportGenerationTimeZoneId, unittest.equals('foo')); | |
| 7040 } | |
| 7041 buildCounterReportsConfiguration--; | |
| 7042 } | |
| 7043 | |
| 7044 core.int buildCounterRichMediaExitOverride = 0; | |
| 7045 buildRichMediaExitOverride() { | |
| 7046 var o = new api.RichMediaExitOverride(); | |
| 7047 buildCounterRichMediaExitOverride++; | |
| 7048 if (buildCounterRichMediaExitOverride < 3) { | |
| 7049 o.customExitUrl = "foo"; | |
| 7050 o.exitId = "foo"; | |
| 7051 o.useCustomExitUrl = true; | |
| 7052 } | |
| 7053 buildCounterRichMediaExitOverride--; | |
| 7054 return o; | |
| 7055 } | |
| 7056 | |
| 7057 checkRichMediaExitOverride(api.RichMediaExitOverride o) { | |
| 7058 buildCounterRichMediaExitOverride++; | |
| 7059 if (buildCounterRichMediaExitOverride < 3) { | |
| 7060 unittest.expect(o.customExitUrl, unittest.equals('foo')); | |
| 7061 unittest.expect(o.exitId, unittest.equals('foo')); | |
| 7062 unittest.expect(o.useCustomExitUrl, unittest.isTrue); | |
| 7063 } | |
| 7064 buildCounterRichMediaExitOverride--; | |
| 7065 } | |
| 7066 | |
| 7067 buildUnnamed3201() { | |
| 7068 var o = new core.List<api.SiteContact>(); | |
| 7069 o.add(buildSiteContact()); | |
| 7070 o.add(buildSiteContact()); | |
| 7071 return o; | |
| 7072 } | |
| 7073 | |
| 7074 checkUnnamed3201(core.List<api.SiteContact> o) { | |
| 7075 unittest.expect(o, unittest.hasLength(2)); | |
| 7076 checkSiteContact(o[0]); | |
| 7077 checkSiteContact(o[1]); | |
| 7078 } | |
| 7079 | |
| 7080 core.int buildCounterSite = 0; | |
| 7081 buildSite() { | |
| 7082 var o = new api.Site(); | |
| 7083 buildCounterSite++; | |
| 7084 if (buildCounterSite < 3) { | |
| 7085 o.accountId = "foo"; | |
| 7086 o.approved = true; | |
| 7087 o.directorySiteId = "foo"; | |
| 7088 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 7089 o.id = "foo"; | |
| 7090 o.idDimensionValue = buildDimensionValue(); | |
| 7091 o.keyName = "foo"; | |
| 7092 o.kind = "foo"; | |
| 7093 o.name = "foo"; | |
| 7094 o.siteContacts = buildUnnamed3201(); | |
| 7095 o.siteSettings = buildSiteSettings(); | |
| 7096 o.subaccountId = "foo"; | |
| 7097 } | |
| 7098 buildCounterSite--; | |
| 7099 return o; | |
| 7100 } | |
| 7101 | |
| 7102 checkSite(api.Site o) { | |
| 7103 buildCounterSite++; | |
| 7104 if (buildCounterSite < 3) { | |
| 7105 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7106 unittest.expect(o.approved, unittest.isTrue); | |
| 7107 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 7108 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 7109 unittest.expect(o.id, unittest.equals('foo')); | |
| 7110 checkDimensionValue(o.idDimensionValue); | |
| 7111 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 7112 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7113 unittest.expect(o.name, unittest.equals('foo')); | |
| 7114 checkUnnamed3201(o.siteContacts); | |
| 7115 checkSiteSettings(o.siteSettings); | |
| 7116 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7117 } | |
| 7118 buildCounterSite--; | |
| 7119 } | |
| 7120 | |
| 7121 core.int buildCounterSiteContact = 0; | |
| 7122 buildSiteContact() { | |
| 7123 var o = new api.SiteContact(); | |
| 7124 buildCounterSiteContact++; | |
| 7125 if (buildCounterSiteContact < 3) { | |
| 7126 o.address = "foo"; | |
| 7127 o.contactType = "foo"; | |
| 7128 o.email = "foo"; | |
| 7129 o.firstName = "foo"; | |
| 7130 o.id = "foo"; | |
| 7131 o.lastName = "foo"; | |
| 7132 o.phone = "foo"; | |
| 7133 o.title = "foo"; | |
| 7134 } | |
| 7135 buildCounterSiteContact--; | |
| 7136 return o; | |
| 7137 } | |
| 7138 | |
| 7139 checkSiteContact(api.SiteContact o) { | |
| 7140 buildCounterSiteContact++; | |
| 7141 if (buildCounterSiteContact < 3) { | |
| 7142 unittest.expect(o.address, unittest.equals('foo')); | |
| 7143 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 7144 unittest.expect(o.email, unittest.equals('foo')); | |
| 7145 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 7146 unittest.expect(o.id, unittest.equals('foo')); | |
| 7147 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 7148 unittest.expect(o.phone, unittest.equals('foo')); | |
| 7149 unittest.expect(o.title, unittest.equals('foo')); | |
| 7150 } | |
| 7151 buildCounterSiteContact--; | |
| 7152 } | |
| 7153 | |
| 7154 core.int buildCounterSiteSettings = 0; | |
| 7155 buildSiteSettings() { | |
| 7156 var o = new api.SiteSettings(); | |
| 7157 buildCounterSiteSettings++; | |
| 7158 if (buildCounterSiteSettings < 3) { | |
| 7159 o.activeViewOptOut = true; | |
| 7160 o.creativeSettings = buildCreativeSettings(); | |
| 7161 o.disableBrandSafeAds = true; | |
| 7162 o.disableNewCookie = true; | |
| 7163 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7164 o.tagSetting = buildTagSetting(); | |
| 7165 } | |
| 7166 buildCounterSiteSettings--; | |
| 7167 return o; | |
| 7168 } | |
| 7169 | |
| 7170 checkSiteSettings(api.SiteSettings o) { | |
| 7171 buildCounterSiteSettings++; | |
| 7172 if (buildCounterSiteSettings < 3) { | |
| 7173 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 7174 checkCreativeSettings(o.creativeSettings); | |
| 7175 unittest.expect(o.disableBrandSafeAds, unittest.isTrue); | |
| 7176 unittest.expect(o.disableNewCookie, unittest.isTrue); | |
| 7177 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7178 checkTagSetting(o.tagSetting); | |
| 7179 } | |
| 7180 buildCounterSiteSettings--; | |
| 7181 } | |
| 7182 | |
| 7183 buildUnnamed3202() { | |
| 7184 var o = new core.List<api.Site>(); | |
| 7185 o.add(buildSite()); | |
| 7186 o.add(buildSite()); | |
| 7187 return o; | |
| 7188 } | |
| 7189 | |
| 7190 checkUnnamed3202(core.List<api.Site> o) { | |
| 7191 unittest.expect(o, unittest.hasLength(2)); | |
| 7192 checkSite(o[0]); | |
| 7193 checkSite(o[1]); | |
| 7194 } | |
| 7195 | |
| 7196 core.int buildCounterSitesListResponse = 0; | |
| 7197 buildSitesListResponse() { | |
| 7198 var o = new api.SitesListResponse(); | |
| 7199 buildCounterSitesListResponse++; | |
| 7200 if (buildCounterSitesListResponse < 3) { | |
| 7201 o.kind = "foo"; | |
| 7202 o.nextPageToken = "foo"; | |
| 7203 o.sites = buildUnnamed3202(); | |
| 7204 } | |
| 7205 buildCounterSitesListResponse--; | |
| 7206 return o; | |
| 7207 } | |
| 7208 | |
| 7209 checkSitesListResponse(api.SitesListResponse o) { | |
| 7210 buildCounterSitesListResponse++; | |
| 7211 if (buildCounterSitesListResponse < 3) { | |
| 7212 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7213 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7214 checkUnnamed3202(o.sites); | |
| 7215 } | |
| 7216 buildCounterSitesListResponse--; | |
| 7217 } | |
| 7218 | |
| 7219 core.int buildCounterSize = 0; | |
| 7220 buildSize() { | |
| 7221 var o = new api.Size(); | |
| 7222 buildCounterSize++; | |
| 7223 if (buildCounterSize < 3) { | |
| 7224 o.height = 42; | |
| 7225 o.iab = true; | |
| 7226 o.id = "foo"; | |
| 7227 o.kind = "foo"; | |
| 7228 o.width = 42; | |
| 7229 } | |
| 7230 buildCounterSize--; | |
| 7231 return o; | |
| 7232 } | |
| 7233 | |
| 7234 checkSize(api.Size o) { | |
| 7235 buildCounterSize++; | |
| 7236 if (buildCounterSize < 3) { | |
| 7237 unittest.expect(o.height, unittest.equals(42)); | |
| 7238 unittest.expect(o.iab, unittest.isTrue); | |
| 7239 unittest.expect(o.id, unittest.equals('foo')); | |
| 7240 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7241 unittest.expect(o.width, unittest.equals(42)); | |
| 7242 } | |
| 7243 buildCounterSize--; | |
| 7244 } | |
| 7245 | |
| 7246 buildUnnamed3203() { | |
| 7247 var o = new core.List<api.Size>(); | |
| 7248 o.add(buildSize()); | |
| 7249 o.add(buildSize()); | |
| 7250 return o; | |
| 7251 } | |
| 7252 | |
| 7253 checkUnnamed3203(core.List<api.Size> o) { | |
| 7254 unittest.expect(o, unittest.hasLength(2)); | |
| 7255 checkSize(o[0]); | |
| 7256 checkSize(o[1]); | |
| 7257 } | |
| 7258 | |
| 7259 core.int buildCounterSizesListResponse = 0; | |
| 7260 buildSizesListResponse() { | |
| 7261 var o = new api.SizesListResponse(); | |
| 7262 buildCounterSizesListResponse++; | |
| 7263 if (buildCounterSizesListResponse < 3) { | |
| 7264 o.kind = "foo"; | |
| 7265 o.sizes = buildUnnamed3203(); | |
| 7266 } | |
| 7267 buildCounterSizesListResponse--; | |
| 7268 return o; | |
| 7269 } | |
| 7270 | |
| 7271 checkSizesListResponse(api.SizesListResponse o) { | |
| 7272 buildCounterSizesListResponse++; | |
| 7273 if (buildCounterSizesListResponse < 3) { | |
| 7274 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7275 checkUnnamed3203(o.sizes); | |
| 7276 } | |
| 7277 buildCounterSizesListResponse--; | |
| 7278 } | |
| 7279 | |
| 7280 core.int buildCounterSortedDimension = 0; | |
| 7281 buildSortedDimension() { | |
| 7282 var o = new api.SortedDimension(); | |
| 7283 buildCounterSortedDimension++; | |
| 7284 if (buildCounterSortedDimension < 3) { | |
| 7285 o.kind = "foo"; | |
| 7286 o.name = "foo"; | |
| 7287 o.sortOrder = "foo"; | |
| 7288 } | |
| 7289 buildCounterSortedDimension--; | |
| 7290 return o; | |
| 7291 } | |
| 7292 | |
| 7293 checkSortedDimension(api.SortedDimension o) { | |
| 7294 buildCounterSortedDimension++; | |
| 7295 if (buildCounterSortedDimension < 3) { | |
| 7296 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7297 unittest.expect(o.name, unittest.equals('foo')); | |
| 7298 unittest.expect(o.sortOrder, unittest.equals('foo')); | |
| 7299 } | |
| 7300 buildCounterSortedDimension--; | |
| 7301 } | |
| 7302 | |
| 7303 buildUnnamed3204() { | |
| 7304 var o = new core.List<core.String>(); | |
| 7305 o.add("foo"); | |
| 7306 o.add("foo"); | |
| 7307 return o; | |
| 7308 } | |
| 7309 | |
| 7310 checkUnnamed3204(core.List<core.String> o) { | |
| 7311 unittest.expect(o, unittest.hasLength(2)); | |
| 7312 unittest.expect(o[0], unittest.equals('foo')); | |
| 7313 unittest.expect(o[1], unittest.equals('foo')); | |
| 7314 } | |
| 7315 | |
| 7316 core.int buildCounterSubaccount = 0; | |
| 7317 buildSubaccount() { | |
| 7318 var o = new api.Subaccount(); | |
| 7319 buildCounterSubaccount++; | |
| 7320 if (buildCounterSubaccount < 3) { | |
| 7321 o.accountId = "foo"; | |
| 7322 o.availablePermissionIds = buildUnnamed3204(); | |
| 7323 o.id = "foo"; | |
| 7324 o.kind = "foo"; | |
| 7325 o.name = "foo"; | |
| 7326 } | |
| 7327 buildCounterSubaccount--; | |
| 7328 return o; | |
| 7329 } | |
| 7330 | |
| 7331 checkSubaccount(api.Subaccount o) { | |
| 7332 buildCounterSubaccount++; | |
| 7333 if (buildCounterSubaccount < 3) { | |
| 7334 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7335 checkUnnamed3204(o.availablePermissionIds); | |
| 7336 unittest.expect(o.id, unittest.equals('foo')); | |
| 7337 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7338 unittest.expect(o.name, unittest.equals('foo')); | |
| 7339 } | |
| 7340 buildCounterSubaccount--; | |
| 7341 } | |
| 7342 | |
| 7343 buildUnnamed3205() { | |
| 7344 var o = new core.List<api.Subaccount>(); | |
| 7345 o.add(buildSubaccount()); | |
| 7346 o.add(buildSubaccount()); | |
| 7347 return o; | |
| 7348 } | |
| 7349 | |
| 7350 checkUnnamed3205(core.List<api.Subaccount> o) { | |
| 7351 unittest.expect(o, unittest.hasLength(2)); | |
| 7352 checkSubaccount(o[0]); | |
| 7353 checkSubaccount(o[1]); | |
| 7354 } | |
| 7355 | |
| 7356 core.int buildCounterSubaccountsListResponse = 0; | |
| 7357 buildSubaccountsListResponse() { | |
| 7358 var o = new api.SubaccountsListResponse(); | |
| 7359 buildCounterSubaccountsListResponse++; | |
| 7360 if (buildCounterSubaccountsListResponse < 3) { | |
| 7361 o.kind = "foo"; | |
| 7362 o.nextPageToken = "foo"; | |
| 7363 o.subaccounts = buildUnnamed3205(); | |
| 7364 } | |
| 7365 buildCounterSubaccountsListResponse--; | |
| 7366 return o; | |
| 7367 } | |
| 7368 | |
| 7369 checkSubaccountsListResponse(api.SubaccountsListResponse o) { | |
| 7370 buildCounterSubaccountsListResponse++; | |
| 7371 if (buildCounterSubaccountsListResponse < 3) { | |
| 7372 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7373 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7374 checkUnnamed3205(o.subaccounts); | |
| 7375 } | |
| 7376 buildCounterSubaccountsListResponse--; | |
| 7377 } | |
| 7378 | |
| 7379 core.int buildCounterTagData = 0; | |
| 7380 buildTagData() { | |
| 7381 var o = new api.TagData(); | |
| 7382 buildCounterTagData++; | |
| 7383 if (buildCounterTagData < 3) { | |
| 7384 o.adId = "foo"; | |
| 7385 o.clickTag = "foo"; | |
| 7386 o.creativeId = "foo"; | |
| 7387 o.format = "foo"; | |
| 7388 o.impressionTag = "foo"; | |
| 7389 } | |
| 7390 buildCounterTagData--; | |
| 7391 return o; | |
| 7392 } | |
| 7393 | |
| 7394 checkTagData(api.TagData o) { | |
| 7395 buildCounterTagData++; | |
| 7396 if (buildCounterTagData < 3) { | |
| 7397 unittest.expect(o.adId, unittest.equals('foo')); | |
| 7398 unittest.expect(o.clickTag, unittest.equals('foo')); | |
| 7399 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 7400 unittest.expect(o.format, unittest.equals('foo')); | |
| 7401 unittest.expect(o.impressionTag, unittest.equals('foo')); | |
| 7402 } | |
| 7403 buildCounterTagData--; | |
| 7404 } | |
| 7405 | |
| 7406 core.int buildCounterTagSetting = 0; | |
| 7407 buildTagSetting() { | |
| 7408 var o = new api.TagSetting(); | |
| 7409 buildCounterTagSetting++; | |
| 7410 if (buildCounterTagSetting < 3) { | |
| 7411 o.additionalKeyValues = "foo"; | |
| 7412 o.includeClickThroughUrls = true; | |
| 7413 o.includeClickTracking = true; | |
| 7414 o.keywordOption = "foo"; | |
| 7415 } | |
| 7416 buildCounterTagSetting--; | |
| 7417 return o; | |
| 7418 } | |
| 7419 | |
| 7420 checkTagSetting(api.TagSetting o) { | |
| 7421 buildCounterTagSetting++; | |
| 7422 if (buildCounterTagSetting < 3) { | |
| 7423 unittest.expect(o.additionalKeyValues, unittest.equals('foo')); | |
| 7424 unittest.expect(o.includeClickThroughUrls, unittest.isTrue); | |
| 7425 unittest.expect(o.includeClickTracking, unittest.isTrue); | |
| 7426 unittest.expect(o.keywordOption, unittest.equals('foo')); | |
| 7427 } | |
| 7428 buildCounterTagSetting--; | |
| 7429 } | |
| 7430 | |
| 7431 core.int buildCounterTagSettings = 0; | |
| 7432 buildTagSettings() { | |
| 7433 var o = new api.TagSettings(); | |
| 7434 buildCounterTagSettings++; | |
| 7435 if (buildCounterTagSettings < 3) { | |
| 7436 o.dynamicTagEnabled = true; | |
| 7437 o.imageTagEnabled = true; | |
| 7438 } | |
| 7439 buildCounterTagSettings--; | |
| 7440 return o; | |
| 7441 } | |
| 7442 | |
| 7443 checkTagSettings(api.TagSettings o) { | |
| 7444 buildCounterTagSettings++; | |
| 7445 if (buildCounterTagSettings < 3) { | |
| 7446 unittest.expect(o.dynamicTagEnabled, unittest.isTrue); | |
| 7447 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 7448 } | |
| 7449 buildCounterTagSettings--; | |
| 7450 } | |
| 7451 | |
| 7452 core.int buildCounterTargetWindow = 0; | |
| 7453 buildTargetWindow() { | |
| 7454 var o = new api.TargetWindow(); | |
| 7455 buildCounterTargetWindow++; | |
| 7456 if (buildCounterTargetWindow < 3) { | |
| 7457 o.customHtml = "foo"; | |
| 7458 o.targetWindowOption = "foo"; | |
| 7459 } | |
| 7460 buildCounterTargetWindow--; | |
| 7461 return o; | |
| 7462 } | |
| 7463 | |
| 7464 checkTargetWindow(api.TargetWindow o) { | |
| 7465 buildCounterTargetWindow++; | |
| 7466 if (buildCounterTargetWindow < 3) { | |
| 7467 unittest.expect(o.customHtml, unittest.equals('foo')); | |
| 7468 unittest.expect(o.targetWindowOption, unittest.equals('foo')); | |
| 7469 } | |
| 7470 buildCounterTargetWindow--; | |
| 7471 } | |
| 7472 | |
| 7473 core.int buildCounterTargetableRemarketingList = 0; | |
| 7474 buildTargetableRemarketingList() { | |
| 7475 var o = new api.TargetableRemarketingList(); | |
| 7476 buildCounterTargetableRemarketingList++; | |
| 7477 if (buildCounterTargetableRemarketingList < 3) { | |
| 7478 o.accountId = "foo"; | |
| 7479 o.active = true; | |
| 7480 o.advertiserId = "foo"; | |
| 7481 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 7482 o.description = "foo"; | |
| 7483 o.id = "foo"; | |
| 7484 o.kind = "foo"; | |
| 7485 o.lifeSpan = "foo"; | |
| 7486 o.listSize = "foo"; | |
| 7487 o.listSource = "foo"; | |
| 7488 o.name = "foo"; | |
| 7489 o.subaccountId = "foo"; | |
| 7490 } | |
| 7491 buildCounterTargetableRemarketingList--; | |
| 7492 return o; | |
| 7493 } | |
| 7494 | |
| 7495 checkTargetableRemarketingList(api.TargetableRemarketingList o) { | |
| 7496 buildCounterTargetableRemarketingList++; | |
| 7497 if (buildCounterTargetableRemarketingList < 3) { | |
| 7498 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7499 unittest.expect(o.active, unittest.isTrue); | |
| 7500 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 7501 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 7502 unittest.expect(o.description, unittest.equals('foo')); | |
| 7503 unittest.expect(o.id, unittest.equals('foo')); | |
| 7504 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7505 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 7506 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 7507 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 7508 unittest.expect(o.name, unittest.equals('foo')); | |
| 7509 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7510 } | |
| 7511 buildCounterTargetableRemarketingList--; | |
| 7512 } | |
| 7513 | |
| 7514 buildUnnamed3206() { | |
| 7515 var o = new core.List<api.TargetableRemarketingList>(); | |
| 7516 o.add(buildTargetableRemarketingList()); | |
| 7517 o.add(buildTargetableRemarketingList()); | |
| 7518 return o; | |
| 7519 } | |
| 7520 | |
| 7521 checkUnnamed3206(core.List<api.TargetableRemarketingList> o) { | |
| 7522 unittest.expect(o, unittest.hasLength(2)); | |
| 7523 checkTargetableRemarketingList(o[0]); | |
| 7524 checkTargetableRemarketingList(o[1]); | |
| 7525 } | |
| 7526 | |
| 7527 core.int buildCounterTargetableRemarketingListsListResponse = 0; | |
| 7528 buildTargetableRemarketingListsListResponse() { | |
| 7529 var o = new api.TargetableRemarketingListsListResponse(); | |
| 7530 buildCounterTargetableRemarketingListsListResponse++; | |
| 7531 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7532 o.kind = "foo"; | |
| 7533 o.nextPageToken = "foo"; | |
| 7534 o.targetableRemarketingLists = buildUnnamed3206(); | |
| 7535 } | |
| 7536 buildCounterTargetableRemarketingListsListResponse--; | |
| 7537 return o; | |
| 7538 } | |
| 7539 | |
| 7540 checkTargetableRemarketingListsListResponse(api.TargetableRemarketingListsListRe
sponse o) { | |
| 7541 buildCounterTargetableRemarketingListsListResponse++; | |
| 7542 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7543 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7544 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7545 checkUnnamed3206(o.targetableRemarketingLists); | |
| 7546 } | |
| 7547 buildCounterTargetableRemarketingListsListResponse--; | |
| 7548 } | |
| 7549 | |
| 7550 buildUnnamed3207() { | |
| 7551 var o = new core.List<api.Browser>(); | |
| 7552 o.add(buildBrowser()); | |
| 7553 o.add(buildBrowser()); | |
| 7554 return o; | |
| 7555 } | |
| 7556 | |
| 7557 checkUnnamed3207(core.List<api.Browser> o) { | |
| 7558 unittest.expect(o, unittest.hasLength(2)); | |
| 7559 checkBrowser(o[0]); | |
| 7560 checkBrowser(o[1]); | |
| 7561 } | |
| 7562 | |
| 7563 buildUnnamed3208() { | |
| 7564 var o = new core.List<api.ConnectionType>(); | |
| 7565 o.add(buildConnectionType()); | |
| 7566 o.add(buildConnectionType()); | |
| 7567 return o; | |
| 7568 } | |
| 7569 | |
| 7570 checkUnnamed3208(core.List<api.ConnectionType> o) { | |
| 7571 unittest.expect(o, unittest.hasLength(2)); | |
| 7572 checkConnectionType(o[0]); | |
| 7573 checkConnectionType(o[1]); | |
| 7574 } | |
| 7575 | |
| 7576 buildUnnamed3209() { | |
| 7577 var o = new core.List<api.MobileCarrier>(); | |
| 7578 o.add(buildMobileCarrier()); | |
| 7579 o.add(buildMobileCarrier()); | |
| 7580 return o; | |
| 7581 } | |
| 7582 | |
| 7583 checkUnnamed3209(core.List<api.MobileCarrier> o) { | |
| 7584 unittest.expect(o, unittest.hasLength(2)); | |
| 7585 checkMobileCarrier(o[0]); | |
| 7586 checkMobileCarrier(o[1]); | |
| 7587 } | |
| 7588 | |
| 7589 buildUnnamed3210() { | |
| 7590 var o = new core.List<api.OperatingSystemVersion>(); | |
| 7591 o.add(buildOperatingSystemVersion()); | |
| 7592 o.add(buildOperatingSystemVersion()); | |
| 7593 return o; | |
| 7594 } | |
| 7595 | |
| 7596 checkUnnamed3210(core.List<api.OperatingSystemVersion> o) { | |
| 7597 unittest.expect(o, unittest.hasLength(2)); | |
| 7598 checkOperatingSystemVersion(o[0]); | |
| 7599 checkOperatingSystemVersion(o[1]); | |
| 7600 } | |
| 7601 | |
| 7602 buildUnnamed3211() { | |
| 7603 var o = new core.List<api.OperatingSystem>(); | |
| 7604 o.add(buildOperatingSystem()); | |
| 7605 o.add(buildOperatingSystem()); | |
| 7606 return o; | |
| 7607 } | |
| 7608 | |
| 7609 checkUnnamed3211(core.List<api.OperatingSystem> o) { | |
| 7610 unittest.expect(o, unittest.hasLength(2)); | |
| 7611 checkOperatingSystem(o[0]); | |
| 7612 checkOperatingSystem(o[1]); | |
| 7613 } | |
| 7614 | |
| 7615 buildUnnamed3212() { | |
| 7616 var o = new core.List<api.PlatformType>(); | |
| 7617 o.add(buildPlatformType()); | |
| 7618 o.add(buildPlatformType()); | |
| 7619 return o; | |
| 7620 } | |
| 7621 | |
| 7622 checkUnnamed3212(core.List<api.PlatformType> o) { | |
| 7623 unittest.expect(o, unittest.hasLength(2)); | |
| 7624 checkPlatformType(o[0]); | |
| 7625 checkPlatformType(o[1]); | |
| 7626 } | |
| 7627 | |
| 7628 core.int buildCounterTechnologyTargeting = 0; | |
| 7629 buildTechnologyTargeting() { | |
| 7630 var o = new api.TechnologyTargeting(); | |
| 7631 buildCounterTechnologyTargeting++; | |
| 7632 if (buildCounterTechnologyTargeting < 3) { | |
| 7633 o.browsers = buildUnnamed3207(); | |
| 7634 o.connectionTypes = buildUnnamed3208(); | |
| 7635 o.mobileCarriers = buildUnnamed3209(); | |
| 7636 o.operatingSystemVersions = buildUnnamed3210(); | |
| 7637 o.operatingSystems = buildUnnamed3211(); | |
| 7638 o.platformTypes = buildUnnamed3212(); | |
| 7639 } | |
| 7640 buildCounterTechnologyTargeting--; | |
| 7641 return o; | |
| 7642 } | |
| 7643 | |
| 7644 checkTechnologyTargeting(api.TechnologyTargeting o) { | |
| 7645 buildCounterTechnologyTargeting++; | |
| 7646 if (buildCounterTechnologyTargeting < 3) { | |
| 7647 checkUnnamed3207(o.browsers); | |
| 7648 checkUnnamed3208(o.connectionTypes); | |
| 7649 checkUnnamed3209(o.mobileCarriers); | |
| 7650 checkUnnamed3210(o.operatingSystemVersions); | |
| 7651 checkUnnamed3211(o.operatingSystems); | |
| 7652 checkUnnamed3212(o.platformTypes); | |
| 7653 } | |
| 7654 buildCounterTechnologyTargeting--; | |
| 7655 } | |
| 7656 | |
| 7657 core.int buildCounterThirdPartyAuthenticationToken = 0; | |
| 7658 buildThirdPartyAuthenticationToken() { | |
| 7659 var o = new api.ThirdPartyAuthenticationToken(); | |
| 7660 buildCounterThirdPartyAuthenticationToken++; | |
| 7661 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7662 o.name = "foo"; | |
| 7663 o.value = "foo"; | |
| 7664 } | |
| 7665 buildCounterThirdPartyAuthenticationToken--; | |
| 7666 return o; | |
| 7667 } | |
| 7668 | |
| 7669 checkThirdPartyAuthenticationToken(api.ThirdPartyAuthenticationToken o) { | |
| 7670 buildCounterThirdPartyAuthenticationToken++; | |
| 7671 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7672 unittest.expect(o.name, unittest.equals('foo')); | |
| 7673 unittest.expect(o.value, unittest.equals('foo')); | |
| 7674 } | |
| 7675 buildCounterThirdPartyAuthenticationToken--; | |
| 7676 } | |
| 7677 | |
| 7678 core.int buildCounterThirdPartyTrackingUrl = 0; | |
| 7679 buildThirdPartyTrackingUrl() { | |
| 7680 var o = new api.ThirdPartyTrackingUrl(); | |
| 7681 buildCounterThirdPartyTrackingUrl++; | |
| 7682 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7683 o.thirdPartyUrlType = "foo"; | |
| 7684 o.url = "foo"; | |
| 7685 } | |
| 7686 buildCounterThirdPartyTrackingUrl--; | |
| 7687 return o; | |
| 7688 } | |
| 7689 | |
| 7690 checkThirdPartyTrackingUrl(api.ThirdPartyTrackingUrl o) { | |
| 7691 buildCounterThirdPartyTrackingUrl++; | |
| 7692 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7693 unittest.expect(o.thirdPartyUrlType, unittest.equals('foo')); | |
| 7694 unittest.expect(o.url, unittest.equals('foo')); | |
| 7695 } | |
| 7696 buildCounterThirdPartyTrackingUrl--; | |
| 7697 } | |
| 7698 | |
| 7699 core.int buildCounterUserDefinedVariableConfiguration = 0; | |
| 7700 buildUserDefinedVariableConfiguration() { | |
| 7701 var o = new api.UserDefinedVariableConfiguration(); | |
| 7702 buildCounterUserDefinedVariableConfiguration++; | |
| 7703 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7704 o.dataType = "foo"; | |
| 7705 o.reportName = "foo"; | |
| 7706 o.variableType = "foo"; | |
| 7707 } | |
| 7708 buildCounterUserDefinedVariableConfiguration--; | |
| 7709 return o; | |
| 7710 } | |
| 7711 | |
| 7712 checkUserDefinedVariableConfiguration(api.UserDefinedVariableConfiguration o) { | |
| 7713 buildCounterUserDefinedVariableConfiguration++; | |
| 7714 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7715 unittest.expect(o.dataType, unittest.equals('foo')); | |
| 7716 unittest.expect(o.reportName, unittest.equals('foo')); | |
| 7717 unittest.expect(o.variableType, unittest.equals('foo')); | |
| 7718 } | |
| 7719 buildCounterUserDefinedVariableConfiguration--; | |
| 7720 } | |
| 7721 | |
| 7722 core.int buildCounterUserProfile = 0; | |
| 7723 buildUserProfile() { | |
| 7724 var o = new api.UserProfile(); | |
| 7725 buildCounterUserProfile++; | |
| 7726 if (buildCounterUserProfile < 3) { | |
| 7727 o.accountId = "foo"; | |
| 7728 o.accountName = "foo"; | |
| 7729 o.etag = "foo"; | |
| 7730 o.kind = "foo"; | |
| 7731 o.profileId = "foo"; | |
| 7732 o.subAccountId = "foo"; | |
| 7733 o.subAccountName = "foo"; | |
| 7734 o.userName = "foo"; | |
| 7735 } | |
| 7736 buildCounterUserProfile--; | |
| 7737 return o; | |
| 7738 } | |
| 7739 | |
| 7740 checkUserProfile(api.UserProfile o) { | |
| 7741 buildCounterUserProfile++; | |
| 7742 if (buildCounterUserProfile < 3) { | |
| 7743 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7744 unittest.expect(o.accountName, unittest.equals('foo')); | |
| 7745 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7746 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7747 unittest.expect(o.profileId, unittest.equals('foo')); | |
| 7748 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 7749 unittest.expect(o.subAccountName, unittest.equals('foo')); | |
| 7750 unittest.expect(o.userName, unittest.equals('foo')); | |
| 7751 } | |
| 7752 buildCounterUserProfile--; | |
| 7753 } | |
| 7754 | |
| 7755 buildUnnamed3213() { | |
| 7756 var o = new core.List<api.UserProfile>(); | |
| 7757 o.add(buildUserProfile()); | |
| 7758 o.add(buildUserProfile()); | |
| 7759 return o; | |
| 7760 } | |
| 7761 | |
| 7762 checkUnnamed3213(core.List<api.UserProfile> o) { | |
| 7763 unittest.expect(o, unittest.hasLength(2)); | |
| 7764 checkUserProfile(o[0]); | |
| 7765 checkUserProfile(o[1]); | |
| 7766 } | |
| 7767 | |
| 7768 core.int buildCounterUserProfileList = 0; | |
| 7769 buildUserProfileList() { | |
| 7770 var o = new api.UserProfileList(); | |
| 7771 buildCounterUserProfileList++; | |
| 7772 if (buildCounterUserProfileList < 3) { | |
| 7773 o.etag = "foo"; | |
| 7774 o.items = buildUnnamed3213(); | |
| 7775 o.kind = "foo"; | |
| 7776 } | |
| 7777 buildCounterUserProfileList--; | |
| 7778 return o; | |
| 7779 } | |
| 7780 | |
| 7781 checkUserProfileList(api.UserProfileList o) { | |
| 7782 buildCounterUserProfileList++; | |
| 7783 if (buildCounterUserProfileList < 3) { | |
| 7784 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7785 checkUnnamed3213(o.items); | |
| 7786 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7787 } | |
| 7788 buildCounterUserProfileList--; | |
| 7789 } | |
| 7790 | |
| 7791 buildUnnamed3214() { | |
| 7792 var o = new core.List<api.UserRolePermission>(); | |
| 7793 o.add(buildUserRolePermission()); | |
| 7794 o.add(buildUserRolePermission()); | |
| 7795 return o; | |
| 7796 } | |
| 7797 | |
| 7798 checkUnnamed3214(core.List<api.UserRolePermission> o) { | |
| 7799 unittest.expect(o, unittest.hasLength(2)); | |
| 7800 checkUserRolePermission(o[0]); | |
| 7801 checkUserRolePermission(o[1]); | |
| 7802 } | |
| 7803 | |
| 7804 core.int buildCounterUserRole = 0; | |
| 7805 buildUserRole() { | |
| 7806 var o = new api.UserRole(); | |
| 7807 buildCounterUserRole++; | |
| 7808 if (buildCounterUserRole < 3) { | |
| 7809 o.accountId = "foo"; | |
| 7810 o.defaultUserRole = true; | |
| 7811 o.id = "foo"; | |
| 7812 o.kind = "foo"; | |
| 7813 o.name = "foo"; | |
| 7814 o.parentUserRoleId = "foo"; | |
| 7815 o.permissions = buildUnnamed3214(); | |
| 7816 o.subaccountId = "foo"; | |
| 7817 } | |
| 7818 buildCounterUserRole--; | |
| 7819 return o; | |
| 7820 } | |
| 7821 | |
| 7822 checkUserRole(api.UserRole o) { | |
| 7823 buildCounterUserRole++; | |
| 7824 if (buildCounterUserRole < 3) { | |
| 7825 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7826 unittest.expect(o.defaultUserRole, unittest.isTrue); | |
| 7827 unittest.expect(o.id, unittest.equals('foo')); | |
| 7828 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7829 unittest.expect(o.name, unittest.equals('foo')); | |
| 7830 unittest.expect(o.parentUserRoleId, unittest.equals('foo')); | |
| 7831 checkUnnamed3214(o.permissions); | |
| 7832 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7833 } | |
| 7834 buildCounterUserRole--; | |
| 7835 } | |
| 7836 | |
| 7837 core.int buildCounterUserRolePermission = 0; | |
| 7838 buildUserRolePermission() { | |
| 7839 var o = new api.UserRolePermission(); | |
| 7840 buildCounterUserRolePermission++; | |
| 7841 if (buildCounterUserRolePermission < 3) { | |
| 7842 o.availability = "foo"; | |
| 7843 o.id = "foo"; | |
| 7844 o.kind = "foo"; | |
| 7845 o.name = "foo"; | |
| 7846 o.permissionGroupId = "foo"; | |
| 7847 } | |
| 7848 buildCounterUserRolePermission--; | |
| 7849 return o; | |
| 7850 } | |
| 7851 | |
| 7852 checkUserRolePermission(api.UserRolePermission o) { | |
| 7853 buildCounterUserRolePermission++; | |
| 7854 if (buildCounterUserRolePermission < 3) { | |
| 7855 unittest.expect(o.availability, unittest.equals('foo')); | |
| 7856 unittest.expect(o.id, unittest.equals('foo')); | |
| 7857 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7858 unittest.expect(o.name, unittest.equals('foo')); | |
| 7859 unittest.expect(o.permissionGroupId, unittest.equals('foo')); | |
| 7860 } | |
| 7861 buildCounterUserRolePermission--; | |
| 7862 } | |
| 7863 | |
| 7864 core.int buildCounterUserRolePermissionGroup = 0; | |
| 7865 buildUserRolePermissionGroup() { | |
| 7866 var o = new api.UserRolePermissionGroup(); | |
| 7867 buildCounterUserRolePermissionGroup++; | |
| 7868 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7869 o.id = "foo"; | |
| 7870 o.kind = "foo"; | |
| 7871 o.name = "foo"; | |
| 7872 } | |
| 7873 buildCounterUserRolePermissionGroup--; | |
| 7874 return o; | |
| 7875 } | |
| 7876 | |
| 7877 checkUserRolePermissionGroup(api.UserRolePermissionGroup o) { | |
| 7878 buildCounterUserRolePermissionGroup++; | |
| 7879 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7880 unittest.expect(o.id, unittest.equals('foo')); | |
| 7881 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7882 unittest.expect(o.name, unittest.equals('foo')); | |
| 7883 } | |
| 7884 buildCounterUserRolePermissionGroup--; | |
| 7885 } | |
| 7886 | |
| 7887 buildUnnamed3215() { | |
| 7888 var o = new core.List<api.UserRolePermissionGroup>(); | |
| 7889 o.add(buildUserRolePermissionGroup()); | |
| 7890 o.add(buildUserRolePermissionGroup()); | |
| 7891 return o; | |
| 7892 } | |
| 7893 | |
| 7894 checkUnnamed3215(core.List<api.UserRolePermissionGroup> o) { | |
| 7895 unittest.expect(o, unittest.hasLength(2)); | |
| 7896 checkUserRolePermissionGroup(o[0]); | |
| 7897 checkUserRolePermissionGroup(o[1]); | |
| 7898 } | |
| 7899 | |
| 7900 core.int buildCounterUserRolePermissionGroupsListResponse = 0; | |
| 7901 buildUserRolePermissionGroupsListResponse() { | |
| 7902 var o = new api.UserRolePermissionGroupsListResponse(); | |
| 7903 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7904 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7905 o.kind = "foo"; | |
| 7906 o.userRolePermissionGroups = buildUnnamed3215(); | |
| 7907 } | |
| 7908 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7909 return o; | |
| 7910 } | |
| 7911 | |
| 7912 checkUserRolePermissionGroupsListResponse(api.UserRolePermissionGroupsListRespon
se o) { | |
| 7913 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7914 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7915 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7916 checkUnnamed3215(o.userRolePermissionGroups); | |
| 7917 } | |
| 7918 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7919 } | |
| 7920 | |
| 7921 buildUnnamed3216() { | |
| 7922 var o = new core.List<api.UserRolePermission>(); | |
| 7923 o.add(buildUserRolePermission()); | |
| 7924 o.add(buildUserRolePermission()); | |
| 7925 return o; | |
| 7926 } | |
| 7927 | |
| 7928 checkUnnamed3216(core.List<api.UserRolePermission> o) { | |
| 7929 unittest.expect(o, unittest.hasLength(2)); | |
| 7930 checkUserRolePermission(o[0]); | |
| 7931 checkUserRolePermission(o[1]); | |
| 7932 } | |
| 7933 | |
| 7934 core.int buildCounterUserRolePermissionsListResponse = 0; | |
| 7935 buildUserRolePermissionsListResponse() { | |
| 7936 var o = new api.UserRolePermissionsListResponse(); | |
| 7937 buildCounterUserRolePermissionsListResponse++; | |
| 7938 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7939 o.kind = "foo"; | |
| 7940 o.userRolePermissions = buildUnnamed3216(); | |
| 7941 } | |
| 7942 buildCounterUserRolePermissionsListResponse--; | |
| 7943 return o; | |
| 7944 } | |
| 7945 | |
| 7946 checkUserRolePermissionsListResponse(api.UserRolePermissionsListResponse o) { | |
| 7947 buildCounterUserRolePermissionsListResponse++; | |
| 7948 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7949 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7950 checkUnnamed3216(o.userRolePermissions); | |
| 7951 } | |
| 7952 buildCounterUserRolePermissionsListResponse--; | |
| 7953 } | |
| 7954 | |
| 7955 buildUnnamed3217() { | |
| 7956 var o = new core.List<api.UserRole>(); | |
| 7957 o.add(buildUserRole()); | |
| 7958 o.add(buildUserRole()); | |
| 7959 return o; | |
| 7960 } | |
| 7961 | |
| 7962 checkUnnamed3217(core.List<api.UserRole> o) { | |
| 7963 unittest.expect(o, unittest.hasLength(2)); | |
| 7964 checkUserRole(o[0]); | |
| 7965 checkUserRole(o[1]); | |
| 7966 } | |
| 7967 | |
| 7968 core.int buildCounterUserRolesListResponse = 0; | |
| 7969 buildUserRolesListResponse() { | |
| 7970 var o = new api.UserRolesListResponse(); | |
| 7971 buildCounterUserRolesListResponse++; | |
| 7972 if (buildCounterUserRolesListResponse < 3) { | |
| 7973 o.kind = "foo"; | |
| 7974 o.nextPageToken = "foo"; | |
| 7975 o.userRoles = buildUnnamed3217(); | |
| 7976 } | |
| 7977 buildCounterUserRolesListResponse--; | |
| 7978 return o; | |
| 7979 } | |
| 7980 | |
| 7981 checkUserRolesListResponse(api.UserRolesListResponse o) { | |
| 7982 buildCounterUserRolesListResponse++; | |
| 7983 if (buildCounterUserRolesListResponse < 3) { | |
| 7984 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7985 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7986 checkUnnamed3217(o.userRoles); | |
| 7987 } | |
| 7988 buildCounterUserRolesListResponse--; | |
| 7989 } | |
| 7990 | |
| 7991 buildUnnamed3218() { | |
| 7992 var o = new core.List<core.String>(); | |
| 7993 o.add("foo"); | |
| 7994 o.add("foo"); | |
| 7995 return o; | |
| 7996 } | |
| 7997 | |
| 7998 checkUnnamed3218(core.List<core.String> o) { | |
| 7999 unittest.expect(o, unittest.hasLength(2)); | |
| 8000 unittest.expect(o[0], unittest.equals('foo')); | |
| 8001 unittest.expect(o[1], unittest.equals('foo')); | |
| 8002 } | |
| 8003 | |
| 8004 buildUnnamed3219() { | |
| 8005 var o = new core.List<core.String>(); | |
| 8006 o.add("foo"); | |
| 8007 o.add("foo"); | |
| 8008 return o; | |
| 8009 } | |
| 8010 | |
| 8011 checkUnnamed3219(core.List<core.String> o) { | |
| 8012 unittest.expect(o, unittest.hasLength(2)); | |
| 8013 unittest.expect(o[0], unittest.equals('foo')); | |
| 8014 unittest.expect(o[1], unittest.equals('foo')); | |
| 8015 } | |
| 8016 | |
| 8017 buildUnnamed3220() { | |
| 8018 var o = new core.List<core.String>(); | |
| 8019 o.add("foo"); | |
| 8020 o.add("foo"); | |
| 8021 return o; | |
| 8022 } | |
| 8023 | |
| 8024 checkUnnamed3220(core.List<core.String> o) { | |
| 8025 unittest.expect(o, unittest.hasLength(2)); | |
| 8026 unittest.expect(o[0], unittest.equals('foo')); | |
| 8027 unittest.expect(o[1], unittest.equals('foo')); | |
| 8028 } | |
| 8029 | |
| 8030 buildUnnamed3221() { | |
| 8031 var o = new core.List<core.String>(); | |
| 8032 o.add("foo"); | |
| 8033 o.add("foo"); | |
| 8034 return o; | |
| 8035 } | |
| 8036 | |
| 8037 checkUnnamed3221(core.List<core.String> o) { | |
| 8038 unittest.expect(o, unittest.hasLength(2)); | |
| 8039 unittest.expect(o[0], unittest.equals('foo')); | |
| 8040 unittest.expect(o[1], unittest.equals('foo')); | |
| 8041 } | |
| 8042 | |
| 8043 buildUnnamed3222() { | |
| 8044 var o = new core.List<core.String>(); | |
| 8045 o.add("foo"); | |
| 8046 o.add("foo"); | |
| 8047 return o; | |
| 8048 } | |
| 8049 | |
| 8050 checkUnnamed3222(core.List<core.String> o) { | |
| 8051 unittest.expect(o, unittest.hasLength(2)); | |
| 8052 unittest.expect(o[0], unittest.equals('foo')); | |
| 8053 unittest.expect(o[1], unittest.equals('foo')); | |
| 8054 } | |
| 8055 | |
| 8056 buildUnnamed3223() { | |
| 8057 var o = new core.List<core.String>(); | |
| 8058 o.add("foo"); | |
| 8059 o.add("foo"); | |
| 8060 return o; | |
| 8061 } | |
| 8062 | |
| 8063 checkUnnamed3223(core.List<core.String> o) { | |
| 8064 unittest.expect(o, unittest.hasLength(2)); | |
| 8065 unittest.expect(o[0], unittest.equals('foo')); | |
| 8066 unittest.expect(o[1], unittest.equals('foo')); | |
| 8067 } | |
| 8068 | |
| 8069 buildUnnamed3224() { | |
| 8070 var o = new core.List<core.String>(); | |
| 8071 o.add("foo"); | |
| 8072 o.add("foo"); | |
| 8073 return o; | |
| 8074 } | |
| 8075 | |
| 8076 checkUnnamed3224(core.List<core.String> o) { | |
| 8077 unittest.expect(o, unittest.hasLength(2)); | |
| 8078 unittest.expect(o[0], unittest.equals('foo')); | |
| 8079 unittest.expect(o[1], unittest.equals('foo')); | |
| 8080 } | |
| 8081 | |
| 8082 buildUnnamed3225() { | |
| 8083 var o = new core.List<core.String>(); | |
| 8084 o.add("foo"); | |
| 8085 o.add("foo"); | |
| 8086 return o; | |
| 8087 } | |
| 8088 | |
| 8089 checkUnnamed3225(core.List<core.String> o) { | |
| 8090 unittest.expect(o, unittest.hasLength(2)); | |
| 8091 unittest.expect(o[0], unittest.equals('foo')); | |
| 8092 unittest.expect(o[1], unittest.equals('foo')); | |
| 8093 } | |
| 8094 | |
| 8095 buildUnnamed3226() { | |
| 8096 var o = new core.List<core.String>(); | |
| 8097 o.add("foo"); | |
| 8098 o.add("foo"); | |
| 8099 return o; | |
| 8100 } | |
| 8101 | |
| 8102 checkUnnamed3226(core.List<core.String> o) { | |
| 8103 unittest.expect(o, unittest.hasLength(2)); | |
| 8104 unittest.expect(o[0], unittest.equals('foo')); | |
| 8105 unittest.expect(o[1], unittest.equals('foo')); | |
| 8106 } | |
| 8107 | |
| 8108 buildUnnamed3227() { | |
| 8109 var o = new core.List<core.String>(); | |
| 8110 o.add("foo"); | |
| 8111 o.add("foo"); | |
| 8112 return o; | |
| 8113 } | |
| 8114 | |
| 8115 checkUnnamed3227(core.List<core.String> o) { | |
| 8116 unittest.expect(o, unittest.hasLength(2)); | |
| 8117 unittest.expect(o[0], unittest.equals('foo')); | |
| 8118 unittest.expect(o[1], unittest.equals('foo')); | |
| 8119 } | |
| 8120 | |
| 8121 buildUnnamed3228() { | |
| 8122 var o = new core.List<core.String>(); | |
| 8123 o.add("foo"); | |
| 8124 o.add("foo"); | |
| 8125 return o; | |
| 8126 } | |
| 8127 | |
| 8128 checkUnnamed3228(core.List<core.String> o) { | |
| 8129 unittest.expect(o, unittest.hasLength(2)); | |
| 8130 unittest.expect(o[0], unittest.equals('foo')); | |
| 8131 unittest.expect(o[1], unittest.equals('foo')); | |
| 8132 } | |
| 8133 | |
| 8134 buildUnnamed3229() { | |
| 8135 var o = new core.List<core.String>(); | |
| 8136 o.add("foo"); | |
| 8137 o.add("foo"); | |
| 8138 return o; | |
| 8139 } | |
| 8140 | |
| 8141 checkUnnamed3229(core.List<core.String> o) { | |
| 8142 unittest.expect(o, unittest.hasLength(2)); | |
| 8143 unittest.expect(o[0], unittest.equals('foo')); | |
| 8144 unittest.expect(o[1], unittest.equals('foo')); | |
| 8145 } | |
| 8146 | |
| 8147 buildUnnamed3230() { | |
| 8148 var o = new core.List<core.String>(); | |
| 8149 o.add("foo"); | |
| 8150 o.add("foo"); | |
| 8151 return o; | |
| 8152 } | |
| 8153 | |
| 8154 checkUnnamed3230(core.List<core.String> o) { | |
| 8155 unittest.expect(o, unittest.hasLength(2)); | |
| 8156 unittest.expect(o[0], unittest.equals('foo')); | |
| 8157 unittest.expect(o[1], unittest.equals('foo')); | |
| 8158 } | |
| 8159 | |
| 8160 buildUnnamed3231() { | |
| 8161 var o = new core.List<core.String>(); | |
| 8162 o.add("foo"); | |
| 8163 o.add("foo"); | |
| 8164 return o; | |
| 8165 } | |
| 8166 | |
| 8167 checkUnnamed3231(core.List<core.String> o) { | |
| 8168 unittest.expect(o, unittest.hasLength(2)); | |
| 8169 unittest.expect(o[0], unittest.equals('foo')); | |
| 8170 unittest.expect(o[1], unittest.equals('foo')); | |
| 8171 } | |
| 8172 | |
| 8173 buildUnnamed3232() { | |
| 8174 var o = new core.List<core.String>(); | |
| 8175 o.add("foo"); | |
| 8176 o.add("foo"); | |
| 8177 return o; | |
| 8178 } | |
| 8179 | |
| 8180 checkUnnamed3232(core.List<core.String> o) { | |
| 8181 unittest.expect(o, unittest.hasLength(2)); | |
| 8182 unittest.expect(o[0], unittest.equals('foo')); | |
| 8183 unittest.expect(o[1], unittest.equals('foo')); | |
| 8184 } | |
| 8185 | |
| 8186 buildUnnamed3233() { | |
| 8187 var o = new core.List<core.String>(); | |
| 8188 o.add("foo"); | |
| 8189 o.add("foo"); | |
| 8190 return o; | |
| 8191 } | |
| 8192 | |
| 8193 checkUnnamed3233(core.List<core.String> o) { | |
| 8194 unittest.expect(o, unittest.hasLength(2)); | |
| 8195 unittest.expect(o[0], unittest.equals('foo')); | |
| 8196 unittest.expect(o[1], unittest.equals('foo')); | |
| 8197 } | |
| 8198 | |
| 8199 buildUnnamed3234() { | |
| 8200 var o = new core.List<core.String>(); | |
| 8201 o.add("foo"); | |
| 8202 o.add("foo"); | |
| 8203 return o; | |
| 8204 } | |
| 8205 | |
| 8206 checkUnnamed3234(core.List<core.String> o) { | |
| 8207 unittest.expect(o, unittest.hasLength(2)); | |
| 8208 unittest.expect(o[0], unittest.equals('foo')); | |
| 8209 unittest.expect(o[1], unittest.equals('foo')); | |
| 8210 } | |
| 8211 | |
| 8212 buildUnnamed3235() { | |
| 8213 var o = new core.List<core.String>(); | |
| 8214 o.add("foo"); | |
| 8215 o.add("foo"); | |
| 8216 return o; | |
| 8217 } | |
| 8218 | |
| 8219 checkUnnamed3235(core.List<core.String> o) { | |
| 8220 unittest.expect(o, unittest.hasLength(2)); | |
| 8221 unittest.expect(o[0], unittest.equals('foo')); | |
| 8222 unittest.expect(o[1], unittest.equals('foo')); | |
| 8223 } | |
| 8224 | |
| 8225 buildUnnamed3236() { | |
| 8226 var o = new core.List<core.String>(); | |
| 8227 o.add("foo"); | |
| 8228 o.add("foo"); | |
| 8229 return o; | |
| 8230 } | |
| 8231 | |
| 8232 checkUnnamed3236(core.List<core.String> o) { | |
| 8233 unittest.expect(o, unittest.hasLength(2)); | |
| 8234 unittest.expect(o[0], unittest.equals('foo')); | |
| 8235 unittest.expect(o[1], unittest.equals('foo')); | |
| 8236 } | |
| 8237 | |
| 8238 buildUnnamed3237() { | |
| 8239 var o = new core.List<core.String>(); | |
| 8240 o.add("foo"); | |
| 8241 o.add("foo"); | |
| 8242 return o; | |
| 8243 } | |
| 8244 | |
| 8245 checkUnnamed3237(core.List<core.String> o) { | |
| 8246 unittest.expect(o, unittest.hasLength(2)); | |
| 8247 unittest.expect(o[0], unittest.equals('foo')); | |
| 8248 unittest.expect(o[1], unittest.equals('foo')); | |
| 8249 } | |
| 8250 | |
| 8251 buildUnnamed3238() { | |
| 8252 var o = new core.List<core.String>(); | |
| 8253 o.add("foo"); | |
| 8254 o.add("foo"); | |
| 8255 return o; | |
| 8256 } | |
| 8257 | |
| 8258 checkUnnamed3238(core.List<core.String> o) { | |
| 8259 unittest.expect(o, unittest.hasLength(2)); | |
| 8260 unittest.expect(o[0], unittest.equals('foo')); | |
| 8261 unittest.expect(o[1], unittest.equals('foo')); | |
| 8262 } | |
| 8263 | |
| 8264 buildUnnamed3239() { | |
| 8265 var o = new core.List<core.String>(); | |
| 8266 o.add("foo"); | |
| 8267 o.add("foo"); | |
| 8268 return o; | |
| 8269 } | |
| 8270 | |
| 8271 checkUnnamed3239(core.List<core.String> o) { | |
| 8272 unittest.expect(o, unittest.hasLength(2)); | |
| 8273 unittest.expect(o[0], unittest.equals('foo')); | |
| 8274 unittest.expect(o[1], unittest.equals('foo')); | |
| 8275 } | |
| 8276 | |
| 8277 buildUnnamed3240() { | |
| 8278 var o = new core.List<core.String>(); | |
| 8279 o.add("foo"); | |
| 8280 o.add("foo"); | |
| 8281 return o; | |
| 8282 } | |
| 8283 | |
| 8284 checkUnnamed3240(core.List<core.String> o) { | |
| 8285 unittest.expect(o, unittest.hasLength(2)); | |
| 8286 unittest.expect(o[0], unittest.equals('foo')); | |
| 8287 unittest.expect(o[1], unittest.equals('foo')); | |
| 8288 } | |
| 8289 | |
| 8290 buildUnnamed3241() { | |
| 8291 var o = new core.List<core.String>(); | |
| 8292 o.add("foo"); | |
| 8293 o.add("foo"); | |
| 8294 return o; | |
| 8295 } | |
| 8296 | |
| 8297 checkUnnamed3241(core.List<core.String> o) { | |
| 8298 unittest.expect(o, unittest.hasLength(2)); | |
| 8299 unittest.expect(o[0], unittest.equals('foo')); | |
| 8300 unittest.expect(o[1], unittest.equals('foo')); | |
| 8301 } | |
| 8302 | |
| 8303 buildUnnamed3242() { | |
| 8304 var o = new core.List<core.String>(); | |
| 8305 o.add("foo"); | |
| 8306 o.add("foo"); | |
| 8307 return o; | |
| 8308 } | |
| 8309 | |
| 8310 checkUnnamed3242(core.List<core.String> o) { | |
| 8311 unittest.expect(o, unittest.hasLength(2)); | |
| 8312 unittest.expect(o[0], unittest.equals('foo')); | |
| 8313 unittest.expect(o[1], unittest.equals('foo')); | |
| 8314 } | |
| 8315 | |
| 8316 buildUnnamed3243() { | |
| 8317 var o = new core.List<core.String>(); | |
| 8318 o.add("foo"); | |
| 8319 o.add("foo"); | |
| 8320 return o; | |
| 8321 } | |
| 8322 | |
| 8323 checkUnnamed3243(core.List<core.String> o) { | |
| 8324 unittest.expect(o, unittest.hasLength(2)); | |
| 8325 unittest.expect(o[0], unittest.equals('foo')); | |
| 8326 unittest.expect(o[1], unittest.equals('foo')); | |
| 8327 } | |
| 8328 | |
| 8329 buildUnnamed3244() { | |
| 8330 var o = new core.List<core.String>(); | |
| 8331 o.add("foo"); | |
| 8332 o.add("foo"); | |
| 8333 return o; | |
| 8334 } | |
| 8335 | |
| 8336 checkUnnamed3244(core.List<core.String> o) { | |
| 8337 unittest.expect(o, unittest.hasLength(2)); | |
| 8338 unittest.expect(o[0], unittest.equals('foo')); | |
| 8339 unittest.expect(o[1], unittest.equals('foo')); | |
| 8340 } | |
| 8341 | |
| 8342 buildUnnamed3245() { | |
| 8343 var o = new core.List<core.String>(); | |
| 8344 o.add("foo"); | |
| 8345 o.add("foo"); | |
| 8346 return o; | |
| 8347 } | |
| 8348 | |
| 8349 checkUnnamed3245(core.List<core.String> o) { | |
| 8350 unittest.expect(o, unittest.hasLength(2)); | |
| 8351 unittest.expect(o[0], unittest.equals('foo')); | |
| 8352 unittest.expect(o[1], unittest.equals('foo')); | |
| 8353 } | |
| 8354 | |
| 8355 buildUnnamed3246() { | |
| 8356 var o = new core.List<core.String>(); | |
| 8357 o.add("foo"); | |
| 8358 o.add("foo"); | |
| 8359 return o; | |
| 8360 } | |
| 8361 | |
| 8362 checkUnnamed3246(core.List<core.String> o) { | |
| 8363 unittest.expect(o, unittest.hasLength(2)); | |
| 8364 unittest.expect(o[0], unittest.equals('foo')); | |
| 8365 unittest.expect(o[1], unittest.equals('foo')); | |
| 8366 } | |
| 8367 | |
| 8368 buildUnnamed3247() { | |
| 8369 var o = new core.List<core.String>(); | |
| 8370 o.add("foo"); | |
| 8371 o.add("foo"); | |
| 8372 return o; | |
| 8373 } | |
| 8374 | |
| 8375 checkUnnamed3247(core.List<core.String> o) { | |
| 8376 unittest.expect(o, unittest.hasLength(2)); | |
| 8377 unittest.expect(o[0], unittest.equals('foo')); | |
| 8378 unittest.expect(o[1], unittest.equals('foo')); | |
| 8379 } | |
| 8380 | |
| 8381 buildUnnamed3248() { | |
| 8382 var o = new core.List<core.String>(); | |
| 8383 o.add("foo"); | |
| 8384 o.add("foo"); | |
| 8385 return o; | |
| 8386 } | |
| 8387 | |
| 8388 checkUnnamed3248(core.List<core.String> o) { | |
| 8389 unittest.expect(o, unittest.hasLength(2)); | |
| 8390 unittest.expect(o[0], unittest.equals('foo')); | |
| 8391 unittest.expect(o[1], unittest.equals('foo')); | |
| 8392 } | |
| 8393 | |
| 8394 buildUnnamed3249() { | |
| 8395 var o = new core.List<core.String>(); | |
| 8396 o.add("foo"); | |
| 8397 o.add("foo"); | |
| 8398 return o; | |
| 8399 } | |
| 8400 | |
| 8401 checkUnnamed3249(core.List<core.String> o) { | |
| 8402 unittest.expect(o, unittest.hasLength(2)); | |
| 8403 unittest.expect(o[0], unittest.equals('foo')); | |
| 8404 unittest.expect(o[1], unittest.equals('foo')); | |
| 8405 } | |
| 8406 | |
| 8407 buildUnnamed3250() { | |
| 8408 var o = new core.List<core.String>(); | |
| 8409 o.add("foo"); | |
| 8410 o.add("foo"); | |
| 8411 return o; | |
| 8412 } | |
| 8413 | |
| 8414 checkUnnamed3250(core.List<core.String> o) { | |
| 8415 unittest.expect(o, unittest.hasLength(2)); | |
| 8416 unittest.expect(o[0], unittest.equals('foo')); | |
| 8417 unittest.expect(o[1], unittest.equals('foo')); | |
| 8418 } | |
| 8419 | |
| 8420 buildUnnamed3251() { | |
| 8421 var o = new core.List<core.String>(); | |
| 8422 o.add("foo"); | |
| 8423 o.add("foo"); | |
| 8424 return o; | |
| 8425 } | |
| 8426 | |
| 8427 checkUnnamed3251(core.List<core.String> o) { | |
| 8428 unittest.expect(o, unittest.hasLength(2)); | |
| 8429 unittest.expect(o[0], unittest.equals('foo')); | |
| 8430 unittest.expect(o[1], unittest.equals('foo')); | |
| 8431 } | |
| 8432 | |
| 8433 buildUnnamed3252() { | |
| 8434 var o = new core.List<core.String>(); | |
| 8435 o.add("foo"); | |
| 8436 o.add("foo"); | |
| 8437 return o; | |
| 8438 } | |
| 8439 | |
| 8440 checkUnnamed3252(core.List<core.String> o) { | |
| 8441 unittest.expect(o, unittest.hasLength(2)); | |
| 8442 unittest.expect(o[0], unittest.equals('foo')); | |
| 8443 unittest.expect(o[1], unittest.equals('foo')); | |
| 8444 } | |
| 8445 | |
| 8446 buildUnnamed3253() { | |
| 8447 var o = new core.List<core.String>(); | |
| 8448 o.add("foo"); | |
| 8449 o.add("foo"); | |
| 8450 return o; | |
| 8451 } | |
| 8452 | |
| 8453 checkUnnamed3253(core.List<core.String> o) { | |
| 8454 unittest.expect(o, unittest.hasLength(2)); | |
| 8455 unittest.expect(o[0], unittest.equals('foo')); | |
| 8456 unittest.expect(o[1], unittest.equals('foo')); | |
| 8457 } | |
| 8458 | |
| 8459 buildUnnamed3254() { | |
| 8460 var o = new core.List<core.String>(); | |
| 8461 o.add("foo"); | |
| 8462 o.add("foo"); | |
| 8463 return o; | |
| 8464 } | |
| 8465 | |
| 8466 checkUnnamed3254(core.List<core.String> o) { | |
| 8467 unittest.expect(o, unittest.hasLength(2)); | |
| 8468 unittest.expect(o[0], unittest.equals('foo')); | |
| 8469 unittest.expect(o[1], unittest.equals('foo')); | |
| 8470 } | |
| 8471 | |
| 8472 buildUnnamed3255() { | |
| 8473 var o = new core.List<core.String>(); | |
| 8474 o.add("foo"); | |
| 8475 o.add("foo"); | |
| 8476 return o; | |
| 8477 } | |
| 8478 | |
| 8479 checkUnnamed3255(core.List<core.String> o) { | |
| 8480 unittest.expect(o, unittest.hasLength(2)); | |
| 8481 unittest.expect(o[0], unittest.equals('foo')); | |
| 8482 unittest.expect(o[1], unittest.equals('foo')); | |
| 8483 } | |
| 8484 | |
| 8485 buildUnnamed3256() { | |
| 8486 var o = new core.List<core.String>(); | |
| 8487 o.add("foo"); | |
| 8488 o.add("foo"); | |
| 8489 return o; | |
| 8490 } | |
| 8491 | |
| 8492 checkUnnamed3256(core.List<core.String> o) { | |
| 8493 unittest.expect(o, unittest.hasLength(2)); | |
| 8494 unittest.expect(o[0], unittest.equals('foo')); | |
| 8495 unittest.expect(o[1], unittest.equals('foo')); | |
| 8496 } | |
| 8497 | |
| 8498 buildUnnamed3257() { | |
| 8499 var o = new core.List<core.String>(); | |
| 8500 o.add("foo"); | |
| 8501 o.add("foo"); | |
| 8502 return o; | |
| 8503 } | |
| 8504 | |
| 8505 checkUnnamed3257(core.List<core.String> o) { | |
| 8506 unittest.expect(o, unittest.hasLength(2)); | |
| 8507 unittest.expect(o[0], unittest.equals('foo')); | |
| 8508 unittest.expect(o[1], unittest.equals('foo')); | |
| 8509 } | |
| 8510 | |
| 8511 buildUnnamed3258() { | |
| 8512 var o = new core.List<core.String>(); | |
| 8513 o.add("foo"); | |
| 8514 o.add("foo"); | |
| 8515 return o; | |
| 8516 } | |
| 8517 | |
| 8518 checkUnnamed3258(core.List<core.String> o) { | |
| 8519 unittest.expect(o, unittest.hasLength(2)); | |
| 8520 unittest.expect(o[0], unittest.equals('foo')); | |
| 8521 unittest.expect(o[1], unittest.equals('foo')); | |
| 8522 } | |
| 8523 | |
| 8524 buildUnnamed3259() { | |
| 8525 var o = new core.List<core.String>(); | |
| 8526 o.add("foo"); | |
| 8527 o.add("foo"); | |
| 8528 return o; | |
| 8529 } | |
| 8530 | |
| 8531 checkUnnamed3259(core.List<core.String> o) { | |
| 8532 unittest.expect(o, unittest.hasLength(2)); | |
| 8533 unittest.expect(o[0], unittest.equals('foo')); | |
| 8534 unittest.expect(o[1], unittest.equals('foo')); | |
| 8535 } | |
| 8536 | |
| 8537 buildUnnamed3260() { | |
| 8538 var o = new core.List<core.String>(); | |
| 8539 o.add("foo"); | |
| 8540 o.add("foo"); | |
| 8541 return o; | |
| 8542 } | |
| 8543 | |
| 8544 checkUnnamed3260(core.List<core.String> o) { | |
| 8545 unittest.expect(o, unittest.hasLength(2)); | |
| 8546 unittest.expect(o[0], unittest.equals('foo')); | |
| 8547 unittest.expect(o[1], unittest.equals('foo')); | |
| 8548 } | |
| 8549 | |
| 8550 buildUnnamed3261() { | |
| 8551 var o = new core.List<core.String>(); | |
| 8552 o.add("foo"); | |
| 8553 o.add("foo"); | |
| 8554 return o; | |
| 8555 } | |
| 8556 | |
| 8557 checkUnnamed3261(core.List<core.String> o) { | |
| 8558 unittest.expect(o, unittest.hasLength(2)); | |
| 8559 unittest.expect(o[0], unittest.equals('foo')); | |
| 8560 unittest.expect(o[1], unittest.equals('foo')); | |
| 8561 } | |
| 8562 | |
| 8563 buildUnnamed3262() { | |
| 8564 var o = new core.List<core.String>(); | |
| 8565 o.add("foo"); | |
| 8566 o.add("foo"); | |
| 8567 return o; | |
| 8568 } | |
| 8569 | |
| 8570 checkUnnamed3262(core.List<core.String> o) { | |
| 8571 unittest.expect(o, unittest.hasLength(2)); | |
| 8572 unittest.expect(o[0], unittest.equals('foo')); | |
| 8573 unittest.expect(o[1], unittest.equals('foo')); | |
| 8574 } | |
| 8575 | |
| 8576 buildUnnamed3263() { | |
| 8577 var o = new core.List<core.String>(); | |
| 8578 o.add("foo"); | |
| 8579 o.add("foo"); | |
| 8580 return o; | |
| 8581 } | |
| 8582 | |
| 8583 checkUnnamed3263(core.List<core.String> o) { | |
| 8584 unittest.expect(o, unittest.hasLength(2)); | |
| 8585 unittest.expect(o[0], unittest.equals('foo')); | |
| 8586 unittest.expect(o[1], unittest.equals('foo')); | |
| 8587 } | |
| 8588 | |
| 8589 buildUnnamed3264() { | |
| 8590 var o = new core.List<core.String>(); | |
| 8591 o.add("foo"); | |
| 8592 o.add("foo"); | |
| 8593 return o; | |
| 8594 } | |
| 8595 | |
| 8596 checkUnnamed3264(core.List<core.String> o) { | |
| 8597 unittest.expect(o, unittest.hasLength(2)); | |
| 8598 unittest.expect(o[0], unittest.equals('foo')); | |
| 8599 unittest.expect(o[1], unittest.equals('foo')); | |
| 8600 } | |
| 8601 | |
| 8602 buildUnnamed3265() { | |
| 8603 var o = new core.List<core.String>(); | |
| 8604 o.add("foo"); | |
| 8605 o.add("foo"); | |
| 8606 return o; | |
| 8607 } | |
| 8608 | |
| 8609 checkUnnamed3265(core.List<core.String> o) { | |
| 8610 unittest.expect(o, unittest.hasLength(2)); | |
| 8611 unittest.expect(o[0], unittest.equals('foo')); | |
| 8612 unittest.expect(o[1], unittest.equals('foo')); | |
| 8613 } | |
| 8614 | |
| 8615 buildUnnamed3266() { | |
| 8616 var o = new core.List<core.String>(); | |
| 8617 o.add("foo"); | |
| 8618 o.add("foo"); | |
| 8619 return o; | |
| 8620 } | |
| 8621 | |
| 8622 checkUnnamed3266(core.List<core.String> o) { | |
| 8623 unittest.expect(o, unittest.hasLength(2)); | |
| 8624 unittest.expect(o[0], unittest.equals('foo')); | |
| 8625 unittest.expect(o[1], unittest.equals('foo')); | |
| 8626 } | |
| 8627 | |
| 8628 buildUnnamed3267() { | |
| 8629 var o = new core.List<core.String>(); | |
| 8630 o.add("foo"); | |
| 8631 o.add("foo"); | |
| 8632 return o; | |
| 8633 } | |
| 8634 | |
| 8635 checkUnnamed3267(core.List<core.String> o) { | |
| 8636 unittest.expect(o, unittest.hasLength(2)); | |
| 8637 unittest.expect(o[0], unittest.equals('foo')); | |
| 8638 unittest.expect(o[1], unittest.equals('foo')); | |
| 8639 } | |
| 8640 | |
| 8641 buildUnnamed3268() { | |
| 8642 var o = new core.List<core.String>(); | |
| 8643 o.add("foo"); | |
| 8644 o.add("foo"); | |
| 8645 return o; | |
| 8646 } | |
| 8647 | |
| 8648 checkUnnamed3268(core.List<core.String> o) { | |
| 8649 unittest.expect(o, unittest.hasLength(2)); | |
| 8650 unittest.expect(o[0], unittest.equals('foo')); | |
| 8651 unittest.expect(o[1], unittest.equals('foo')); | |
| 8652 } | |
| 8653 | |
| 8654 buildUnnamed3269() { | |
| 8655 var o = new core.List<core.String>(); | |
| 8656 o.add("foo"); | |
| 8657 o.add("foo"); | |
| 8658 return o; | |
| 8659 } | |
| 8660 | |
| 8661 checkUnnamed3269(core.List<core.String> o) { | |
| 8662 unittest.expect(o, unittest.hasLength(2)); | |
| 8663 unittest.expect(o[0], unittest.equals('foo')); | |
| 8664 unittest.expect(o[1], unittest.equals('foo')); | |
| 8665 } | |
| 8666 | |
| 8667 buildUnnamed3270() { | |
| 8668 var o = new core.List<core.String>(); | |
| 8669 o.add("foo"); | |
| 8670 o.add("foo"); | |
| 8671 return o; | |
| 8672 } | |
| 8673 | |
| 8674 checkUnnamed3270(core.List<core.String> o) { | |
| 8675 unittest.expect(o, unittest.hasLength(2)); | |
| 8676 unittest.expect(o[0], unittest.equals('foo')); | |
| 8677 unittest.expect(o[1], unittest.equals('foo')); | |
| 8678 } | |
| 8679 | |
| 8680 buildUnnamed3271() { | |
| 8681 var o = new core.List<core.String>(); | |
| 8682 o.add("foo"); | |
| 8683 o.add("foo"); | |
| 8684 return o; | |
| 8685 } | |
| 8686 | |
| 8687 checkUnnamed3271(core.List<core.String> o) { | |
| 8688 unittest.expect(o, unittest.hasLength(2)); | |
| 8689 unittest.expect(o[0], unittest.equals('foo')); | |
| 8690 unittest.expect(o[1], unittest.equals('foo')); | |
| 8691 } | |
| 8692 | |
| 8693 buildUnnamed3272() { | |
| 8694 var o = new core.List<core.String>(); | |
| 8695 o.add("foo"); | |
| 8696 o.add("foo"); | |
| 8697 return o; | |
| 8698 } | |
| 8699 | |
| 8700 checkUnnamed3272(core.List<core.String> o) { | |
| 8701 unittest.expect(o, unittest.hasLength(2)); | |
| 8702 unittest.expect(o[0], unittest.equals('foo')); | |
| 8703 unittest.expect(o[1], unittest.equals('foo')); | |
| 8704 } | |
| 8705 | |
| 8706 buildUnnamed3273() { | |
| 8707 var o = new core.List<core.String>(); | |
| 8708 o.add("foo"); | |
| 8709 o.add("foo"); | |
| 8710 return o; | |
| 8711 } | |
| 8712 | |
| 8713 checkUnnamed3273(core.List<core.String> o) { | |
| 8714 unittest.expect(o, unittest.hasLength(2)); | |
| 8715 unittest.expect(o[0], unittest.equals('foo')); | |
| 8716 unittest.expect(o[1], unittest.equals('foo')); | |
| 8717 } | |
| 8718 | |
| 8719 buildUnnamed3274() { | |
| 8720 var o = new core.List<core.String>(); | |
| 8721 o.add("foo"); | |
| 8722 o.add("foo"); | |
| 8723 return o; | |
| 8724 } | |
| 8725 | |
| 8726 checkUnnamed3274(core.List<core.String> o) { | |
| 8727 unittest.expect(o, unittest.hasLength(2)); | |
| 8728 unittest.expect(o[0], unittest.equals('foo')); | |
| 8729 unittest.expect(o[1], unittest.equals('foo')); | |
| 8730 } | |
| 8731 | |
| 8732 buildUnnamed3275() { | |
| 8733 var o = new core.List<core.String>(); | |
| 8734 o.add("foo"); | |
| 8735 o.add("foo"); | |
| 8736 return o; | |
| 8737 } | |
| 8738 | |
| 8739 checkUnnamed3275(core.List<core.String> o) { | |
| 8740 unittest.expect(o, unittest.hasLength(2)); | |
| 8741 unittest.expect(o[0], unittest.equals('foo')); | |
| 8742 unittest.expect(o[1], unittest.equals('foo')); | |
| 8743 } | |
| 8744 | |
| 8745 buildUnnamed3276() { | |
| 8746 var o = new core.List<core.String>(); | |
| 8747 o.add("foo"); | |
| 8748 o.add("foo"); | |
| 8749 return o; | |
| 8750 } | |
| 8751 | |
| 8752 checkUnnamed3276(core.List<core.String> o) { | |
| 8753 unittest.expect(o, unittest.hasLength(2)); | |
| 8754 unittest.expect(o[0], unittest.equals('foo')); | |
| 8755 unittest.expect(o[1], unittest.equals('foo')); | |
| 8756 } | |
| 8757 | |
| 8758 buildUnnamed3277() { | |
| 8759 var o = new core.List<core.String>(); | |
| 8760 o.add("foo"); | |
| 8761 o.add("foo"); | |
| 8762 return o; | |
| 8763 } | |
| 8764 | |
| 8765 checkUnnamed3277(core.List<core.String> o) { | |
| 8766 unittest.expect(o, unittest.hasLength(2)); | |
| 8767 unittest.expect(o[0], unittest.equals('foo')); | |
| 8768 unittest.expect(o[1], unittest.equals('foo')); | |
| 8769 } | |
| 8770 | |
| 8771 buildUnnamed3278() { | |
| 8772 var o = new core.List<core.String>(); | |
| 8773 o.add("foo"); | |
| 8774 o.add("foo"); | |
| 8775 return o; | |
| 8776 } | |
| 8777 | |
| 8778 checkUnnamed3278(core.List<core.String> o) { | |
| 8779 unittest.expect(o, unittest.hasLength(2)); | |
| 8780 unittest.expect(o[0], unittest.equals('foo')); | |
| 8781 unittest.expect(o[1], unittest.equals('foo')); | |
| 8782 } | |
| 8783 | |
| 8784 buildUnnamed3279() { | |
| 8785 var o = new core.List<core.String>(); | |
| 8786 o.add("foo"); | |
| 8787 o.add("foo"); | |
| 8788 return o; | |
| 8789 } | |
| 8790 | |
| 8791 checkUnnamed3279(core.List<core.String> o) { | |
| 8792 unittest.expect(o, unittest.hasLength(2)); | |
| 8793 unittest.expect(o[0], unittest.equals('foo')); | |
| 8794 unittest.expect(o[1], unittest.equals('foo')); | |
| 8795 } | |
| 8796 | |
| 8797 buildUnnamed3280() { | |
| 8798 var o = new core.List<core.String>(); | |
| 8799 o.add("foo"); | |
| 8800 o.add("foo"); | |
| 8801 return o; | |
| 8802 } | |
| 8803 | |
| 8804 checkUnnamed3280(core.List<core.String> o) { | |
| 8805 unittest.expect(o, unittest.hasLength(2)); | |
| 8806 unittest.expect(o[0], unittest.equals('foo')); | |
| 8807 unittest.expect(o[1], unittest.equals('foo')); | |
| 8808 } | |
| 8809 | |
| 8810 buildUnnamed3281() { | |
| 8811 var o = new core.List<core.String>(); | |
| 8812 o.add("foo"); | |
| 8813 o.add("foo"); | |
| 8814 return o; | |
| 8815 } | |
| 8816 | |
| 8817 checkUnnamed3281(core.List<core.String> o) { | |
| 8818 unittest.expect(o, unittest.hasLength(2)); | |
| 8819 unittest.expect(o[0], unittest.equals('foo')); | |
| 8820 unittest.expect(o[1], unittest.equals('foo')); | |
| 8821 } | |
| 8822 | |
| 8823 buildUnnamed3282() { | |
| 8824 var o = new core.List<core.String>(); | |
| 8825 o.add("foo"); | |
| 8826 o.add("foo"); | |
| 8827 return o; | |
| 8828 } | |
| 8829 | |
| 8830 checkUnnamed3282(core.List<core.String> o) { | |
| 8831 unittest.expect(o, unittest.hasLength(2)); | |
| 8832 unittest.expect(o[0], unittest.equals('foo')); | |
| 8833 unittest.expect(o[1], unittest.equals('foo')); | |
| 8834 } | |
| 8835 | |
| 8836 buildUnnamed3283() { | |
| 8837 var o = new core.List<core.String>(); | |
| 8838 o.add("foo"); | |
| 8839 o.add("foo"); | |
| 8840 return o; | |
| 8841 } | |
| 8842 | |
| 8843 checkUnnamed3283(core.List<core.String> o) { | |
| 8844 unittest.expect(o, unittest.hasLength(2)); | |
| 8845 unittest.expect(o[0], unittest.equals('foo')); | |
| 8846 unittest.expect(o[1], unittest.equals('foo')); | |
| 8847 } | |
| 8848 | |
| 8849 buildUnnamed3284() { | |
| 8850 var o = new core.List<core.String>(); | |
| 8851 o.add("foo"); | |
| 8852 o.add("foo"); | |
| 8853 return o; | |
| 8854 } | |
| 8855 | |
| 8856 checkUnnamed3284(core.List<core.String> o) { | |
| 8857 unittest.expect(o, unittest.hasLength(2)); | |
| 8858 unittest.expect(o[0], unittest.equals('foo')); | |
| 8859 unittest.expect(o[1], unittest.equals('foo')); | |
| 8860 } | |
| 8861 | |
| 8862 buildUnnamed3285() { | |
| 8863 var o = new core.List<core.String>(); | |
| 8864 o.add("foo"); | |
| 8865 o.add("foo"); | |
| 8866 return o; | |
| 8867 } | |
| 8868 | |
| 8869 checkUnnamed3285(core.List<core.String> o) { | |
| 8870 unittest.expect(o, unittest.hasLength(2)); | |
| 8871 unittest.expect(o[0], unittest.equals('foo')); | |
| 8872 unittest.expect(o[1], unittest.equals('foo')); | |
| 8873 } | |
| 8874 | |
| 8875 buildUnnamed3286() { | |
| 8876 var o = new core.List<core.String>(); | |
| 8877 o.add("foo"); | |
| 8878 o.add("foo"); | |
| 8879 return o; | |
| 8880 } | |
| 8881 | |
| 8882 checkUnnamed3286(core.List<core.String> o) { | |
| 8883 unittest.expect(o, unittest.hasLength(2)); | |
| 8884 unittest.expect(o[0], unittest.equals('foo')); | |
| 8885 unittest.expect(o[1], unittest.equals('foo')); | |
| 8886 } | |
| 8887 | |
| 8888 buildUnnamed3287() { | |
| 8889 var o = new core.List<core.String>(); | |
| 8890 o.add("foo"); | |
| 8891 o.add("foo"); | |
| 8892 return o; | |
| 8893 } | |
| 8894 | |
| 8895 checkUnnamed3287(core.List<core.String> o) { | |
| 8896 unittest.expect(o, unittest.hasLength(2)); | |
| 8897 unittest.expect(o[0], unittest.equals('foo')); | |
| 8898 unittest.expect(o[1], unittest.equals('foo')); | |
| 8899 } | |
| 8900 | |
| 8901 buildUnnamed3288() { | |
| 8902 var o = new core.List<core.String>(); | |
| 8903 o.add("foo"); | |
| 8904 o.add("foo"); | |
| 8905 return o; | |
| 8906 } | |
| 8907 | |
| 8908 checkUnnamed3288(core.List<core.String> o) { | |
| 8909 unittest.expect(o, unittest.hasLength(2)); | |
| 8910 unittest.expect(o[0], unittest.equals('foo')); | |
| 8911 unittest.expect(o[1], unittest.equals('foo')); | |
| 8912 } | |
| 8913 | |
| 8914 buildUnnamed3289() { | |
| 8915 var o = new core.List<core.String>(); | |
| 8916 o.add("foo"); | |
| 8917 o.add("foo"); | |
| 8918 return o; | |
| 8919 } | |
| 8920 | |
| 8921 checkUnnamed3289(core.List<core.String> o) { | |
| 8922 unittest.expect(o, unittest.hasLength(2)); | |
| 8923 unittest.expect(o[0], unittest.equals('foo')); | |
| 8924 unittest.expect(o[1], unittest.equals('foo')); | |
| 8925 } | |
| 8926 | |
| 8927 buildUnnamed3290() { | |
| 8928 var o = new core.List<core.String>(); | |
| 8929 o.add("foo"); | |
| 8930 o.add("foo"); | |
| 8931 return o; | |
| 8932 } | |
| 8933 | |
| 8934 checkUnnamed3290(core.List<core.String> o) { | |
| 8935 unittest.expect(o, unittest.hasLength(2)); | |
| 8936 unittest.expect(o[0], unittest.equals('foo')); | |
| 8937 unittest.expect(o[1], unittest.equals('foo')); | |
| 8938 } | |
| 8939 | |
| 8940 buildUnnamed3291() { | |
| 8941 var o = new core.List<core.String>(); | |
| 8942 o.add("foo"); | |
| 8943 o.add("foo"); | |
| 8944 return o; | |
| 8945 } | |
| 8946 | |
| 8947 checkUnnamed3291(core.List<core.String> o) { | |
| 8948 unittest.expect(o, unittest.hasLength(2)); | |
| 8949 unittest.expect(o[0], unittest.equals('foo')); | |
| 8950 unittest.expect(o[1], unittest.equals('foo')); | |
| 8951 } | |
| 8952 | |
| 8953 buildUnnamed3292() { | |
| 8954 var o = new core.List<core.String>(); | |
| 8955 o.add("foo"); | |
| 8956 o.add("foo"); | |
| 8957 return o; | |
| 8958 } | |
| 8959 | |
| 8960 checkUnnamed3292(core.List<core.String> o) { | |
| 8961 unittest.expect(o, unittest.hasLength(2)); | |
| 8962 unittest.expect(o[0], unittest.equals('foo')); | |
| 8963 unittest.expect(o[1], unittest.equals('foo')); | |
| 8964 } | |
| 8965 | |
| 8966 buildUnnamed3293() { | |
| 8967 var o = new core.List<core.String>(); | |
| 8968 o.add("foo"); | |
| 8969 o.add("foo"); | |
| 8970 return o; | |
| 8971 } | |
| 8972 | |
| 8973 checkUnnamed3293(core.List<core.String> o) { | |
| 8974 unittest.expect(o, unittest.hasLength(2)); | |
| 8975 unittest.expect(o[0], unittest.equals('foo')); | |
| 8976 unittest.expect(o[1], unittest.equals('foo')); | |
| 8977 } | |
| 8978 | |
| 8979 buildUnnamed3294() { | |
| 8980 var o = new core.List<core.String>(); | |
| 8981 o.add("foo"); | |
| 8982 o.add("foo"); | |
| 8983 return o; | |
| 8984 } | |
| 8985 | |
| 8986 checkUnnamed3294(core.List<core.String> o) { | |
| 8987 unittest.expect(o, unittest.hasLength(2)); | |
| 8988 unittest.expect(o[0], unittest.equals('foo')); | |
| 8989 unittest.expect(o[1], unittest.equals('foo')); | |
| 8990 } | |
| 8991 | |
| 8992 buildUnnamed3295() { | |
| 8993 var o = new core.List<core.String>(); | |
| 8994 o.add("foo"); | |
| 8995 o.add("foo"); | |
| 8996 return o; | |
| 8997 } | |
| 8998 | |
| 8999 checkUnnamed3295(core.List<core.String> o) { | |
| 9000 unittest.expect(o, unittest.hasLength(2)); | |
| 9001 unittest.expect(o[0], unittest.equals('foo')); | |
| 9002 unittest.expect(o[1], unittest.equals('foo')); | |
| 9003 } | |
| 9004 | |
| 9005 buildUnnamed3296() { | |
| 9006 var o = new core.List<core.String>(); | |
| 9007 o.add("foo"); | |
| 9008 o.add("foo"); | |
| 9009 return o; | |
| 9010 } | |
| 9011 | |
| 9012 checkUnnamed3296(core.List<core.String> o) { | |
| 9013 unittest.expect(o, unittest.hasLength(2)); | |
| 9014 unittest.expect(o[0], unittest.equals('foo')); | |
| 9015 unittest.expect(o[1], unittest.equals('foo')); | |
| 9016 } | |
| 9017 | |
| 9018 buildUnnamed3297() { | |
| 9019 var o = new core.List<core.String>(); | |
| 9020 o.add("foo"); | |
| 9021 o.add("foo"); | |
| 9022 return o; | |
| 9023 } | |
| 9024 | |
| 9025 checkUnnamed3297(core.List<core.String> o) { | |
| 9026 unittest.expect(o, unittest.hasLength(2)); | |
| 9027 unittest.expect(o[0], unittest.equals('foo')); | |
| 9028 unittest.expect(o[1], unittest.equals('foo')); | |
| 9029 } | |
| 9030 | |
| 9031 buildUnnamed3298() { | |
| 9032 var o = new core.List<core.String>(); | |
| 9033 o.add("foo"); | |
| 9034 o.add("foo"); | |
| 9035 return o; | |
| 9036 } | |
| 9037 | |
| 9038 checkUnnamed3298(core.List<core.String> o) { | |
| 9039 unittest.expect(o, unittest.hasLength(2)); | |
| 9040 unittest.expect(o[0], unittest.equals('foo')); | |
| 9041 unittest.expect(o[1], unittest.equals('foo')); | |
| 9042 } | |
| 9043 | |
| 9044 buildUnnamed3299() { | |
| 9045 var o = new core.List<core.String>(); | |
| 9046 o.add("foo"); | |
| 9047 o.add("foo"); | |
| 9048 return o; | |
| 9049 } | |
| 9050 | |
| 9051 checkUnnamed3299(core.List<core.String> o) { | |
| 9052 unittest.expect(o, unittest.hasLength(2)); | |
| 9053 unittest.expect(o[0], unittest.equals('foo')); | |
| 9054 unittest.expect(o[1], unittest.equals('foo')); | |
| 9055 } | |
| 9056 | |
| 9057 buildUnnamed3300() { | |
| 9058 var o = new core.List<core.String>(); | |
| 9059 o.add("foo"); | |
| 9060 o.add("foo"); | |
| 9061 return o; | |
| 9062 } | |
| 9063 | |
| 9064 checkUnnamed3300(core.List<core.String> o) { | |
| 9065 unittest.expect(o, unittest.hasLength(2)); | |
| 9066 unittest.expect(o[0], unittest.equals('foo')); | |
| 9067 unittest.expect(o[1], unittest.equals('foo')); | |
| 9068 } | |
| 9069 | |
| 9070 buildUnnamed3301() { | |
| 9071 var o = new core.List<core.String>(); | |
| 9072 o.add("foo"); | |
| 9073 o.add("foo"); | |
| 9074 return o; | |
| 9075 } | |
| 9076 | |
| 9077 checkUnnamed3301(core.List<core.String> o) { | |
| 9078 unittest.expect(o, unittest.hasLength(2)); | |
| 9079 unittest.expect(o[0], unittest.equals('foo')); | |
| 9080 unittest.expect(o[1], unittest.equals('foo')); | |
| 9081 } | |
| 9082 | |
| 9083 buildUnnamed3302() { | |
| 9084 var o = new core.List<core.String>(); | |
| 9085 o.add("foo"); | |
| 9086 o.add("foo"); | |
| 9087 return o; | |
| 9088 } | |
| 9089 | |
| 9090 checkUnnamed3302(core.List<core.String> o) { | |
| 9091 unittest.expect(o, unittest.hasLength(2)); | |
| 9092 unittest.expect(o[0], unittest.equals('foo')); | |
| 9093 unittest.expect(o[1], unittest.equals('foo')); | |
| 9094 } | |
| 9095 | |
| 9096 buildUnnamed3303() { | |
| 9097 var o = new core.List<core.String>(); | |
| 9098 o.add("foo"); | |
| 9099 o.add("foo"); | |
| 9100 return o; | |
| 9101 } | |
| 9102 | |
| 9103 checkUnnamed3303(core.List<core.String> o) { | |
| 9104 unittest.expect(o, unittest.hasLength(2)); | |
| 9105 unittest.expect(o[0], unittest.equals('foo')); | |
| 9106 unittest.expect(o[1], unittest.equals('foo')); | |
| 9107 } | |
| 9108 | |
| 9109 | |
| 9110 main() { | |
| 9111 unittest.group("obj-schema-Account", () { | |
| 9112 unittest.test("to-json--from-json", () { | |
| 9113 var o = buildAccount(); | |
| 9114 var od = new api.Account.fromJson(o.toJson()); | |
| 9115 checkAccount(od); | |
| 9116 }); | |
| 9117 }); | |
| 9118 | |
| 9119 | |
| 9120 unittest.group("obj-schema-AccountActiveAdSummary", () { | |
| 9121 unittest.test("to-json--from-json", () { | |
| 9122 var o = buildAccountActiveAdSummary(); | |
| 9123 var od = new api.AccountActiveAdSummary.fromJson(o.toJson()); | |
| 9124 checkAccountActiveAdSummary(od); | |
| 9125 }); | |
| 9126 }); | |
| 9127 | |
| 9128 | |
| 9129 unittest.group("obj-schema-AccountPermission", () { | |
| 9130 unittest.test("to-json--from-json", () { | |
| 9131 var o = buildAccountPermission(); | |
| 9132 var od = new api.AccountPermission.fromJson(o.toJson()); | |
| 9133 checkAccountPermission(od); | |
| 9134 }); | |
| 9135 }); | |
| 9136 | |
| 9137 | |
| 9138 unittest.group("obj-schema-AccountPermissionGroup", () { | |
| 9139 unittest.test("to-json--from-json", () { | |
| 9140 var o = buildAccountPermissionGroup(); | |
| 9141 var od = new api.AccountPermissionGroup.fromJson(o.toJson()); | |
| 9142 checkAccountPermissionGroup(od); | |
| 9143 }); | |
| 9144 }); | |
| 9145 | |
| 9146 | |
| 9147 unittest.group("obj-schema-AccountPermissionGroupsListResponse", () { | |
| 9148 unittest.test("to-json--from-json", () { | |
| 9149 var o = buildAccountPermissionGroupsListResponse(); | |
| 9150 var od = new api.AccountPermissionGroupsListResponse.fromJson(o.toJson()); | |
| 9151 checkAccountPermissionGroupsListResponse(od); | |
| 9152 }); | |
| 9153 }); | |
| 9154 | |
| 9155 | |
| 9156 unittest.group("obj-schema-AccountPermissionsListResponse", () { | |
| 9157 unittest.test("to-json--from-json", () { | |
| 9158 var o = buildAccountPermissionsListResponse(); | |
| 9159 var od = new api.AccountPermissionsListResponse.fromJson(o.toJson()); | |
| 9160 checkAccountPermissionsListResponse(od); | |
| 9161 }); | |
| 9162 }); | |
| 9163 | |
| 9164 | |
| 9165 unittest.group("obj-schema-AccountUserProfile", () { | |
| 9166 unittest.test("to-json--from-json", () { | |
| 9167 var o = buildAccountUserProfile(); | |
| 9168 var od = new api.AccountUserProfile.fromJson(o.toJson()); | |
| 9169 checkAccountUserProfile(od); | |
| 9170 }); | |
| 9171 }); | |
| 9172 | |
| 9173 | |
| 9174 unittest.group("obj-schema-AccountUserProfilesListResponse", () { | |
| 9175 unittest.test("to-json--from-json", () { | |
| 9176 var o = buildAccountUserProfilesListResponse(); | |
| 9177 var od = new api.AccountUserProfilesListResponse.fromJson(o.toJson()); | |
| 9178 checkAccountUserProfilesListResponse(od); | |
| 9179 }); | |
| 9180 }); | |
| 9181 | |
| 9182 | |
| 9183 unittest.group("obj-schema-AccountsListResponse", () { | |
| 9184 unittest.test("to-json--from-json", () { | |
| 9185 var o = buildAccountsListResponse(); | |
| 9186 var od = new api.AccountsListResponse.fromJson(o.toJson()); | |
| 9187 checkAccountsListResponse(od); | |
| 9188 }); | |
| 9189 }); | |
| 9190 | |
| 9191 | |
| 9192 unittest.group("obj-schema-Activities", () { | |
| 9193 unittest.test("to-json--from-json", () { | |
| 9194 var o = buildActivities(); | |
| 9195 var od = new api.Activities.fromJson(o.toJson()); | |
| 9196 checkActivities(od); | |
| 9197 }); | |
| 9198 }); | |
| 9199 | |
| 9200 | |
| 9201 unittest.group("obj-schema-Ad", () { | |
| 9202 unittest.test("to-json--from-json", () { | |
| 9203 var o = buildAd(); | |
| 9204 var od = new api.Ad.fromJson(o.toJson()); | |
| 9205 checkAd(od); | |
| 9206 }); | |
| 9207 }); | |
| 9208 | |
| 9209 | |
| 9210 unittest.group("obj-schema-AdSlot", () { | |
| 9211 unittest.test("to-json--from-json", () { | |
| 9212 var o = buildAdSlot(); | |
| 9213 var od = new api.AdSlot.fromJson(o.toJson()); | |
| 9214 checkAdSlot(od); | |
| 9215 }); | |
| 9216 }); | |
| 9217 | |
| 9218 | |
| 9219 unittest.group("obj-schema-AdsListResponse", () { | |
| 9220 unittest.test("to-json--from-json", () { | |
| 9221 var o = buildAdsListResponse(); | |
| 9222 var od = new api.AdsListResponse.fromJson(o.toJson()); | |
| 9223 checkAdsListResponse(od); | |
| 9224 }); | |
| 9225 }); | |
| 9226 | |
| 9227 | |
| 9228 unittest.group("obj-schema-Advertiser", () { | |
| 9229 unittest.test("to-json--from-json", () { | |
| 9230 var o = buildAdvertiser(); | |
| 9231 var od = new api.Advertiser.fromJson(o.toJson()); | |
| 9232 checkAdvertiser(od); | |
| 9233 }); | |
| 9234 }); | |
| 9235 | |
| 9236 | |
| 9237 unittest.group("obj-schema-AdvertiserGroup", () { | |
| 9238 unittest.test("to-json--from-json", () { | |
| 9239 var o = buildAdvertiserGroup(); | |
| 9240 var od = new api.AdvertiserGroup.fromJson(o.toJson()); | |
| 9241 checkAdvertiserGroup(od); | |
| 9242 }); | |
| 9243 }); | |
| 9244 | |
| 9245 | |
| 9246 unittest.group("obj-schema-AdvertiserGroupsListResponse", () { | |
| 9247 unittest.test("to-json--from-json", () { | |
| 9248 var o = buildAdvertiserGroupsListResponse(); | |
| 9249 var od = new api.AdvertiserGroupsListResponse.fromJson(o.toJson()); | |
| 9250 checkAdvertiserGroupsListResponse(od); | |
| 9251 }); | |
| 9252 }); | |
| 9253 | |
| 9254 | |
| 9255 unittest.group("obj-schema-AdvertisersListResponse", () { | |
| 9256 unittest.test("to-json--from-json", () { | |
| 9257 var o = buildAdvertisersListResponse(); | |
| 9258 var od = new api.AdvertisersListResponse.fromJson(o.toJson()); | |
| 9259 checkAdvertisersListResponse(od); | |
| 9260 }); | |
| 9261 }); | |
| 9262 | |
| 9263 | |
| 9264 unittest.group("obj-schema-AudienceSegment", () { | |
| 9265 unittest.test("to-json--from-json", () { | |
| 9266 var o = buildAudienceSegment(); | |
| 9267 var od = new api.AudienceSegment.fromJson(o.toJson()); | |
| 9268 checkAudienceSegment(od); | |
| 9269 }); | |
| 9270 }); | |
| 9271 | |
| 9272 | |
| 9273 unittest.group("obj-schema-AudienceSegmentGroup", () { | |
| 9274 unittest.test("to-json--from-json", () { | |
| 9275 var o = buildAudienceSegmentGroup(); | |
| 9276 var od = new api.AudienceSegmentGroup.fromJson(o.toJson()); | |
| 9277 checkAudienceSegmentGroup(od); | |
| 9278 }); | |
| 9279 }); | |
| 9280 | |
| 9281 | |
| 9282 unittest.group("obj-schema-Browser", () { | |
| 9283 unittest.test("to-json--from-json", () { | |
| 9284 var o = buildBrowser(); | |
| 9285 var od = new api.Browser.fromJson(o.toJson()); | |
| 9286 checkBrowser(od); | |
| 9287 }); | |
| 9288 }); | |
| 9289 | |
| 9290 | |
| 9291 unittest.group("obj-schema-BrowsersListResponse", () { | |
| 9292 unittest.test("to-json--from-json", () { | |
| 9293 var o = buildBrowsersListResponse(); | |
| 9294 var od = new api.BrowsersListResponse.fromJson(o.toJson()); | |
| 9295 checkBrowsersListResponse(od); | |
| 9296 }); | |
| 9297 }); | |
| 9298 | |
| 9299 | |
| 9300 unittest.group("obj-schema-Campaign", () { | |
| 9301 unittest.test("to-json--from-json", () { | |
| 9302 var o = buildCampaign(); | |
| 9303 var od = new api.Campaign.fromJson(o.toJson()); | |
| 9304 checkCampaign(od); | |
| 9305 }); | |
| 9306 }); | |
| 9307 | |
| 9308 | |
| 9309 unittest.group("obj-schema-CampaignCreativeAssociation", () { | |
| 9310 unittest.test("to-json--from-json", () { | |
| 9311 var o = buildCampaignCreativeAssociation(); | |
| 9312 var od = new api.CampaignCreativeAssociation.fromJson(o.toJson()); | |
| 9313 checkCampaignCreativeAssociation(od); | |
| 9314 }); | |
| 9315 }); | |
| 9316 | |
| 9317 | |
| 9318 unittest.group("obj-schema-CampaignCreativeAssociationsListResponse", () { | |
| 9319 unittest.test("to-json--from-json", () { | |
| 9320 var o = buildCampaignCreativeAssociationsListResponse(); | |
| 9321 var od = new api.CampaignCreativeAssociationsListResponse.fromJson(o.toJso
n()); | |
| 9322 checkCampaignCreativeAssociationsListResponse(od); | |
| 9323 }); | |
| 9324 }); | |
| 9325 | |
| 9326 | |
| 9327 unittest.group("obj-schema-CampaignsListResponse", () { | |
| 9328 unittest.test("to-json--from-json", () { | |
| 9329 var o = buildCampaignsListResponse(); | |
| 9330 var od = new api.CampaignsListResponse.fromJson(o.toJson()); | |
| 9331 checkCampaignsListResponse(od); | |
| 9332 }); | |
| 9333 }); | |
| 9334 | |
| 9335 | |
| 9336 unittest.group("obj-schema-ChangeLog", () { | |
| 9337 unittest.test("to-json--from-json", () { | |
| 9338 var o = buildChangeLog(); | |
| 9339 var od = new api.ChangeLog.fromJson(o.toJson()); | |
| 9340 checkChangeLog(od); | |
| 9341 }); | |
| 9342 }); | |
| 9343 | |
| 9344 | |
| 9345 unittest.group("obj-schema-ChangeLogsListResponse", () { | |
| 9346 unittest.test("to-json--from-json", () { | |
| 9347 var o = buildChangeLogsListResponse(); | |
| 9348 var od = new api.ChangeLogsListResponse.fromJson(o.toJson()); | |
| 9349 checkChangeLogsListResponse(od); | |
| 9350 }); | |
| 9351 }); | |
| 9352 | |
| 9353 | |
| 9354 unittest.group("obj-schema-CitiesListResponse", () { | |
| 9355 unittest.test("to-json--from-json", () { | |
| 9356 var o = buildCitiesListResponse(); | |
| 9357 var od = new api.CitiesListResponse.fromJson(o.toJson()); | |
| 9358 checkCitiesListResponse(od); | |
| 9359 }); | |
| 9360 }); | |
| 9361 | |
| 9362 | |
| 9363 unittest.group("obj-schema-City", () { | |
| 9364 unittest.test("to-json--from-json", () { | |
| 9365 var o = buildCity(); | |
| 9366 var od = new api.City.fromJson(o.toJson()); | |
| 9367 checkCity(od); | |
| 9368 }); | |
| 9369 }); | |
| 9370 | |
| 9371 | |
| 9372 unittest.group("obj-schema-ClickTag", () { | |
| 9373 unittest.test("to-json--from-json", () { | |
| 9374 var o = buildClickTag(); | |
| 9375 var od = new api.ClickTag.fromJson(o.toJson()); | |
| 9376 checkClickTag(od); | |
| 9377 }); | |
| 9378 }); | |
| 9379 | |
| 9380 | |
| 9381 unittest.group("obj-schema-ClickThroughUrl", () { | |
| 9382 unittest.test("to-json--from-json", () { | |
| 9383 var o = buildClickThroughUrl(); | |
| 9384 var od = new api.ClickThroughUrl.fromJson(o.toJson()); | |
| 9385 checkClickThroughUrl(od); | |
| 9386 }); | |
| 9387 }); | |
| 9388 | |
| 9389 | |
| 9390 unittest.group("obj-schema-ClickThroughUrlSuffixProperties", () { | |
| 9391 unittest.test("to-json--from-json", () { | |
| 9392 var o = buildClickThroughUrlSuffixProperties(); | |
| 9393 var od = new api.ClickThroughUrlSuffixProperties.fromJson(o.toJson()); | |
| 9394 checkClickThroughUrlSuffixProperties(od); | |
| 9395 }); | |
| 9396 }); | |
| 9397 | |
| 9398 | |
| 9399 unittest.group("obj-schema-CompanionClickThroughOverride", () { | |
| 9400 unittest.test("to-json--from-json", () { | |
| 9401 var o = buildCompanionClickThroughOverride(); | |
| 9402 var od = new api.CompanionClickThroughOverride.fromJson(o.toJson()); | |
| 9403 checkCompanionClickThroughOverride(od); | |
| 9404 }); | |
| 9405 }); | |
| 9406 | |
| 9407 | |
| 9408 unittest.group("obj-schema-CompatibleFields", () { | |
| 9409 unittest.test("to-json--from-json", () { | |
| 9410 var o = buildCompatibleFields(); | |
| 9411 var od = new api.CompatibleFields.fromJson(o.toJson()); | |
| 9412 checkCompatibleFields(od); | |
| 9413 }); | |
| 9414 }); | |
| 9415 | |
| 9416 | |
| 9417 unittest.group("obj-schema-ConnectionType", () { | |
| 9418 unittest.test("to-json--from-json", () { | |
| 9419 var o = buildConnectionType(); | |
| 9420 var od = new api.ConnectionType.fromJson(o.toJson()); | |
| 9421 checkConnectionType(od); | |
| 9422 }); | |
| 9423 }); | |
| 9424 | |
| 9425 | |
| 9426 unittest.group("obj-schema-ConnectionTypesListResponse", () { | |
| 9427 unittest.test("to-json--from-json", () { | |
| 9428 var o = buildConnectionTypesListResponse(); | |
| 9429 var od = new api.ConnectionTypesListResponse.fromJson(o.toJson()); | |
| 9430 checkConnectionTypesListResponse(od); | |
| 9431 }); | |
| 9432 }); | |
| 9433 | |
| 9434 | |
| 9435 unittest.group("obj-schema-ContentCategoriesListResponse", () { | |
| 9436 unittest.test("to-json--from-json", () { | |
| 9437 var o = buildContentCategoriesListResponse(); | |
| 9438 var od = new api.ContentCategoriesListResponse.fromJson(o.toJson()); | |
| 9439 checkContentCategoriesListResponse(od); | |
| 9440 }); | |
| 9441 }); | |
| 9442 | |
| 9443 | |
| 9444 unittest.group("obj-schema-ContentCategory", () { | |
| 9445 unittest.test("to-json--from-json", () { | |
| 9446 var o = buildContentCategory(); | |
| 9447 var od = new api.ContentCategory.fromJson(o.toJson()); | |
| 9448 checkContentCategory(od); | |
| 9449 }); | |
| 9450 }); | |
| 9451 | |
| 9452 | |
| 9453 unittest.group("obj-schema-CountriesListResponse", () { | |
| 9454 unittest.test("to-json--from-json", () { | |
| 9455 var o = buildCountriesListResponse(); | |
| 9456 var od = new api.CountriesListResponse.fromJson(o.toJson()); | |
| 9457 checkCountriesListResponse(od); | |
| 9458 }); | |
| 9459 }); | |
| 9460 | |
| 9461 | |
| 9462 unittest.group("obj-schema-Country", () { | |
| 9463 unittest.test("to-json--from-json", () { | |
| 9464 var o = buildCountry(); | |
| 9465 var od = new api.Country.fromJson(o.toJson()); | |
| 9466 checkCountry(od); | |
| 9467 }); | |
| 9468 }); | |
| 9469 | |
| 9470 | |
| 9471 unittest.group("obj-schema-Creative", () { | |
| 9472 unittest.test("to-json--from-json", () { | |
| 9473 var o = buildCreative(); | |
| 9474 var od = new api.Creative.fromJson(o.toJson()); | |
| 9475 checkCreative(od); | |
| 9476 }); | |
| 9477 }); | |
| 9478 | |
| 9479 | |
| 9480 unittest.group("obj-schema-CreativeAsset", () { | |
| 9481 unittest.test("to-json--from-json", () { | |
| 9482 var o = buildCreativeAsset(); | |
| 9483 var od = new api.CreativeAsset.fromJson(o.toJson()); | |
| 9484 checkCreativeAsset(od); | |
| 9485 }); | |
| 9486 }); | |
| 9487 | |
| 9488 | |
| 9489 unittest.group("obj-schema-CreativeAssetId", () { | |
| 9490 unittest.test("to-json--from-json", () { | |
| 9491 var o = buildCreativeAssetId(); | |
| 9492 var od = new api.CreativeAssetId.fromJson(o.toJson()); | |
| 9493 checkCreativeAssetId(od); | |
| 9494 }); | |
| 9495 }); | |
| 9496 | |
| 9497 | |
| 9498 unittest.group("obj-schema-CreativeAssetMetadata", () { | |
| 9499 unittest.test("to-json--from-json", () { | |
| 9500 var o = buildCreativeAssetMetadata(); | |
| 9501 var od = new api.CreativeAssetMetadata.fromJson(o.toJson()); | |
| 9502 checkCreativeAssetMetadata(od); | |
| 9503 }); | |
| 9504 }); | |
| 9505 | |
| 9506 | |
| 9507 unittest.group("obj-schema-CreativeAssignment", () { | |
| 9508 unittest.test("to-json--from-json", () { | |
| 9509 var o = buildCreativeAssignment(); | |
| 9510 var od = new api.CreativeAssignment.fromJson(o.toJson()); | |
| 9511 checkCreativeAssignment(od); | |
| 9512 }); | |
| 9513 }); | |
| 9514 | |
| 9515 | |
| 9516 unittest.group("obj-schema-CreativeCustomEvent", () { | |
| 9517 unittest.test("to-json--from-json", () { | |
| 9518 var o = buildCreativeCustomEvent(); | |
| 9519 var od = new api.CreativeCustomEvent.fromJson(o.toJson()); | |
| 9520 checkCreativeCustomEvent(od); | |
| 9521 }); | |
| 9522 }); | |
| 9523 | |
| 9524 | |
| 9525 unittest.group("obj-schema-CreativeField", () { | |
| 9526 unittest.test("to-json--from-json", () { | |
| 9527 var o = buildCreativeField(); | |
| 9528 var od = new api.CreativeField.fromJson(o.toJson()); | |
| 9529 checkCreativeField(od); | |
| 9530 }); | |
| 9531 }); | |
| 9532 | |
| 9533 | |
| 9534 unittest.group("obj-schema-CreativeFieldAssignment", () { | |
| 9535 unittest.test("to-json--from-json", () { | |
| 9536 var o = buildCreativeFieldAssignment(); | |
| 9537 var od = new api.CreativeFieldAssignment.fromJson(o.toJson()); | |
| 9538 checkCreativeFieldAssignment(od); | |
| 9539 }); | |
| 9540 }); | |
| 9541 | |
| 9542 | |
| 9543 unittest.group("obj-schema-CreativeFieldValue", () { | |
| 9544 unittest.test("to-json--from-json", () { | |
| 9545 var o = buildCreativeFieldValue(); | |
| 9546 var od = new api.CreativeFieldValue.fromJson(o.toJson()); | |
| 9547 checkCreativeFieldValue(od); | |
| 9548 }); | |
| 9549 }); | |
| 9550 | |
| 9551 | |
| 9552 unittest.group("obj-schema-CreativeFieldValuesListResponse", () { | |
| 9553 unittest.test("to-json--from-json", () { | |
| 9554 var o = buildCreativeFieldValuesListResponse(); | |
| 9555 var od = new api.CreativeFieldValuesListResponse.fromJson(o.toJson()); | |
| 9556 checkCreativeFieldValuesListResponse(od); | |
| 9557 }); | |
| 9558 }); | |
| 9559 | |
| 9560 | |
| 9561 unittest.group("obj-schema-CreativeFieldsListResponse", () { | |
| 9562 unittest.test("to-json--from-json", () { | |
| 9563 var o = buildCreativeFieldsListResponse(); | |
| 9564 var od = new api.CreativeFieldsListResponse.fromJson(o.toJson()); | |
| 9565 checkCreativeFieldsListResponse(od); | |
| 9566 }); | |
| 9567 }); | |
| 9568 | |
| 9569 | |
| 9570 unittest.group("obj-schema-CreativeGroup", () { | |
| 9571 unittest.test("to-json--from-json", () { | |
| 9572 var o = buildCreativeGroup(); | |
| 9573 var od = new api.CreativeGroup.fromJson(o.toJson()); | |
| 9574 checkCreativeGroup(od); | |
| 9575 }); | |
| 9576 }); | |
| 9577 | |
| 9578 | |
| 9579 unittest.group("obj-schema-CreativeGroupAssignment", () { | |
| 9580 unittest.test("to-json--from-json", () { | |
| 9581 var o = buildCreativeGroupAssignment(); | |
| 9582 var od = new api.CreativeGroupAssignment.fromJson(o.toJson()); | |
| 9583 checkCreativeGroupAssignment(od); | |
| 9584 }); | |
| 9585 }); | |
| 9586 | |
| 9587 | |
| 9588 unittest.group("obj-schema-CreativeGroupsListResponse", () { | |
| 9589 unittest.test("to-json--from-json", () { | |
| 9590 var o = buildCreativeGroupsListResponse(); | |
| 9591 var od = new api.CreativeGroupsListResponse.fromJson(o.toJson()); | |
| 9592 checkCreativeGroupsListResponse(od); | |
| 9593 }); | |
| 9594 }); | |
| 9595 | |
| 9596 | |
| 9597 unittest.group("obj-schema-CreativeOptimizationConfiguration", () { | |
| 9598 unittest.test("to-json--from-json", () { | |
| 9599 var o = buildCreativeOptimizationConfiguration(); | |
| 9600 var od = new api.CreativeOptimizationConfiguration.fromJson(o.toJson()); | |
| 9601 checkCreativeOptimizationConfiguration(od); | |
| 9602 }); | |
| 9603 }); | |
| 9604 | |
| 9605 | |
| 9606 unittest.group("obj-schema-CreativeRotation", () { | |
| 9607 unittest.test("to-json--from-json", () { | |
| 9608 var o = buildCreativeRotation(); | |
| 9609 var od = new api.CreativeRotation.fromJson(o.toJson()); | |
| 9610 checkCreativeRotation(od); | |
| 9611 }); | |
| 9612 }); | |
| 9613 | |
| 9614 | |
| 9615 unittest.group("obj-schema-CreativeSettings", () { | |
| 9616 unittest.test("to-json--from-json", () { | |
| 9617 var o = buildCreativeSettings(); | |
| 9618 var od = new api.CreativeSettings.fromJson(o.toJson()); | |
| 9619 checkCreativeSettings(od); | |
| 9620 }); | |
| 9621 }); | |
| 9622 | |
| 9623 | |
| 9624 unittest.group("obj-schema-CreativesListResponse", () { | |
| 9625 unittest.test("to-json--from-json", () { | |
| 9626 var o = buildCreativesListResponse(); | |
| 9627 var od = new api.CreativesListResponse.fromJson(o.toJson()); | |
| 9628 checkCreativesListResponse(od); | |
| 9629 }); | |
| 9630 }); | |
| 9631 | |
| 9632 | |
| 9633 unittest.group("obj-schema-CrossDimensionReachReportCompatibleFields", () { | |
| 9634 unittest.test("to-json--from-json", () { | |
| 9635 var o = buildCrossDimensionReachReportCompatibleFields(); | |
| 9636 var od = new api.CrossDimensionReachReportCompatibleFields.fromJson(o.toJs
on()); | |
| 9637 checkCrossDimensionReachReportCompatibleFields(od); | |
| 9638 }); | |
| 9639 }); | |
| 9640 | |
| 9641 | |
| 9642 unittest.group("obj-schema-CustomRichMediaEvents", () { | |
| 9643 unittest.test("to-json--from-json", () { | |
| 9644 var o = buildCustomRichMediaEvents(); | |
| 9645 var od = new api.CustomRichMediaEvents.fromJson(o.toJson()); | |
| 9646 checkCustomRichMediaEvents(od); | |
| 9647 }); | |
| 9648 }); | |
| 9649 | |
| 9650 | |
| 9651 unittest.group("obj-schema-DateRange", () { | |
| 9652 unittest.test("to-json--from-json", () { | |
| 9653 var o = buildDateRange(); | |
| 9654 var od = new api.DateRange.fromJson(o.toJson()); | |
| 9655 checkDateRange(od); | |
| 9656 }); | |
| 9657 }); | |
| 9658 | |
| 9659 | |
| 9660 unittest.group("obj-schema-DayPartTargeting", () { | |
| 9661 unittest.test("to-json--from-json", () { | |
| 9662 var o = buildDayPartTargeting(); | |
| 9663 var od = new api.DayPartTargeting.fromJson(o.toJson()); | |
| 9664 checkDayPartTargeting(od); | |
| 9665 }); | |
| 9666 }); | |
| 9667 | |
| 9668 | |
| 9669 unittest.group("obj-schema-DefaultClickThroughEventTagProperties", () { | |
| 9670 unittest.test("to-json--from-json", () { | |
| 9671 var o = buildDefaultClickThroughEventTagProperties(); | |
| 9672 var od = new api.DefaultClickThroughEventTagProperties.fromJson(o.toJson()
); | |
| 9673 checkDefaultClickThroughEventTagProperties(od); | |
| 9674 }); | |
| 9675 }); | |
| 9676 | |
| 9677 | |
| 9678 unittest.group("obj-schema-DeliverySchedule", () { | |
| 9679 unittest.test("to-json--from-json", () { | |
| 9680 var o = buildDeliverySchedule(); | |
| 9681 var od = new api.DeliverySchedule.fromJson(o.toJson()); | |
| 9682 checkDeliverySchedule(od); | |
| 9683 }); | |
| 9684 }); | |
| 9685 | |
| 9686 | |
| 9687 unittest.group("obj-schema-DfpSettings", () { | |
| 9688 unittest.test("to-json--from-json", () { | |
| 9689 var o = buildDfpSettings(); | |
| 9690 var od = new api.DfpSettings.fromJson(o.toJson()); | |
| 9691 checkDfpSettings(od); | |
| 9692 }); | |
| 9693 }); | |
| 9694 | |
| 9695 | |
| 9696 unittest.group("obj-schema-Dimension", () { | |
| 9697 unittest.test("to-json--from-json", () { | |
| 9698 var o = buildDimension(); | |
| 9699 var od = new api.Dimension.fromJson(o.toJson()); | |
| 9700 checkDimension(od); | |
| 9701 }); | |
| 9702 }); | |
| 9703 | |
| 9704 | |
| 9705 unittest.group("obj-schema-DimensionFilter", () { | |
| 9706 unittest.test("to-json--from-json", () { | |
| 9707 var o = buildDimensionFilter(); | |
| 9708 var od = new api.DimensionFilter.fromJson(o.toJson()); | |
| 9709 checkDimensionFilter(od); | |
| 9710 }); | |
| 9711 }); | |
| 9712 | |
| 9713 | |
| 9714 unittest.group("obj-schema-DimensionValue", () { | |
| 9715 unittest.test("to-json--from-json", () { | |
| 9716 var o = buildDimensionValue(); | |
| 9717 var od = new api.DimensionValue.fromJson(o.toJson()); | |
| 9718 checkDimensionValue(od); | |
| 9719 }); | |
| 9720 }); | |
| 9721 | |
| 9722 | |
| 9723 unittest.group("obj-schema-DimensionValueList", () { | |
| 9724 unittest.test("to-json--from-json", () { | |
| 9725 var o = buildDimensionValueList(); | |
| 9726 var od = new api.DimensionValueList.fromJson(o.toJson()); | |
| 9727 checkDimensionValueList(od); | |
| 9728 }); | |
| 9729 }); | |
| 9730 | |
| 9731 | |
| 9732 unittest.group("obj-schema-DimensionValueRequest", () { | |
| 9733 unittest.test("to-json--from-json", () { | |
| 9734 var o = buildDimensionValueRequest(); | |
| 9735 var od = new api.DimensionValueRequest.fromJson(o.toJson()); | |
| 9736 checkDimensionValueRequest(od); | |
| 9737 }); | |
| 9738 }); | |
| 9739 | |
| 9740 | |
| 9741 unittest.group("obj-schema-DirectorySite", () { | |
| 9742 unittest.test("to-json--from-json", () { | |
| 9743 var o = buildDirectorySite(); | |
| 9744 var od = new api.DirectorySite.fromJson(o.toJson()); | |
| 9745 checkDirectorySite(od); | |
| 9746 }); | |
| 9747 }); | |
| 9748 | |
| 9749 | |
| 9750 unittest.group("obj-schema-DirectorySiteContact", () { | |
| 9751 unittest.test("to-json--from-json", () { | |
| 9752 var o = buildDirectorySiteContact(); | |
| 9753 var od = new api.DirectorySiteContact.fromJson(o.toJson()); | |
| 9754 checkDirectorySiteContact(od); | |
| 9755 }); | |
| 9756 }); | |
| 9757 | |
| 9758 | |
| 9759 unittest.group("obj-schema-DirectorySiteContactAssignment", () { | |
| 9760 unittest.test("to-json--from-json", () { | |
| 9761 var o = buildDirectorySiteContactAssignment(); | |
| 9762 var od = new api.DirectorySiteContactAssignment.fromJson(o.toJson()); | |
| 9763 checkDirectorySiteContactAssignment(od); | |
| 9764 }); | |
| 9765 }); | |
| 9766 | |
| 9767 | |
| 9768 unittest.group("obj-schema-DirectorySiteContactsListResponse", () { | |
| 9769 unittest.test("to-json--from-json", () { | |
| 9770 var o = buildDirectorySiteContactsListResponse(); | |
| 9771 var od = new api.DirectorySiteContactsListResponse.fromJson(o.toJson()); | |
| 9772 checkDirectorySiteContactsListResponse(od); | |
| 9773 }); | |
| 9774 }); | |
| 9775 | |
| 9776 | |
| 9777 unittest.group("obj-schema-DirectorySiteSettings", () { | |
| 9778 unittest.test("to-json--from-json", () { | |
| 9779 var o = buildDirectorySiteSettings(); | |
| 9780 var od = new api.DirectorySiteSettings.fromJson(o.toJson()); | |
| 9781 checkDirectorySiteSettings(od); | |
| 9782 }); | |
| 9783 }); | |
| 9784 | |
| 9785 | |
| 9786 unittest.group("obj-schema-DirectorySitesListResponse", () { | |
| 9787 unittest.test("to-json--from-json", () { | |
| 9788 var o = buildDirectorySitesListResponse(); | |
| 9789 var od = new api.DirectorySitesListResponse.fromJson(o.toJson()); | |
| 9790 checkDirectorySitesListResponse(od); | |
| 9791 }); | |
| 9792 }); | |
| 9793 | |
| 9794 | |
| 9795 unittest.group("obj-schema-EventTag", () { | |
| 9796 unittest.test("to-json--from-json", () { | |
| 9797 var o = buildEventTag(); | |
| 9798 var od = new api.EventTag.fromJson(o.toJson()); | |
| 9799 checkEventTag(od); | |
| 9800 }); | |
| 9801 }); | |
| 9802 | |
| 9803 | |
| 9804 unittest.group("obj-schema-EventTagOverride", () { | |
| 9805 unittest.test("to-json--from-json", () { | |
| 9806 var o = buildEventTagOverride(); | |
| 9807 var od = new api.EventTagOverride.fromJson(o.toJson()); | |
| 9808 checkEventTagOverride(od); | |
| 9809 }); | |
| 9810 }); | |
| 9811 | |
| 9812 | |
| 9813 unittest.group("obj-schema-EventTagsListResponse", () { | |
| 9814 unittest.test("to-json--from-json", () { | |
| 9815 var o = buildEventTagsListResponse(); | |
| 9816 var od = new api.EventTagsListResponse.fromJson(o.toJson()); | |
| 9817 checkEventTagsListResponse(od); | |
| 9818 }); | |
| 9819 }); | |
| 9820 | |
| 9821 | |
| 9822 unittest.group("obj-schema-FileUrls", () { | |
| 9823 unittest.test("to-json--from-json", () { | |
| 9824 var o = buildFileUrls(); | |
| 9825 var od = new api.FileUrls.fromJson(o.toJson()); | |
| 9826 checkFileUrls(od); | |
| 9827 }); | |
| 9828 }); | |
| 9829 | |
| 9830 | |
| 9831 unittest.group("obj-schema-File", () { | |
| 9832 unittest.test("to-json--from-json", () { | |
| 9833 var o = buildFile(); | |
| 9834 var od = new api.File.fromJson(o.toJson()); | |
| 9835 checkFile(od); | |
| 9836 }); | |
| 9837 }); | |
| 9838 | |
| 9839 | |
| 9840 unittest.group("obj-schema-FileList", () { | |
| 9841 unittest.test("to-json--from-json", () { | |
| 9842 var o = buildFileList(); | |
| 9843 var od = new api.FileList.fromJson(o.toJson()); | |
| 9844 checkFileList(od); | |
| 9845 }); | |
| 9846 }); | |
| 9847 | |
| 9848 | |
| 9849 unittest.group("obj-schema-Flight", () { | |
| 9850 unittest.test("to-json--from-json", () { | |
| 9851 var o = buildFlight(); | |
| 9852 var od = new api.Flight.fromJson(o.toJson()); | |
| 9853 checkFlight(od); | |
| 9854 }); | |
| 9855 }); | |
| 9856 | |
| 9857 | |
| 9858 unittest.group("obj-schema-FloodlightActivitiesGenerateTagResponse", () { | |
| 9859 unittest.test("to-json--from-json", () { | |
| 9860 var o = buildFloodlightActivitiesGenerateTagResponse(); | |
| 9861 var od = new api.FloodlightActivitiesGenerateTagResponse.fromJson(o.toJson
()); | |
| 9862 checkFloodlightActivitiesGenerateTagResponse(od); | |
| 9863 }); | |
| 9864 }); | |
| 9865 | |
| 9866 | |
| 9867 unittest.group("obj-schema-FloodlightActivitiesListResponse", () { | |
| 9868 unittest.test("to-json--from-json", () { | |
| 9869 var o = buildFloodlightActivitiesListResponse(); | |
| 9870 var od = new api.FloodlightActivitiesListResponse.fromJson(o.toJson()); | |
| 9871 checkFloodlightActivitiesListResponse(od); | |
| 9872 }); | |
| 9873 }); | |
| 9874 | |
| 9875 | |
| 9876 unittest.group("obj-schema-FloodlightActivity", () { | |
| 9877 unittest.test("to-json--from-json", () { | |
| 9878 var o = buildFloodlightActivity(); | |
| 9879 var od = new api.FloodlightActivity.fromJson(o.toJson()); | |
| 9880 checkFloodlightActivity(od); | |
| 9881 }); | |
| 9882 }); | |
| 9883 | |
| 9884 | |
| 9885 unittest.group("obj-schema-FloodlightActivityDynamicTag", () { | |
| 9886 unittest.test("to-json--from-json", () { | |
| 9887 var o = buildFloodlightActivityDynamicTag(); | |
| 9888 var od = new api.FloodlightActivityDynamicTag.fromJson(o.toJson()); | |
| 9889 checkFloodlightActivityDynamicTag(od); | |
| 9890 }); | |
| 9891 }); | |
| 9892 | |
| 9893 | |
| 9894 unittest.group("obj-schema-FloodlightActivityGroup", () { | |
| 9895 unittest.test("to-json--from-json", () { | |
| 9896 var o = buildFloodlightActivityGroup(); | |
| 9897 var od = new api.FloodlightActivityGroup.fromJson(o.toJson()); | |
| 9898 checkFloodlightActivityGroup(od); | |
| 9899 }); | |
| 9900 }); | |
| 9901 | |
| 9902 | |
| 9903 unittest.group("obj-schema-FloodlightActivityGroupsListResponse", () { | |
| 9904 unittest.test("to-json--from-json", () { | |
| 9905 var o = buildFloodlightActivityGroupsListResponse(); | |
| 9906 var od = new api.FloodlightActivityGroupsListResponse.fromJson(o.toJson())
; | |
| 9907 checkFloodlightActivityGroupsListResponse(od); | |
| 9908 }); | |
| 9909 }); | |
| 9910 | |
| 9911 | |
| 9912 unittest.group("obj-schema-FloodlightActivityPublisherDynamicTag", () { | |
| 9913 unittest.test("to-json--from-json", () { | |
| 9914 var o = buildFloodlightActivityPublisherDynamicTag(); | |
| 9915 var od = new api.FloodlightActivityPublisherDynamicTag.fromJson(o.toJson()
); | |
| 9916 checkFloodlightActivityPublisherDynamicTag(od); | |
| 9917 }); | |
| 9918 }); | |
| 9919 | |
| 9920 | |
| 9921 unittest.group("obj-schema-FloodlightConfiguration", () { | |
| 9922 unittest.test("to-json--from-json", () { | |
| 9923 var o = buildFloodlightConfiguration(); | |
| 9924 var od = new api.FloodlightConfiguration.fromJson(o.toJson()); | |
| 9925 checkFloodlightConfiguration(od); | |
| 9926 }); | |
| 9927 }); | |
| 9928 | |
| 9929 | |
| 9930 unittest.group("obj-schema-FloodlightConfigurationsListResponse", () { | |
| 9931 unittest.test("to-json--from-json", () { | |
| 9932 var o = buildFloodlightConfigurationsListResponse(); | |
| 9933 var od = new api.FloodlightConfigurationsListResponse.fromJson(o.toJson())
; | |
| 9934 checkFloodlightConfigurationsListResponse(od); | |
| 9935 }); | |
| 9936 }); | |
| 9937 | |
| 9938 | |
| 9939 unittest.group("obj-schema-FloodlightReportCompatibleFields", () { | |
| 9940 unittest.test("to-json--from-json", () { | |
| 9941 var o = buildFloodlightReportCompatibleFields(); | |
| 9942 var od = new api.FloodlightReportCompatibleFields.fromJson(o.toJson()); | |
| 9943 checkFloodlightReportCompatibleFields(od); | |
| 9944 }); | |
| 9945 }); | |
| 9946 | |
| 9947 | |
| 9948 unittest.group("obj-schema-FrequencyCap", () { | |
| 9949 unittest.test("to-json--from-json", () { | |
| 9950 var o = buildFrequencyCap(); | |
| 9951 var od = new api.FrequencyCap.fromJson(o.toJson()); | |
| 9952 checkFrequencyCap(od); | |
| 9953 }); | |
| 9954 }); | |
| 9955 | |
| 9956 | |
| 9957 unittest.group("obj-schema-FsCommand", () { | |
| 9958 unittest.test("to-json--from-json", () { | |
| 9959 var o = buildFsCommand(); | |
| 9960 var od = new api.FsCommand.fromJson(o.toJson()); | |
| 9961 checkFsCommand(od); | |
| 9962 }); | |
| 9963 }); | |
| 9964 | |
| 9965 | |
| 9966 unittest.group("obj-schema-GeoTargeting", () { | |
| 9967 unittest.test("to-json--from-json", () { | |
| 9968 var o = buildGeoTargeting(); | |
| 9969 var od = new api.GeoTargeting.fromJson(o.toJson()); | |
| 9970 checkGeoTargeting(od); | |
| 9971 }); | |
| 9972 }); | |
| 9973 | |
| 9974 | |
| 9975 unittest.group("obj-schema-InventoryItem", () { | |
| 9976 unittest.test("to-json--from-json", () { | |
| 9977 var o = buildInventoryItem(); | |
| 9978 var od = new api.InventoryItem.fromJson(o.toJson()); | |
| 9979 checkInventoryItem(od); | |
| 9980 }); | |
| 9981 }); | |
| 9982 | |
| 9983 | |
| 9984 unittest.group("obj-schema-InventoryItemsListResponse", () { | |
| 9985 unittest.test("to-json--from-json", () { | |
| 9986 var o = buildInventoryItemsListResponse(); | |
| 9987 var od = new api.InventoryItemsListResponse.fromJson(o.toJson()); | |
| 9988 checkInventoryItemsListResponse(od); | |
| 9989 }); | |
| 9990 }); | |
| 9991 | |
| 9992 | |
| 9993 unittest.group("obj-schema-KeyValueTargetingExpression", () { | |
| 9994 unittest.test("to-json--from-json", () { | |
| 9995 var o = buildKeyValueTargetingExpression(); | |
| 9996 var od = new api.KeyValueTargetingExpression.fromJson(o.toJson()); | |
| 9997 checkKeyValueTargetingExpression(od); | |
| 9998 }); | |
| 9999 }); | |
| 10000 | |
| 10001 | |
| 10002 unittest.group("obj-schema-LandingPage", () { | |
| 10003 unittest.test("to-json--from-json", () { | |
| 10004 var o = buildLandingPage(); | |
| 10005 var od = new api.LandingPage.fromJson(o.toJson()); | |
| 10006 checkLandingPage(od); | |
| 10007 }); | |
| 10008 }); | |
| 10009 | |
| 10010 | |
| 10011 unittest.group("obj-schema-LandingPagesListResponse", () { | |
| 10012 unittest.test("to-json--from-json", () { | |
| 10013 var o = buildLandingPagesListResponse(); | |
| 10014 var od = new api.LandingPagesListResponse.fromJson(o.toJson()); | |
| 10015 checkLandingPagesListResponse(od); | |
| 10016 }); | |
| 10017 }); | |
| 10018 | |
| 10019 | |
| 10020 unittest.group("obj-schema-LastModifiedInfo", () { | |
| 10021 unittest.test("to-json--from-json", () { | |
| 10022 var o = buildLastModifiedInfo(); | |
| 10023 var od = new api.LastModifiedInfo.fromJson(o.toJson()); | |
| 10024 checkLastModifiedInfo(od); | |
| 10025 }); | |
| 10026 }); | |
| 10027 | |
| 10028 | |
| 10029 unittest.group("obj-schema-ListPopulationClause", () { | |
| 10030 unittest.test("to-json--from-json", () { | |
| 10031 var o = buildListPopulationClause(); | |
| 10032 var od = new api.ListPopulationClause.fromJson(o.toJson()); | |
| 10033 checkListPopulationClause(od); | |
| 10034 }); | |
| 10035 }); | |
| 10036 | |
| 10037 | |
| 10038 unittest.group("obj-schema-ListPopulationRule", () { | |
| 10039 unittest.test("to-json--from-json", () { | |
| 10040 var o = buildListPopulationRule(); | |
| 10041 var od = new api.ListPopulationRule.fromJson(o.toJson()); | |
| 10042 checkListPopulationRule(od); | |
| 10043 }); | |
| 10044 }); | |
| 10045 | |
| 10046 | |
| 10047 unittest.group("obj-schema-ListPopulationTerm", () { | |
| 10048 unittest.test("to-json--from-json", () { | |
| 10049 var o = buildListPopulationTerm(); | |
| 10050 var od = new api.ListPopulationTerm.fromJson(o.toJson()); | |
| 10051 checkListPopulationTerm(od); | |
| 10052 }); | |
| 10053 }); | |
| 10054 | |
| 10055 | |
| 10056 unittest.group("obj-schema-ListTargetingExpression", () { | |
| 10057 unittest.test("to-json--from-json", () { | |
| 10058 var o = buildListTargetingExpression(); | |
| 10059 var od = new api.ListTargetingExpression.fromJson(o.toJson()); | |
| 10060 checkListTargetingExpression(od); | |
| 10061 }); | |
| 10062 }); | |
| 10063 | |
| 10064 | |
| 10065 unittest.group("obj-schema-LookbackConfiguration", () { | |
| 10066 unittest.test("to-json--from-json", () { | |
| 10067 var o = buildLookbackConfiguration(); | |
| 10068 var od = new api.LookbackConfiguration.fromJson(o.toJson()); | |
| 10069 checkLookbackConfiguration(od); | |
| 10070 }); | |
| 10071 }); | |
| 10072 | |
| 10073 | |
| 10074 unittest.group("obj-schema-Metric", () { | |
| 10075 unittest.test("to-json--from-json", () { | |
| 10076 var o = buildMetric(); | |
| 10077 var od = new api.Metric.fromJson(o.toJson()); | |
| 10078 checkMetric(od); | |
| 10079 }); | |
| 10080 }); | |
| 10081 | |
| 10082 | |
| 10083 unittest.group("obj-schema-Metro", () { | |
| 10084 unittest.test("to-json--from-json", () { | |
| 10085 var o = buildMetro(); | |
| 10086 var od = new api.Metro.fromJson(o.toJson()); | |
| 10087 checkMetro(od); | |
| 10088 }); | |
| 10089 }); | |
| 10090 | |
| 10091 | |
| 10092 unittest.group("obj-schema-MetrosListResponse", () { | |
| 10093 unittest.test("to-json--from-json", () { | |
| 10094 var o = buildMetrosListResponse(); | |
| 10095 var od = new api.MetrosListResponse.fromJson(o.toJson()); | |
| 10096 checkMetrosListResponse(od); | |
| 10097 }); | |
| 10098 }); | |
| 10099 | |
| 10100 | |
| 10101 unittest.group("obj-schema-MobileCarrier", () { | |
| 10102 unittest.test("to-json--from-json", () { | |
| 10103 var o = buildMobileCarrier(); | |
| 10104 var od = new api.MobileCarrier.fromJson(o.toJson()); | |
| 10105 checkMobileCarrier(od); | |
| 10106 }); | |
| 10107 }); | |
| 10108 | |
| 10109 | |
| 10110 unittest.group("obj-schema-MobileCarriersListResponse", () { | |
| 10111 unittest.test("to-json--from-json", () { | |
| 10112 var o = buildMobileCarriersListResponse(); | |
| 10113 var od = new api.MobileCarriersListResponse.fromJson(o.toJson()); | |
| 10114 checkMobileCarriersListResponse(od); | |
| 10115 }); | |
| 10116 }); | |
| 10117 | |
| 10118 | |
| 10119 unittest.group("obj-schema-ObjectFilter", () { | |
| 10120 unittest.test("to-json--from-json", () { | |
| 10121 var o = buildObjectFilter(); | |
| 10122 var od = new api.ObjectFilter.fromJson(o.toJson()); | |
| 10123 checkObjectFilter(od); | |
| 10124 }); | |
| 10125 }); | |
| 10126 | |
| 10127 | |
| 10128 unittest.group("obj-schema-OffsetPosition", () { | |
| 10129 unittest.test("to-json--from-json", () { | |
| 10130 var o = buildOffsetPosition(); | |
| 10131 var od = new api.OffsetPosition.fromJson(o.toJson()); | |
| 10132 checkOffsetPosition(od); | |
| 10133 }); | |
| 10134 }); | |
| 10135 | |
| 10136 | |
| 10137 unittest.group("obj-schema-OmnitureSettings", () { | |
| 10138 unittest.test("to-json--from-json", () { | |
| 10139 var o = buildOmnitureSettings(); | |
| 10140 var od = new api.OmnitureSettings.fromJson(o.toJson()); | |
| 10141 checkOmnitureSettings(od); | |
| 10142 }); | |
| 10143 }); | |
| 10144 | |
| 10145 | |
| 10146 unittest.group("obj-schema-OperatingSystem", () { | |
| 10147 unittest.test("to-json--from-json", () { | |
| 10148 var o = buildOperatingSystem(); | |
| 10149 var od = new api.OperatingSystem.fromJson(o.toJson()); | |
| 10150 checkOperatingSystem(od); | |
| 10151 }); | |
| 10152 }); | |
| 10153 | |
| 10154 | |
| 10155 unittest.group("obj-schema-OperatingSystemVersion", () { | |
| 10156 unittest.test("to-json--from-json", () { | |
| 10157 var o = buildOperatingSystemVersion(); | |
| 10158 var od = new api.OperatingSystemVersion.fromJson(o.toJson()); | |
| 10159 checkOperatingSystemVersion(od); | |
| 10160 }); | |
| 10161 }); | |
| 10162 | |
| 10163 | |
| 10164 unittest.group("obj-schema-OperatingSystemVersionsListResponse", () { | |
| 10165 unittest.test("to-json--from-json", () { | |
| 10166 var o = buildOperatingSystemVersionsListResponse(); | |
| 10167 var od = new api.OperatingSystemVersionsListResponse.fromJson(o.toJson()); | |
| 10168 checkOperatingSystemVersionsListResponse(od); | |
| 10169 }); | |
| 10170 }); | |
| 10171 | |
| 10172 | |
| 10173 unittest.group("obj-schema-OperatingSystemsListResponse", () { | |
| 10174 unittest.test("to-json--from-json", () { | |
| 10175 var o = buildOperatingSystemsListResponse(); | |
| 10176 var od = new api.OperatingSystemsListResponse.fromJson(o.toJson()); | |
| 10177 checkOperatingSystemsListResponse(od); | |
| 10178 }); | |
| 10179 }); | |
| 10180 | |
| 10181 | |
| 10182 unittest.group("obj-schema-OptimizationActivity", () { | |
| 10183 unittest.test("to-json--from-json", () { | |
| 10184 var o = buildOptimizationActivity(); | |
| 10185 var od = new api.OptimizationActivity.fromJson(o.toJson()); | |
| 10186 checkOptimizationActivity(od); | |
| 10187 }); | |
| 10188 }); | |
| 10189 | |
| 10190 | |
| 10191 unittest.group("obj-schema-Order", () { | |
| 10192 unittest.test("to-json--from-json", () { | |
| 10193 var o = buildOrder(); | |
| 10194 var od = new api.Order.fromJson(o.toJson()); | |
| 10195 checkOrder(od); | |
| 10196 }); | |
| 10197 }); | |
| 10198 | |
| 10199 | |
| 10200 unittest.group("obj-schema-OrderContact", () { | |
| 10201 unittest.test("to-json--from-json", () { | |
| 10202 var o = buildOrderContact(); | |
| 10203 var od = new api.OrderContact.fromJson(o.toJson()); | |
| 10204 checkOrderContact(od); | |
| 10205 }); | |
| 10206 }); | |
| 10207 | |
| 10208 | |
| 10209 unittest.group("obj-schema-OrderDocument", () { | |
| 10210 unittest.test("to-json--from-json", () { | |
| 10211 var o = buildOrderDocument(); | |
| 10212 var od = new api.OrderDocument.fromJson(o.toJson()); | |
| 10213 checkOrderDocument(od); | |
| 10214 }); | |
| 10215 }); | |
| 10216 | |
| 10217 | |
| 10218 unittest.group("obj-schema-OrderDocumentsListResponse", () { | |
| 10219 unittest.test("to-json--from-json", () { | |
| 10220 var o = buildOrderDocumentsListResponse(); | |
| 10221 var od = new api.OrderDocumentsListResponse.fromJson(o.toJson()); | |
| 10222 checkOrderDocumentsListResponse(od); | |
| 10223 }); | |
| 10224 }); | |
| 10225 | |
| 10226 | |
| 10227 unittest.group("obj-schema-OrdersListResponse", () { | |
| 10228 unittest.test("to-json--from-json", () { | |
| 10229 var o = buildOrdersListResponse(); | |
| 10230 var od = new api.OrdersListResponse.fromJson(o.toJson()); | |
| 10231 checkOrdersListResponse(od); | |
| 10232 }); | |
| 10233 }); | |
| 10234 | |
| 10235 | |
| 10236 unittest.group("obj-schema-PathToConversionReportCompatibleFields", () { | |
| 10237 unittest.test("to-json--from-json", () { | |
| 10238 var o = buildPathToConversionReportCompatibleFields(); | |
| 10239 var od = new api.PathToConversionReportCompatibleFields.fromJson(o.toJson(
)); | |
| 10240 checkPathToConversionReportCompatibleFields(od); | |
| 10241 }); | |
| 10242 }); | |
| 10243 | |
| 10244 | |
| 10245 unittest.group("obj-schema-Placement", () { | |
| 10246 unittest.test("to-json--from-json", () { | |
| 10247 var o = buildPlacement(); | |
| 10248 var od = new api.Placement.fromJson(o.toJson()); | |
| 10249 checkPlacement(od); | |
| 10250 }); | |
| 10251 }); | |
| 10252 | |
| 10253 | |
| 10254 unittest.group("obj-schema-PlacementAssignment", () { | |
| 10255 unittest.test("to-json--from-json", () { | |
| 10256 var o = buildPlacementAssignment(); | |
| 10257 var od = new api.PlacementAssignment.fromJson(o.toJson()); | |
| 10258 checkPlacementAssignment(od); | |
| 10259 }); | |
| 10260 }); | |
| 10261 | |
| 10262 | |
| 10263 unittest.group("obj-schema-PlacementGroup", () { | |
| 10264 unittest.test("to-json--from-json", () { | |
| 10265 var o = buildPlacementGroup(); | |
| 10266 var od = new api.PlacementGroup.fromJson(o.toJson()); | |
| 10267 checkPlacementGroup(od); | |
| 10268 }); | |
| 10269 }); | |
| 10270 | |
| 10271 | |
| 10272 unittest.group("obj-schema-PlacementGroupsListResponse", () { | |
| 10273 unittest.test("to-json--from-json", () { | |
| 10274 var o = buildPlacementGroupsListResponse(); | |
| 10275 var od = new api.PlacementGroupsListResponse.fromJson(o.toJson()); | |
| 10276 checkPlacementGroupsListResponse(od); | |
| 10277 }); | |
| 10278 }); | |
| 10279 | |
| 10280 | |
| 10281 unittest.group("obj-schema-PlacementStrategiesListResponse", () { | |
| 10282 unittest.test("to-json--from-json", () { | |
| 10283 var o = buildPlacementStrategiesListResponse(); | |
| 10284 var od = new api.PlacementStrategiesListResponse.fromJson(o.toJson()); | |
| 10285 checkPlacementStrategiesListResponse(od); | |
| 10286 }); | |
| 10287 }); | |
| 10288 | |
| 10289 | |
| 10290 unittest.group("obj-schema-PlacementStrategy", () { | |
| 10291 unittest.test("to-json--from-json", () { | |
| 10292 var o = buildPlacementStrategy(); | |
| 10293 var od = new api.PlacementStrategy.fromJson(o.toJson()); | |
| 10294 checkPlacementStrategy(od); | |
| 10295 }); | |
| 10296 }); | |
| 10297 | |
| 10298 | |
| 10299 unittest.group("obj-schema-PlacementTag", () { | |
| 10300 unittest.test("to-json--from-json", () { | |
| 10301 var o = buildPlacementTag(); | |
| 10302 var od = new api.PlacementTag.fromJson(o.toJson()); | |
| 10303 checkPlacementTag(od); | |
| 10304 }); | |
| 10305 }); | |
| 10306 | |
| 10307 | |
| 10308 unittest.group("obj-schema-PlacementsGenerateTagsResponse", () { | |
| 10309 unittest.test("to-json--from-json", () { | |
| 10310 var o = buildPlacementsGenerateTagsResponse(); | |
| 10311 var od = new api.PlacementsGenerateTagsResponse.fromJson(o.toJson()); | |
| 10312 checkPlacementsGenerateTagsResponse(od); | |
| 10313 }); | |
| 10314 }); | |
| 10315 | |
| 10316 | |
| 10317 unittest.group("obj-schema-PlacementsListResponse", () { | |
| 10318 unittest.test("to-json--from-json", () { | |
| 10319 var o = buildPlacementsListResponse(); | |
| 10320 var od = new api.PlacementsListResponse.fromJson(o.toJson()); | |
| 10321 checkPlacementsListResponse(od); | |
| 10322 }); | |
| 10323 }); | |
| 10324 | |
| 10325 | |
| 10326 unittest.group("obj-schema-PlatformType", () { | |
| 10327 unittest.test("to-json--from-json", () { | |
| 10328 var o = buildPlatformType(); | |
| 10329 var od = new api.PlatformType.fromJson(o.toJson()); | |
| 10330 checkPlatformType(od); | |
| 10331 }); | |
| 10332 }); | |
| 10333 | |
| 10334 | |
| 10335 unittest.group("obj-schema-PlatformTypesListResponse", () { | |
| 10336 unittest.test("to-json--from-json", () { | |
| 10337 var o = buildPlatformTypesListResponse(); | |
| 10338 var od = new api.PlatformTypesListResponse.fromJson(o.toJson()); | |
| 10339 checkPlatformTypesListResponse(od); | |
| 10340 }); | |
| 10341 }); | |
| 10342 | |
| 10343 | |
| 10344 unittest.group("obj-schema-PopupWindowProperties", () { | |
| 10345 unittest.test("to-json--from-json", () { | |
| 10346 var o = buildPopupWindowProperties(); | |
| 10347 var od = new api.PopupWindowProperties.fromJson(o.toJson()); | |
| 10348 checkPopupWindowProperties(od); | |
| 10349 }); | |
| 10350 }); | |
| 10351 | |
| 10352 | |
| 10353 unittest.group("obj-schema-PostalCode", () { | |
| 10354 unittest.test("to-json--from-json", () { | |
| 10355 var o = buildPostalCode(); | |
| 10356 var od = new api.PostalCode.fromJson(o.toJson()); | |
| 10357 checkPostalCode(od); | |
| 10358 }); | |
| 10359 }); | |
| 10360 | |
| 10361 | |
| 10362 unittest.group("obj-schema-PostalCodesListResponse", () { | |
| 10363 unittest.test("to-json--from-json", () { | |
| 10364 var o = buildPostalCodesListResponse(); | |
| 10365 var od = new api.PostalCodesListResponse.fromJson(o.toJson()); | |
| 10366 checkPostalCodesListResponse(od); | |
| 10367 }); | |
| 10368 }); | |
| 10369 | |
| 10370 | |
| 10371 unittest.group("obj-schema-Pricing", () { | |
| 10372 unittest.test("to-json--from-json", () { | |
| 10373 var o = buildPricing(); | |
| 10374 var od = new api.Pricing.fromJson(o.toJson()); | |
| 10375 checkPricing(od); | |
| 10376 }); | |
| 10377 }); | |
| 10378 | |
| 10379 | |
| 10380 unittest.group("obj-schema-PricingSchedule", () { | |
| 10381 unittest.test("to-json--from-json", () { | |
| 10382 var o = buildPricingSchedule(); | |
| 10383 var od = new api.PricingSchedule.fromJson(o.toJson()); | |
| 10384 checkPricingSchedule(od); | |
| 10385 }); | |
| 10386 }); | |
| 10387 | |
| 10388 | |
| 10389 unittest.group("obj-schema-PricingSchedulePricingPeriod", () { | |
| 10390 unittest.test("to-json--from-json", () { | |
| 10391 var o = buildPricingSchedulePricingPeriod(); | |
| 10392 var od = new api.PricingSchedulePricingPeriod.fromJson(o.toJson()); | |
| 10393 checkPricingSchedulePricingPeriod(od); | |
| 10394 }); | |
| 10395 }); | |
| 10396 | |
| 10397 | |
| 10398 unittest.group("obj-schema-Project", () { | |
| 10399 unittest.test("to-json--from-json", () { | |
| 10400 var o = buildProject(); | |
| 10401 var od = new api.Project.fromJson(o.toJson()); | |
| 10402 checkProject(od); | |
| 10403 }); | |
| 10404 }); | |
| 10405 | |
| 10406 | |
| 10407 unittest.group("obj-schema-ProjectsListResponse", () { | |
| 10408 unittest.test("to-json--from-json", () { | |
| 10409 var o = buildProjectsListResponse(); | |
| 10410 var od = new api.ProjectsListResponse.fromJson(o.toJson()); | |
| 10411 checkProjectsListResponse(od); | |
| 10412 }); | |
| 10413 }); | |
| 10414 | |
| 10415 | |
| 10416 unittest.group("obj-schema-ReachReportCompatibleFields", () { | |
| 10417 unittest.test("to-json--from-json", () { | |
| 10418 var o = buildReachReportCompatibleFields(); | |
| 10419 var od = new api.ReachReportCompatibleFields.fromJson(o.toJson()); | |
| 10420 checkReachReportCompatibleFields(od); | |
| 10421 }); | |
| 10422 }); | |
| 10423 | |
| 10424 | |
| 10425 unittest.group("obj-schema-Recipient", () { | |
| 10426 unittest.test("to-json--from-json", () { | |
| 10427 var o = buildRecipient(); | |
| 10428 var od = new api.Recipient.fromJson(o.toJson()); | |
| 10429 checkRecipient(od); | |
| 10430 }); | |
| 10431 }); | |
| 10432 | |
| 10433 | |
| 10434 unittest.group("obj-schema-Region", () { | |
| 10435 unittest.test("to-json--from-json", () { | |
| 10436 var o = buildRegion(); | |
| 10437 var od = new api.Region.fromJson(o.toJson()); | |
| 10438 checkRegion(od); | |
| 10439 }); | |
| 10440 }); | |
| 10441 | |
| 10442 | |
| 10443 unittest.group("obj-schema-RegionsListResponse", () { | |
| 10444 unittest.test("to-json--from-json", () { | |
| 10445 var o = buildRegionsListResponse(); | |
| 10446 var od = new api.RegionsListResponse.fromJson(o.toJson()); | |
| 10447 checkRegionsListResponse(od); | |
| 10448 }); | |
| 10449 }); | |
| 10450 | |
| 10451 | |
| 10452 unittest.group("obj-schema-RemarketingList", () { | |
| 10453 unittest.test("to-json--from-json", () { | |
| 10454 var o = buildRemarketingList(); | |
| 10455 var od = new api.RemarketingList.fromJson(o.toJson()); | |
| 10456 checkRemarketingList(od); | |
| 10457 }); | |
| 10458 }); | |
| 10459 | |
| 10460 | |
| 10461 unittest.group("obj-schema-RemarketingListShare", () { | |
| 10462 unittest.test("to-json--from-json", () { | |
| 10463 var o = buildRemarketingListShare(); | |
| 10464 var od = new api.RemarketingListShare.fromJson(o.toJson()); | |
| 10465 checkRemarketingListShare(od); | |
| 10466 }); | |
| 10467 }); | |
| 10468 | |
| 10469 | |
| 10470 unittest.group("obj-schema-RemarketingListsListResponse", () { | |
| 10471 unittest.test("to-json--from-json", () { | |
| 10472 var o = buildRemarketingListsListResponse(); | |
| 10473 var od = new api.RemarketingListsListResponse.fromJson(o.toJson()); | |
| 10474 checkRemarketingListsListResponse(od); | |
| 10475 }); | |
| 10476 }); | |
| 10477 | |
| 10478 | |
| 10479 unittest.group("obj-schema-ReportCriteria", () { | |
| 10480 unittest.test("to-json--from-json", () { | |
| 10481 var o = buildReportCriteria(); | |
| 10482 var od = new api.ReportCriteria.fromJson(o.toJson()); | |
| 10483 checkReportCriteria(od); | |
| 10484 }); | |
| 10485 }); | |
| 10486 | |
| 10487 | |
| 10488 unittest.group("obj-schema-ReportCrossDimensionReachCriteria", () { | |
| 10489 unittest.test("to-json--from-json", () { | |
| 10490 var o = buildReportCrossDimensionReachCriteria(); | |
| 10491 var od = new api.ReportCrossDimensionReachCriteria.fromJson(o.toJson()); | |
| 10492 checkReportCrossDimensionReachCriteria(od); | |
| 10493 }); | |
| 10494 }); | |
| 10495 | |
| 10496 | |
| 10497 unittest.group("obj-schema-ReportDelivery", () { | |
| 10498 unittest.test("to-json--from-json", () { | |
| 10499 var o = buildReportDelivery(); | |
| 10500 var od = new api.ReportDelivery.fromJson(o.toJson()); | |
| 10501 checkReportDelivery(od); | |
| 10502 }); | |
| 10503 }); | |
| 10504 | |
| 10505 | |
| 10506 unittest.group("obj-schema-ReportFloodlightCriteriaReportProperties", () { | |
| 10507 unittest.test("to-json--from-json", () { | |
| 10508 var o = buildReportFloodlightCriteriaReportProperties(); | |
| 10509 var od = new api.ReportFloodlightCriteriaReportProperties.fromJson(o.toJso
n()); | |
| 10510 checkReportFloodlightCriteriaReportProperties(od); | |
| 10511 }); | |
| 10512 }); | |
| 10513 | |
| 10514 | |
| 10515 unittest.group("obj-schema-ReportFloodlightCriteria", () { | |
| 10516 unittest.test("to-json--from-json", () { | |
| 10517 var o = buildReportFloodlightCriteria(); | |
| 10518 var od = new api.ReportFloodlightCriteria.fromJson(o.toJson()); | |
| 10519 checkReportFloodlightCriteria(od); | |
| 10520 }); | |
| 10521 }); | |
| 10522 | |
| 10523 | |
| 10524 unittest.group("obj-schema-ReportPathToConversionCriteriaReportProperties", ()
{ | |
| 10525 unittest.test("to-json--from-json", () { | |
| 10526 var o = buildReportPathToConversionCriteriaReportProperties(); | |
| 10527 var od = new api.ReportPathToConversionCriteriaReportProperties.fromJson(o
.toJson()); | |
| 10528 checkReportPathToConversionCriteriaReportProperties(od); | |
| 10529 }); | |
| 10530 }); | |
| 10531 | |
| 10532 | |
| 10533 unittest.group("obj-schema-ReportPathToConversionCriteria", () { | |
| 10534 unittest.test("to-json--from-json", () { | |
| 10535 var o = buildReportPathToConversionCriteria(); | |
| 10536 var od = new api.ReportPathToConversionCriteria.fromJson(o.toJson()); | |
| 10537 checkReportPathToConversionCriteria(od); | |
| 10538 }); | |
| 10539 }); | |
| 10540 | |
| 10541 | |
| 10542 unittest.group("obj-schema-ReportReachCriteria", () { | |
| 10543 unittest.test("to-json--from-json", () { | |
| 10544 var o = buildReportReachCriteria(); | |
| 10545 var od = new api.ReportReachCriteria.fromJson(o.toJson()); | |
| 10546 checkReportReachCriteria(od); | |
| 10547 }); | |
| 10548 }); | |
| 10549 | |
| 10550 | |
| 10551 unittest.group("obj-schema-ReportSchedule", () { | |
| 10552 unittest.test("to-json--from-json", () { | |
| 10553 var o = buildReportSchedule(); | |
| 10554 var od = new api.ReportSchedule.fromJson(o.toJson()); | |
| 10555 checkReportSchedule(od); | |
| 10556 }); | |
| 10557 }); | |
| 10558 | |
| 10559 | |
| 10560 unittest.group("obj-schema-Report", () { | |
| 10561 unittest.test("to-json--from-json", () { | |
| 10562 var o = buildReport(); | |
| 10563 var od = new api.Report.fromJson(o.toJson()); | |
| 10564 checkReport(od); | |
| 10565 }); | |
| 10566 }); | |
| 10567 | |
| 10568 | |
| 10569 unittest.group("obj-schema-ReportCompatibleFields", () { | |
| 10570 unittest.test("to-json--from-json", () { | |
| 10571 var o = buildReportCompatibleFields(); | |
| 10572 var od = new api.ReportCompatibleFields.fromJson(o.toJson()); | |
| 10573 checkReportCompatibleFields(od); | |
| 10574 }); | |
| 10575 }); | |
| 10576 | |
| 10577 | |
| 10578 unittest.group("obj-schema-ReportList", () { | |
| 10579 unittest.test("to-json--from-json", () { | |
| 10580 var o = buildReportList(); | |
| 10581 var od = new api.ReportList.fromJson(o.toJson()); | |
| 10582 checkReportList(od); | |
| 10583 }); | |
| 10584 }); | |
| 10585 | |
| 10586 | |
| 10587 unittest.group("obj-schema-ReportsConfiguration", () { | |
| 10588 unittest.test("to-json--from-json", () { | |
| 10589 var o = buildReportsConfiguration(); | |
| 10590 var od = new api.ReportsConfiguration.fromJson(o.toJson()); | |
| 10591 checkReportsConfiguration(od); | |
| 10592 }); | |
| 10593 }); | |
| 10594 | |
| 10595 | |
| 10596 unittest.group("obj-schema-RichMediaExitOverride", () { | |
| 10597 unittest.test("to-json--from-json", () { | |
| 10598 var o = buildRichMediaExitOverride(); | |
| 10599 var od = new api.RichMediaExitOverride.fromJson(o.toJson()); | |
| 10600 checkRichMediaExitOverride(od); | |
| 10601 }); | |
| 10602 }); | |
| 10603 | |
| 10604 | |
| 10605 unittest.group("obj-schema-Site", () { | |
| 10606 unittest.test("to-json--from-json", () { | |
| 10607 var o = buildSite(); | |
| 10608 var od = new api.Site.fromJson(o.toJson()); | |
| 10609 checkSite(od); | |
| 10610 }); | |
| 10611 }); | |
| 10612 | |
| 10613 | |
| 10614 unittest.group("obj-schema-SiteContact", () { | |
| 10615 unittest.test("to-json--from-json", () { | |
| 10616 var o = buildSiteContact(); | |
| 10617 var od = new api.SiteContact.fromJson(o.toJson()); | |
| 10618 checkSiteContact(od); | |
| 10619 }); | |
| 10620 }); | |
| 10621 | |
| 10622 | |
| 10623 unittest.group("obj-schema-SiteSettings", () { | |
| 10624 unittest.test("to-json--from-json", () { | |
| 10625 var o = buildSiteSettings(); | |
| 10626 var od = new api.SiteSettings.fromJson(o.toJson()); | |
| 10627 checkSiteSettings(od); | |
| 10628 }); | |
| 10629 }); | |
| 10630 | |
| 10631 | |
| 10632 unittest.group("obj-schema-SitesListResponse", () { | |
| 10633 unittest.test("to-json--from-json", () { | |
| 10634 var o = buildSitesListResponse(); | |
| 10635 var od = new api.SitesListResponse.fromJson(o.toJson()); | |
| 10636 checkSitesListResponse(od); | |
| 10637 }); | |
| 10638 }); | |
| 10639 | |
| 10640 | |
| 10641 unittest.group("obj-schema-Size", () { | |
| 10642 unittest.test("to-json--from-json", () { | |
| 10643 var o = buildSize(); | |
| 10644 var od = new api.Size.fromJson(o.toJson()); | |
| 10645 checkSize(od); | |
| 10646 }); | |
| 10647 }); | |
| 10648 | |
| 10649 | |
| 10650 unittest.group("obj-schema-SizesListResponse", () { | |
| 10651 unittest.test("to-json--from-json", () { | |
| 10652 var o = buildSizesListResponse(); | |
| 10653 var od = new api.SizesListResponse.fromJson(o.toJson()); | |
| 10654 checkSizesListResponse(od); | |
| 10655 }); | |
| 10656 }); | |
| 10657 | |
| 10658 | |
| 10659 unittest.group("obj-schema-SortedDimension", () { | |
| 10660 unittest.test("to-json--from-json", () { | |
| 10661 var o = buildSortedDimension(); | |
| 10662 var od = new api.SortedDimension.fromJson(o.toJson()); | |
| 10663 checkSortedDimension(od); | |
| 10664 }); | |
| 10665 }); | |
| 10666 | |
| 10667 | |
| 10668 unittest.group("obj-schema-Subaccount", () { | |
| 10669 unittest.test("to-json--from-json", () { | |
| 10670 var o = buildSubaccount(); | |
| 10671 var od = new api.Subaccount.fromJson(o.toJson()); | |
| 10672 checkSubaccount(od); | |
| 10673 }); | |
| 10674 }); | |
| 10675 | |
| 10676 | |
| 10677 unittest.group("obj-schema-SubaccountsListResponse", () { | |
| 10678 unittest.test("to-json--from-json", () { | |
| 10679 var o = buildSubaccountsListResponse(); | |
| 10680 var od = new api.SubaccountsListResponse.fromJson(o.toJson()); | |
| 10681 checkSubaccountsListResponse(od); | |
| 10682 }); | |
| 10683 }); | |
| 10684 | |
| 10685 | |
| 10686 unittest.group("obj-schema-TagData", () { | |
| 10687 unittest.test("to-json--from-json", () { | |
| 10688 var o = buildTagData(); | |
| 10689 var od = new api.TagData.fromJson(o.toJson()); | |
| 10690 checkTagData(od); | |
| 10691 }); | |
| 10692 }); | |
| 10693 | |
| 10694 | |
| 10695 unittest.group("obj-schema-TagSetting", () { | |
| 10696 unittest.test("to-json--from-json", () { | |
| 10697 var o = buildTagSetting(); | |
| 10698 var od = new api.TagSetting.fromJson(o.toJson()); | |
| 10699 checkTagSetting(od); | |
| 10700 }); | |
| 10701 }); | |
| 10702 | |
| 10703 | |
| 10704 unittest.group("obj-schema-TagSettings", () { | |
| 10705 unittest.test("to-json--from-json", () { | |
| 10706 var o = buildTagSettings(); | |
| 10707 var od = new api.TagSettings.fromJson(o.toJson()); | |
| 10708 checkTagSettings(od); | |
| 10709 }); | |
| 10710 }); | |
| 10711 | |
| 10712 | |
| 10713 unittest.group("obj-schema-TargetWindow", () { | |
| 10714 unittest.test("to-json--from-json", () { | |
| 10715 var o = buildTargetWindow(); | |
| 10716 var od = new api.TargetWindow.fromJson(o.toJson()); | |
| 10717 checkTargetWindow(od); | |
| 10718 }); | |
| 10719 }); | |
| 10720 | |
| 10721 | |
| 10722 unittest.group("obj-schema-TargetableRemarketingList", () { | |
| 10723 unittest.test("to-json--from-json", () { | |
| 10724 var o = buildTargetableRemarketingList(); | |
| 10725 var od = new api.TargetableRemarketingList.fromJson(o.toJson()); | |
| 10726 checkTargetableRemarketingList(od); | |
| 10727 }); | |
| 10728 }); | |
| 10729 | |
| 10730 | |
| 10731 unittest.group("obj-schema-TargetableRemarketingListsListResponse", () { | |
| 10732 unittest.test("to-json--from-json", () { | |
| 10733 var o = buildTargetableRemarketingListsListResponse(); | |
| 10734 var od = new api.TargetableRemarketingListsListResponse.fromJson(o.toJson(
)); | |
| 10735 checkTargetableRemarketingListsListResponse(od); | |
| 10736 }); | |
| 10737 }); | |
| 10738 | |
| 10739 | |
| 10740 unittest.group("obj-schema-TechnologyTargeting", () { | |
| 10741 unittest.test("to-json--from-json", () { | |
| 10742 var o = buildTechnologyTargeting(); | |
| 10743 var od = new api.TechnologyTargeting.fromJson(o.toJson()); | |
| 10744 checkTechnologyTargeting(od); | |
| 10745 }); | |
| 10746 }); | |
| 10747 | |
| 10748 | |
| 10749 unittest.group("obj-schema-ThirdPartyAuthenticationToken", () { | |
| 10750 unittest.test("to-json--from-json", () { | |
| 10751 var o = buildThirdPartyAuthenticationToken(); | |
| 10752 var od = new api.ThirdPartyAuthenticationToken.fromJson(o.toJson()); | |
| 10753 checkThirdPartyAuthenticationToken(od); | |
| 10754 }); | |
| 10755 }); | |
| 10756 | |
| 10757 | |
| 10758 unittest.group("obj-schema-ThirdPartyTrackingUrl", () { | |
| 10759 unittest.test("to-json--from-json", () { | |
| 10760 var o = buildThirdPartyTrackingUrl(); | |
| 10761 var od = new api.ThirdPartyTrackingUrl.fromJson(o.toJson()); | |
| 10762 checkThirdPartyTrackingUrl(od); | |
| 10763 }); | |
| 10764 }); | |
| 10765 | |
| 10766 | |
| 10767 unittest.group("obj-schema-UserDefinedVariableConfiguration", () { | |
| 10768 unittest.test("to-json--from-json", () { | |
| 10769 var o = buildUserDefinedVariableConfiguration(); | |
| 10770 var od = new api.UserDefinedVariableConfiguration.fromJson(o.toJson()); | |
| 10771 checkUserDefinedVariableConfiguration(od); | |
| 10772 }); | |
| 10773 }); | |
| 10774 | |
| 10775 | |
| 10776 unittest.group("obj-schema-UserProfile", () { | |
| 10777 unittest.test("to-json--from-json", () { | |
| 10778 var o = buildUserProfile(); | |
| 10779 var od = new api.UserProfile.fromJson(o.toJson()); | |
| 10780 checkUserProfile(od); | |
| 10781 }); | |
| 10782 }); | |
| 10783 | |
| 10784 | |
| 10785 unittest.group("obj-schema-UserProfileList", () { | |
| 10786 unittest.test("to-json--from-json", () { | |
| 10787 var o = buildUserProfileList(); | |
| 10788 var od = new api.UserProfileList.fromJson(o.toJson()); | |
| 10789 checkUserProfileList(od); | |
| 10790 }); | |
| 10791 }); | |
| 10792 | |
| 10793 | |
| 10794 unittest.group("obj-schema-UserRole", () { | |
| 10795 unittest.test("to-json--from-json", () { | |
| 10796 var o = buildUserRole(); | |
| 10797 var od = new api.UserRole.fromJson(o.toJson()); | |
| 10798 checkUserRole(od); | |
| 10799 }); | |
| 10800 }); | |
| 10801 | |
| 10802 | |
| 10803 unittest.group("obj-schema-UserRolePermission", () { | |
| 10804 unittest.test("to-json--from-json", () { | |
| 10805 var o = buildUserRolePermission(); | |
| 10806 var od = new api.UserRolePermission.fromJson(o.toJson()); | |
| 10807 checkUserRolePermission(od); | |
| 10808 }); | |
| 10809 }); | |
| 10810 | |
| 10811 | |
| 10812 unittest.group("obj-schema-UserRolePermissionGroup", () { | |
| 10813 unittest.test("to-json--from-json", () { | |
| 10814 var o = buildUserRolePermissionGroup(); | |
| 10815 var od = new api.UserRolePermissionGroup.fromJson(o.toJson()); | |
| 10816 checkUserRolePermissionGroup(od); | |
| 10817 }); | |
| 10818 }); | |
| 10819 | |
| 10820 | |
| 10821 unittest.group("obj-schema-UserRolePermissionGroupsListResponse", () { | |
| 10822 unittest.test("to-json--from-json", () { | |
| 10823 var o = buildUserRolePermissionGroupsListResponse(); | |
| 10824 var od = new api.UserRolePermissionGroupsListResponse.fromJson(o.toJson())
; | |
| 10825 checkUserRolePermissionGroupsListResponse(od); | |
| 10826 }); | |
| 10827 }); | |
| 10828 | |
| 10829 | |
| 10830 unittest.group("obj-schema-UserRolePermissionsListResponse", () { | |
| 10831 unittest.test("to-json--from-json", () { | |
| 10832 var o = buildUserRolePermissionsListResponse(); | |
| 10833 var od = new api.UserRolePermissionsListResponse.fromJson(o.toJson()); | |
| 10834 checkUserRolePermissionsListResponse(od); | |
| 10835 }); | |
| 10836 }); | |
| 10837 | |
| 10838 | |
| 10839 unittest.group("obj-schema-UserRolesListResponse", () { | |
| 10840 unittest.test("to-json--from-json", () { | |
| 10841 var o = buildUserRolesListResponse(); | |
| 10842 var od = new api.UserRolesListResponse.fromJson(o.toJson()); | |
| 10843 checkUserRolesListResponse(od); | |
| 10844 }); | |
| 10845 }); | |
| 10846 | |
| 10847 | |
| 10848 unittest.group("resource-AccountActiveAdSummariesResourceApi", () { | |
| 10849 unittest.test("method--get", () { | |
| 10850 | |
| 10851 var mock = new HttpServerMock(); | |
| 10852 api.AccountActiveAdSummariesResourceApi res = new api.DfareportingApi(mock
).accountActiveAdSummaries; | |
| 10853 var arg_profileId = "foo"; | |
| 10854 var arg_summaryAccountId = "foo"; | |
| 10855 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10856 var path = (req.url).path; | |
| 10857 var pathOffset = 0; | |
| 10858 var index; | |
| 10859 var subPart; | |
| 10860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10861 pathOffset += 1; | |
| 10862 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 10863 pathOffset += 18; | |
| 10864 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10865 pathOffset += 13; | |
| 10866 index = path.indexOf("/accountActiveAdSummaries/", pathOffset); | |
| 10867 unittest.expect(index >= 0, unittest.isTrue); | |
| 10868 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10869 pathOffset = index; | |
| 10870 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10871 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/accountActiveAdSummaries/")); | |
| 10872 pathOffset += 26; | |
| 10873 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10874 pathOffset = path.length; | |
| 10875 unittest.expect(subPart, unittest.equals("$arg_summaryAccountId")); | |
| 10876 | |
| 10877 var query = (req.url).query; | |
| 10878 var queryOffset = 0; | |
| 10879 var queryMap = {}; | |
| 10880 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10881 parseBool(n) { | |
| 10882 if (n == "true") return true; | |
| 10883 if (n == "false") return false; | |
| 10884 if (n == null) return null; | |
| 10885 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10886 } | |
| 10887 if (query.length > 0) { | |
| 10888 for (var part in query.split("&")) { | |
| 10889 var keyvalue = part.split("="); | |
| 10890 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10891 } | |
| 10892 } | |
| 10893 | |
| 10894 | |
| 10895 var h = { | |
| 10896 "content-type" : "application/json; charset=utf-8", | |
| 10897 }; | |
| 10898 var resp = convert.JSON.encode(buildAccountActiveAdSummary()); | |
| 10899 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10900 }), true); | |
| 10901 res.get(arg_profileId, arg_summaryAccountId).then(unittest.expectAsync(((a
pi.AccountActiveAdSummary response) { | |
| 10902 checkAccountActiveAdSummary(response); | |
| 10903 }))); | |
| 10904 }); | |
| 10905 | |
| 10906 }); | |
| 10907 | |
| 10908 | |
| 10909 unittest.group("resource-AccountPermissionGroupsResourceApi", () { | |
| 10910 unittest.test("method--get", () { | |
| 10911 | |
| 10912 var mock = new HttpServerMock(); | |
| 10913 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10914 var arg_profileId = "foo"; | |
| 10915 var arg_id = "foo"; | |
| 10916 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10917 var path = (req.url).path; | |
| 10918 var pathOffset = 0; | |
| 10919 var index; | |
| 10920 var subPart; | |
| 10921 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10922 pathOffset += 1; | |
| 10923 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 10924 pathOffset += 18; | |
| 10925 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10926 pathOffset += 13; | |
| 10927 index = path.indexOf("/accountPermissionGroups/", pathOffset); | |
| 10928 unittest.expect(index >= 0, unittest.isTrue); | |
| 10929 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10930 pathOffset = index; | |
| 10931 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10932 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/accountPermissionGroups/")); | |
| 10933 pathOffset += 25; | |
| 10934 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10935 pathOffset = path.length; | |
| 10936 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 10937 | |
| 10938 var query = (req.url).query; | |
| 10939 var queryOffset = 0; | |
| 10940 var queryMap = {}; | |
| 10941 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10942 parseBool(n) { | |
| 10943 if (n == "true") return true; | |
| 10944 if (n == "false") return false; | |
| 10945 if (n == null) return null; | |
| 10946 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10947 } | |
| 10948 if (query.length > 0) { | |
| 10949 for (var part in query.split("&")) { | |
| 10950 var keyvalue = part.split("="); | |
| 10951 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10952 } | |
| 10953 } | |
| 10954 | |
| 10955 | |
| 10956 var h = { | |
| 10957 "content-type" : "application/json; charset=utf-8", | |
| 10958 }; | |
| 10959 var resp = convert.JSON.encode(buildAccountPermissionGroup()); | |
| 10960 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10961 }), true); | |
| 10962 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
issionGroup response) { | |
| 10963 checkAccountPermissionGroup(response); | |
| 10964 }))); | |
| 10965 }); | |
| 10966 | |
| 10967 unittest.test("method--list", () { | |
| 10968 | |
| 10969 var mock = new HttpServerMock(); | |
| 10970 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10971 var arg_profileId = "foo"; | |
| 10972 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10973 var path = (req.url).path; | |
| 10974 var pathOffset = 0; | |
| 10975 var index; | |
| 10976 var subPart; | |
| 10977 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10978 pathOffset += 1; | |
| 10979 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 10980 pathOffset += 18; | |
| 10981 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10982 pathOffset += 13; | |
| 10983 index = path.indexOf("/accountPermissionGroups", pathOffset); | |
| 10984 unittest.expect(index >= 0, unittest.isTrue); | |
| 10985 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10986 pathOffset = index; | |
| 10987 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10988 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/accountPermissionGroups")); | |
| 10989 pathOffset += 24; | |
| 10990 | |
| 10991 var query = (req.url).query; | |
| 10992 var queryOffset = 0; | |
| 10993 var queryMap = {}; | |
| 10994 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10995 parseBool(n) { | |
| 10996 if (n == "true") return true; | |
| 10997 if (n == "false") return false; | |
| 10998 if (n == null) return null; | |
| 10999 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11000 } | |
| 11001 if (query.length > 0) { | |
| 11002 for (var part in query.split("&")) { | |
| 11003 var keyvalue = part.split("="); | |
| 11004 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11005 } | |
| 11006 } | |
| 11007 | |
| 11008 | |
| 11009 var h = { | |
| 11010 "content-type" : "application/json; charset=utf-8", | |
| 11011 }; | |
| 11012 var resp = convert.JSON.encode(buildAccountPermissionGroupsListResponse(
)); | |
| 11013 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11014 }), true); | |
| 11015 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissionG
roupsListResponse response) { | |
| 11016 checkAccountPermissionGroupsListResponse(response); | |
| 11017 }))); | |
| 11018 }); | |
| 11019 | |
| 11020 }); | |
| 11021 | |
| 11022 | |
| 11023 unittest.group("resource-AccountPermissionsResourceApi", () { | |
| 11024 unittest.test("method--get", () { | |
| 11025 | |
| 11026 var mock = new HttpServerMock(); | |
| 11027 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11028 var arg_profileId = "foo"; | |
| 11029 var arg_id = "foo"; | |
| 11030 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11031 var path = (req.url).path; | |
| 11032 var pathOffset = 0; | |
| 11033 var index; | |
| 11034 var subPart; | |
| 11035 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11036 pathOffset += 1; | |
| 11037 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11038 pathOffset += 18; | |
| 11039 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11040 pathOffset += 13; | |
| 11041 index = path.indexOf("/accountPermissions/", pathOffset); | |
| 11042 unittest.expect(index >= 0, unittest.isTrue); | |
| 11043 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11044 pathOffset = index; | |
| 11045 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11046 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountPermissions/")); | |
| 11047 pathOffset += 20; | |
| 11048 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11049 pathOffset = path.length; | |
| 11050 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11051 | |
| 11052 var query = (req.url).query; | |
| 11053 var queryOffset = 0; | |
| 11054 var queryMap = {}; | |
| 11055 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11056 parseBool(n) { | |
| 11057 if (n == "true") return true; | |
| 11058 if (n == "false") return false; | |
| 11059 if (n == null) return null; | |
| 11060 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11061 } | |
| 11062 if (query.length > 0) { | |
| 11063 for (var part in query.split("&")) { | |
| 11064 var keyvalue = part.split("="); | |
| 11065 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11066 } | |
| 11067 } | |
| 11068 | |
| 11069 | |
| 11070 var h = { | |
| 11071 "content-type" : "application/json; charset=utf-8", | |
| 11072 }; | |
| 11073 var resp = convert.JSON.encode(buildAccountPermission()); | |
| 11074 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11075 }), true); | |
| 11076 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
ission response) { | |
| 11077 checkAccountPermission(response); | |
| 11078 }))); | |
| 11079 }); | |
| 11080 | |
| 11081 unittest.test("method--list", () { | |
| 11082 | |
| 11083 var mock = new HttpServerMock(); | |
| 11084 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11085 var arg_profileId = "foo"; | |
| 11086 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11087 var path = (req.url).path; | |
| 11088 var pathOffset = 0; | |
| 11089 var index; | |
| 11090 var subPart; | |
| 11091 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11092 pathOffset += 1; | |
| 11093 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11094 pathOffset += 18; | |
| 11095 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11096 pathOffset += 13; | |
| 11097 index = path.indexOf("/accountPermissions", pathOffset); | |
| 11098 unittest.expect(index >= 0, unittest.isTrue); | |
| 11099 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11100 pathOffset = index; | |
| 11101 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11102 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/accountPermissions")); | |
| 11103 pathOffset += 19; | |
| 11104 | |
| 11105 var query = (req.url).query; | |
| 11106 var queryOffset = 0; | |
| 11107 var queryMap = {}; | |
| 11108 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11109 parseBool(n) { | |
| 11110 if (n == "true") return true; | |
| 11111 if (n == "false") return false; | |
| 11112 if (n == null) return null; | |
| 11113 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11114 } | |
| 11115 if (query.length > 0) { | |
| 11116 for (var part in query.split("&")) { | |
| 11117 var keyvalue = part.split("="); | |
| 11118 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11119 } | |
| 11120 } | |
| 11121 | |
| 11122 | |
| 11123 var h = { | |
| 11124 "content-type" : "application/json; charset=utf-8", | |
| 11125 }; | |
| 11126 var resp = convert.JSON.encode(buildAccountPermissionsListResponse()); | |
| 11127 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11128 }), true); | |
| 11129 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissions
ListResponse response) { | |
| 11130 checkAccountPermissionsListResponse(response); | |
| 11131 }))); | |
| 11132 }); | |
| 11133 | |
| 11134 }); | |
| 11135 | |
| 11136 | |
| 11137 unittest.group("resource-AccountUserProfilesResourceApi", () { | |
| 11138 unittest.test("method--get", () { | |
| 11139 | |
| 11140 var mock = new HttpServerMock(); | |
| 11141 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11142 var arg_profileId = "foo"; | |
| 11143 var arg_id = "foo"; | |
| 11144 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11145 var path = (req.url).path; | |
| 11146 var pathOffset = 0; | |
| 11147 var index; | |
| 11148 var subPart; | |
| 11149 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11150 pathOffset += 1; | |
| 11151 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11152 pathOffset += 18; | |
| 11153 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11154 pathOffset += 13; | |
| 11155 index = path.indexOf("/accountUserProfiles/", pathOffset); | |
| 11156 unittest.expect(index >= 0, unittest.isTrue); | |
| 11157 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11158 pathOffset = index; | |
| 11159 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11160 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/accountUserProfiles/")); | |
| 11161 pathOffset += 21; | |
| 11162 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11163 pathOffset = path.length; | |
| 11164 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11165 | |
| 11166 var query = (req.url).query; | |
| 11167 var queryOffset = 0; | |
| 11168 var queryMap = {}; | |
| 11169 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11170 parseBool(n) { | |
| 11171 if (n == "true") return true; | |
| 11172 if (n == "false") return false; | |
| 11173 if (n == null) return null; | |
| 11174 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11175 } | |
| 11176 if (query.length > 0) { | |
| 11177 for (var part in query.split("&")) { | |
| 11178 var keyvalue = part.split("="); | |
| 11179 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11180 } | |
| 11181 } | |
| 11182 | |
| 11183 | |
| 11184 var h = { | |
| 11185 "content-type" : "application/json; charset=utf-8", | |
| 11186 }; | |
| 11187 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11188 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11189 }), true); | |
| 11190 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountUser
Profile response) { | |
| 11191 checkAccountUserProfile(response); | |
| 11192 }))); | |
| 11193 }); | |
| 11194 | |
| 11195 unittest.test("method--insert", () { | |
| 11196 | |
| 11197 var mock = new HttpServerMock(); | |
| 11198 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11199 var arg_request = buildAccountUserProfile(); | |
| 11200 var arg_profileId = "foo"; | |
| 11201 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11202 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11203 checkAccountUserProfile(obj); | |
| 11204 | |
| 11205 var path = (req.url).path; | |
| 11206 var pathOffset = 0; | |
| 11207 var index; | |
| 11208 var subPart; | |
| 11209 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11210 pathOffset += 1; | |
| 11211 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11212 pathOffset += 18; | |
| 11213 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11214 pathOffset += 13; | |
| 11215 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11216 unittest.expect(index >= 0, unittest.isTrue); | |
| 11217 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11218 pathOffset = index; | |
| 11219 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11220 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11221 pathOffset += 20; | |
| 11222 | |
| 11223 var query = (req.url).query; | |
| 11224 var queryOffset = 0; | |
| 11225 var queryMap = {}; | |
| 11226 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11227 parseBool(n) { | |
| 11228 if (n == "true") return true; | |
| 11229 if (n == "false") return false; | |
| 11230 if (n == null) return null; | |
| 11231 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11232 } | |
| 11233 if (query.length > 0) { | |
| 11234 for (var part in query.split("&")) { | |
| 11235 var keyvalue = part.split("="); | |
| 11236 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11237 } | |
| 11238 } | |
| 11239 | |
| 11240 | |
| 11241 var h = { | |
| 11242 "content-type" : "application/json; charset=utf-8", | |
| 11243 }; | |
| 11244 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11245 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11246 }), true); | |
| 11247 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11248 checkAccountUserProfile(response); | |
| 11249 }))); | |
| 11250 }); | |
| 11251 | |
| 11252 unittest.test("method--list", () { | |
| 11253 | |
| 11254 var mock = new HttpServerMock(); | |
| 11255 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11256 var arg_profileId = "foo"; | |
| 11257 var arg_active = true; | |
| 11258 var arg_ids = buildUnnamed3218(); | |
| 11259 var arg_maxResults = 42; | |
| 11260 var arg_pageToken = "foo"; | |
| 11261 var arg_searchString = "foo"; | |
| 11262 var arg_sortField = "foo"; | |
| 11263 var arg_sortOrder = "foo"; | |
| 11264 var arg_subaccountId = "foo"; | |
| 11265 var arg_userRoleId = "foo"; | |
| 11266 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11267 var path = (req.url).path; | |
| 11268 var pathOffset = 0; | |
| 11269 var index; | |
| 11270 var subPart; | |
| 11271 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11272 pathOffset += 1; | |
| 11273 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11274 pathOffset += 18; | |
| 11275 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11276 pathOffset += 13; | |
| 11277 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11278 unittest.expect(index >= 0, unittest.isTrue); | |
| 11279 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11280 pathOffset = index; | |
| 11281 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11282 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11283 pathOffset += 20; | |
| 11284 | |
| 11285 var query = (req.url).query; | |
| 11286 var queryOffset = 0; | |
| 11287 var queryMap = {}; | |
| 11288 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11289 parseBool(n) { | |
| 11290 if (n == "true") return true; | |
| 11291 if (n == "false") return false; | |
| 11292 if (n == null) return null; | |
| 11293 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11294 } | |
| 11295 if (query.length > 0) { | |
| 11296 for (var part in query.split("&")) { | |
| 11297 var keyvalue = part.split("="); | |
| 11298 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11299 } | |
| 11300 } | |
| 11301 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11302 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11303 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11304 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11305 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11306 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11307 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11308 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 11309 unittest.expect(queryMap["userRoleId"].first, unittest.equals(arg_userRo
leId)); | |
| 11310 | |
| 11311 | |
| 11312 var h = { | |
| 11313 "content-type" : "application/json; charset=utf-8", | |
| 11314 }; | |
| 11315 var resp = convert.JSON.encode(buildAccountUserProfilesListResponse()); | |
| 11316 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11317 }), true); | |
| 11318 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) { | |
| 11319 checkAccountUserProfilesListResponse(response); | |
| 11320 }))); | |
| 11321 }); | |
| 11322 | |
| 11323 unittest.test("method--patch", () { | |
| 11324 | |
| 11325 var mock = new HttpServerMock(); | |
| 11326 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11327 var arg_request = buildAccountUserProfile(); | |
| 11328 var arg_profileId = "foo"; | |
| 11329 var arg_id = "foo"; | |
| 11330 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11331 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11332 checkAccountUserProfile(obj); | |
| 11333 | |
| 11334 var path = (req.url).path; | |
| 11335 var pathOffset = 0; | |
| 11336 var index; | |
| 11337 var subPart; | |
| 11338 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11339 pathOffset += 1; | |
| 11340 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11341 pathOffset += 18; | |
| 11342 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11343 pathOffset += 13; | |
| 11344 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11345 unittest.expect(index >= 0, unittest.isTrue); | |
| 11346 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11347 pathOffset = index; | |
| 11348 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11349 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11350 pathOffset += 20; | |
| 11351 | |
| 11352 var query = (req.url).query; | |
| 11353 var queryOffset = 0; | |
| 11354 var queryMap = {}; | |
| 11355 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11356 parseBool(n) { | |
| 11357 if (n == "true") return true; | |
| 11358 if (n == "false") return false; | |
| 11359 if (n == null) return null; | |
| 11360 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11361 } | |
| 11362 if (query.length > 0) { | |
| 11363 for (var part in query.split("&")) { | |
| 11364 var keyvalue = part.split("="); | |
| 11365 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11366 } | |
| 11367 } | |
| 11368 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11369 | |
| 11370 | |
| 11371 var h = { | |
| 11372 "content-type" : "application/json; charset=utf-8", | |
| 11373 }; | |
| 11374 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11375 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11376 }), true); | |
| 11377 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AccountUserProfile response) { | |
| 11378 checkAccountUserProfile(response); | |
| 11379 }))); | |
| 11380 }); | |
| 11381 | |
| 11382 unittest.test("method--update", () { | |
| 11383 | |
| 11384 var mock = new HttpServerMock(); | |
| 11385 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11386 var arg_request = buildAccountUserProfile(); | |
| 11387 var arg_profileId = "foo"; | |
| 11388 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11389 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11390 checkAccountUserProfile(obj); | |
| 11391 | |
| 11392 var path = (req.url).path; | |
| 11393 var pathOffset = 0; | |
| 11394 var index; | |
| 11395 var subPart; | |
| 11396 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11397 pathOffset += 1; | |
| 11398 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11399 pathOffset += 18; | |
| 11400 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11401 pathOffset += 13; | |
| 11402 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11403 unittest.expect(index >= 0, unittest.isTrue); | |
| 11404 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11405 pathOffset = index; | |
| 11406 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11407 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11408 pathOffset += 20; | |
| 11409 | |
| 11410 var query = (req.url).query; | |
| 11411 var queryOffset = 0; | |
| 11412 var queryMap = {}; | |
| 11413 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11414 parseBool(n) { | |
| 11415 if (n == "true") return true; | |
| 11416 if (n == "false") return false; | |
| 11417 if (n == null) return null; | |
| 11418 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11419 } | |
| 11420 if (query.length > 0) { | |
| 11421 for (var part in query.split("&")) { | |
| 11422 var keyvalue = part.split("="); | |
| 11423 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11424 } | |
| 11425 } | |
| 11426 | |
| 11427 | |
| 11428 var h = { | |
| 11429 "content-type" : "application/json; charset=utf-8", | |
| 11430 }; | |
| 11431 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11432 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11433 }), true); | |
| 11434 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11435 checkAccountUserProfile(response); | |
| 11436 }))); | |
| 11437 }); | |
| 11438 | |
| 11439 }); | |
| 11440 | |
| 11441 | |
| 11442 unittest.group("resource-AccountsResourceApi", () { | |
| 11443 unittest.test("method--get", () { | |
| 11444 | |
| 11445 var mock = new HttpServerMock(); | |
| 11446 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11447 var arg_profileId = "foo"; | |
| 11448 var arg_id = "foo"; | |
| 11449 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11450 var path = (req.url).path; | |
| 11451 var pathOffset = 0; | |
| 11452 var index; | |
| 11453 var subPart; | |
| 11454 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11455 pathOffset += 1; | |
| 11456 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11457 pathOffset += 18; | |
| 11458 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11459 pathOffset += 13; | |
| 11460 index = path.indexOf("/accounts/", pathOffset); | |
| 11461 unittest.expect(index >= 0, unittest.isTrue); | |
| 11462 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11463 pathOffset = index; | |
| 11464 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11465 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/accounts/")); | |
| 11466 pathOffset += 10; | |
| 11467 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11468 pathOffset = path.length; | |
| 11469 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11470 | |
| 11471 var query = (req.url).query; | |
| 11472 var queryOffset = 0; | |
| 11473 var queryMap = {}; | |
| 11474 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11475 parseBool(n) { | |
| 11476 if (n == "true") return true; | |
| 11477 if (n == "false") return false; | |
| 11478 if (n == null) return null; | |
| 11479 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11480 } | |
| 11481 if (query.length > 0) { | |
| 11482 for (var part in query.split("&")) { | |
| 11483 var keyvalue = part.split("="); | |
| 11484 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11485 } | |
| 11486 } | |
| 11487 | |
| 11488 | |
| 11489 var h = { | |
| 11490 "content-type" : "application/json; charset=utf-8", | |
| 11491 }; | |
| 11492 var resp = convert.JSON.encode(buildAccount()); | |
| 11493 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11494 }), true); | |
| 11495 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Account res
ponse) { | |
| 11496 checkAccount(response); | |
| 11497 }))); | |
| 11498 }); | |
| 11499 | |
| 11500 unittest.test("method--list", () { | |
| 11501 | |
| 11502 var mock = new HttpServerMock(); | |
| 11503 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11504 var arg_profileId = "foo"; | |
| 11505 var arg_active = true; | |
| 11506 var arg_ids = buildUnnamed3219(); | |
| 11507 var arg_maxResults = 42; | |
| 11508 var arg_pageToken = "foo"; | |
| 11509 var arg_searchString = "foo"; | |
| 11510 var arg_sortField = "foo"; | |
| 11511 var arg_sortOrder = "foo"; | |
| 11512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11513 var path = (req.url).path; | |
| 11514 var pathOffset = 0; | |
| 11515 var index; | |
| 11516 var subPart; | |
| 11517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11518 pathOffset += 1; | |
| 11519 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11520 pathOffset += 18; | |
| 11521 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11522 pathOffset += 13; | |
| 11523 index = path.indexOf("/accounts", pathOffset); | |
| 11524 unittest.expect(index >= 0, unittest.isTrue); | |
| 11525 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11526 pathOffset = index; | |
| 11527 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11528 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11529 pathOffset += 9; | |
| 11530 | |
| 11531 var query = (req.url).query; | |
| 11532 var queryOffset = 0; | |
| 11533 var queryMap = {}; | |
| 11534 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11535 parseBool(n) { | |
| 11536 if (n == "true") return true; | |
| 11537 if (n == "false") return false; | |
| 11538 if (n == null) return null; | |
| 11539 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11540 } | |
| 11541 if (query.length > 0) { | |
| 11542 for (var part in query.split("&")) { | |
| 11543 var keyvalue = part.split("="); | |
| 11544 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11545 } | |
| 11546 } | |
| 11547 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11548 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11549 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11550 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11551 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11552 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11553 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11554 | |
| 11555 | |
| 11556 var h = { | |
| 11557 "content-type" : "application/json; charset=utf-8", | |
| 11558 }; | |
| 11559 var resp = convert.JSON.encode(buildAccountsListResponse()); | |
| 11560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11561 }), true); | |
| 11562 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) { | |
| 11563 checkAccountsListResponse(response); | |
| 11564 }))); | |
| 11565 }); | |
| 11566 | |
| 11567 unittest.test("method--patch", () { | |
| 11568 | |
| 11569 var mock = new HttpServerMock(); | |
| 11570 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11571 var arg_request = buildAccount(); | |
| 11572 var arg_profileId = "foo"; | |
| 11573 var arg_id = "foo"; | |
| 11574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11575 var obj = new api.Account.fromJson(json); | |
| 11576 checkAccount(obj); | |
| 11577 | |
| 11578 var path = (req.url).path; | |
| 11579 var pathOffset = 0; | |
| 11580 var index; | |
| 11581 var subPart; | |
| 11582 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11583 pathOffset += 1; | |
| 11584 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11585 pathOffset += 18; | |
| 11586 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11587 pathOffset += 13; | |
| 11588 index = path.indexOf("/accounts", pathOffset); | |
| 11589 unittest.expect(index >= 0, unittest.isTrue); | |
| 11590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11591 pathOffset = index; | |
| 11592 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11593 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11594 pathOffset += 9; | |
| 11595 | |
| 11596 var query = (req.url).query; | |
| 11597 var queryOffset = 0; | |
| 11598 var queryMap = {}; | |
| 11599 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11600 parseBool(n) { | |
| 11601 if (n == "true") return true; | |
| 11602 if (n == "false") return false; | |
| 11603 if (n == null) return null; | |
| 11604 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11605 } | |
| 11606 if (query.length > 0) { | |
| 11607 for (var part in query.split("&")) { | |
| 11608 var keyvalue = part.split("="); | |
| 11609 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11610 } | |
| 11611 } | |
| 11612 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11613 | |
| 11614 | |
| 11615 var h = { | |
| 11616 "content-type" : "application/json; charset=utf-8", | |
| 11617 }; | |
| 11618 var resp = convert.JSON.encode(buildAccount()); | |
| 11619 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11620 }), true); | |
| 11621 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Account response) { | |
| 11622 checkAccount(response); | |
| 11623 }))); | |
| 11624 }); | |
| 11625 | |
| 11626 unittest.test("method--update", () { | |
| 11627 | |
| 11628 var mock = new HttpServerMock(); | |
| 11629 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11630 var arg_request = buildAccount(); | |
| 11631 var arg_profileId = "foo"; | |
| 11632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11633 var obj = new api.Account.fromJson(json); | |
| 11634 checkAccount(obj); | |
| 11635 | |
| 11636 var path = (req.url).path; | |
| 11637 var pathOffset = 0; | |
| 11638 var index; | |
| 11639 var subPart; | |
| 11640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11641 pathOffset += 1; | |
| 11642 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11643 pathOffset += 18; | |
| 11644 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11645 pathOffset += 13; | |
| 11646 index = path.indexOf("/accounts", pathOffset); | |
| 11647 unittest.expect(index >= 0, unittest.isTrue); | |
| 11648 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11649 pathOffset = index; | |
| 11650 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11651 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11652 pathOffset += 9; | |
| 11653 | |
| 11654 var query = (req.url).query; | |
| 11655 var queryOffset = 0; | |
| 11656 var queryMap = {}; | |
| 11657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11658 parseBool(n) { | |
| 11659 if (n == "true") return true; | |
| 11660 if (n == "false") return false; | |
| 11661 if (n == null) return null; | |
| 11662 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11663 } | |
| 11664 if (query.length > 0) { | |
| 11665 for (var part in query.split("&")) { | |
| 11666 var keyvalue = part.split("="); | |
| 11667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11668 } | |
| 11669 } | |
| 11670 | |
| 11671 | |
| 11672 var h = { | |
| 11673 "content-type" : "application/json; charset=utf-8", | |
| 11674 }; | |
| 11675 var resp = convert.JSON.encode(buildAccount()); | |
| 11676 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11677 }), true); | |
| 11678 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ount response) { | |
| 11679 checkAccount(response); | |
| 11680 }))); | |
| 11681 }); | |
| 11682 | |
| 11683 }); | |
| 11684 | |
| 11685 | |
| 11686 unittest.group("resource-AdsResourceApi", () { | |
| 11687 unittest.test("method--get", () { | |
| 11688 | |
| 11689 var mock = new HttpServerMock(); | |
| 11690 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11691 var arg_profileId = "foo"; | |
| 11692 var arg_id = "foo"; | |
| 11693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11694 var path = (req.url).path; | |
| 11695 var pathOffset = 0; | |
| 11696 var index; | |
| 11697 var subPart; | |
| 11698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11699 pathOffset += 1; | |
| 11700 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11701 pathOffset += 18; | |
| 11702 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11703 pathOffset += 13; | |
| 11704 index = path.indexOf("/ads/", pathOffset); | |
| 11705 unittest.expect(index >= 0, unittest.isTrue); | |
| 11706 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11707 pathOffset = index; | |
| 11708 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11709 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/ads/")); | |
| 11710 pathOffset += 5; | |
| 11711 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11712 pathOffset = path.length; | |
| 11713 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11714 | |
| 11715 var query = (req.url).query; | |
| 11716 var queryOffset = 0; | |
| 11717 var queryMap = {}; | |
| 11718 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11719 parseBool(n) { | |
| 11720 if (n == "true") return true; | |
| 11721 if (n == "false") return false; | |
| 11722 if (n == null) return null; | |
| 11723 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11724 } | |
| 11725 if (query.length > 0) { | |
| 11726 for (var part in query.split("&")) { | |
| 11727 var keyvalue = part.split("="); | |
| 11728 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11729 } | |
| 11730 } | |
| 11731 | |
| 11732 | |
| 11733 var h = { | |
| 11734 "content-type" : "application/json; charset=utf-8", | |
| 11735 }; | |
| 11736 var resp = convert.JSON.encode(buildAd()); | |
| 11737 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11738 }), true); | |
| 11739 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Ad response
) { | |
| 11740 checkAd(response); | |
| 11741 }))); | |
| 11742 }); | |
| 11743 | |
| 11744 unittest.test("method--insert", () { | |
| 11745 | |
| 11746 var mock = new HttpServerMock(); | |
| 11747 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11748 var arg_request = buildAd(); | |
| 11749 var arg_profileId = "foo"; | |
| 11750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11751 var obj = new api.Ad.fromJson(json); | |
| 11752 checkAd(obj); | |
| 11753 | |
| 11754 var path = (req.url).path; | |
| 11755 var pathOffset = 0; | |
| 11756 var index; | |
| 11757 var subPart; | |
| 11758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11759 pathOffset += 1; | |
| 11760 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11761 pathOffset += 18; | |
| 11762 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11763 pathOffset += 13; | |
| 11764 index = path.indexOf("/ads", pathOffset); | |
| 11765 unittest.expect(index >= 0, unittest.isTrue); | |
| 11766 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11767 pathOffset = index; | |
| 11768 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11769 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11770 pathOffset += 4; | |
| 11771 | |
| 11772 var query = (req.url).query; | |
| 11773 var queryOffset = 0; | |
| 11774 var queryMap = {}; | |
| 11775 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11776 parseBool(n) { | |
| 11777 if (n == "true") return true; | |
| 11778 if (n == "false") return false; | |
| 11779 if (n == null) return null; | |
| 11780 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11781 } | |
| 11782 if (query.length > 0) { | |
| 11783 for (var part in query.split("&")) { | |
| 11784 var keyvalue = part.split("="); | |
| 11785 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11786 } | |
| 11787 } | |
| 11788 | |
| 11789 | |
| 11790 var h = { | |
| 11791 "content-type" : "application/json; charset=utf-8", | |
| 11792 }; | |
| 11793 var resp = convert.JSON.encode(buildAd()); | |
| 11794 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11795 }), true); | |
| 11796 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 11797 checkAd(response); | |
| 11798 }))); | |
| 11799 }); | |
| 11800 | |
| 11801 unittest.test("method--list", () { | |
| 11802 | |
| 11803 var mock = new HttpServerMock(); | |
| 11804 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11805 var arg_profileId = "foo"; | |
| 11806 var arg_active = true; | |
| 11807 var arg_advertiserId = "foo"; | |
| 11808 var arg_archived = true; | |
| 11809 var arg_audienceSegmentIds = buildUnnamed3220(); | |
| 11810 var arg_campaignIds = buildUnnamed3221(); | |
| 11811 var arg_compatibility = "foo"; | |
| 11812 var arg_creativeIds = buildUnnamed3222(); | |
| 11813 var arg_creativeOptimizationConfigurationIds = buildUnnamed3223(); | |
| 11814 var arg_creativeType = "foo"; | |
| 11815 var arg_dynamicClickTracker = true; | |
| 11816 var arg_ids = buildUnnamed3224(); | |
| 11817 var arg_landingPageIds = buildUnnamed3225(); | |
| 11818 var arg_maxResults = 42; | |
| 11819 var arg_overriddenEventTagId = "foo"; | |
| 11820 var arg_pageToken = "foo"; | |
| 11821 var arg_placementIds = buildUnnamed3226(); | |
| 11822 var arg_remarketingListIds = buildUnnamed3227(); | |
| 11823 var arg_searchString = "foo"; | |
| 11824 var arg_sizeIds = buildUnnamed3228(); | |
| 11825 var arg_sortField = "foo"; | |
| 11826 var arg_sortOrder = "foo"; | |
| 11827 var arg_sslCompliant = true; | |
| 11828 var arg_sslRequired = true; | |
| 11829 var arg_type = buildUnnamed3229(); | |
| 11830 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11831 var path = (req.url).path; | |
| 11832 var pathOffset = 0; | |
| 11833 var index; | |
| 11834 var subPart; | |
| 11835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11836 pathOffset += 1; | |
| 11837 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11838 pathOffset += 18; | |
| 11839 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11840 pathOffset += 13; | |
| 11841 index = path.indexOf("/ads", pathOffset); | |
| 11842 unittest.expect(index >= 0, unittest.isTrue); | |
| 11843 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11844 pathOffset = index; | |
| 11845 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11846 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11847 pathOffset += 4; | |
| 11848 | |
| 11849 var query = (req.url).query; | |
| 11850 var queryOffset = 0; | |
| 11851 var queryMap = {}; | |
| 11852 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11853 parseBool(n) { | |
| 11854 if (n == "true") return true; | |
| 11855 if (n == "false") return false; | |
| 11856 if (n == null) return null; | |
| 11857 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11858 } | |
| 11859 if (query.length > 0) { | |
| 11860 for (var part in query.split("&")) { | |
| 11861 var keyvalue = part.split("="); | |
| 11862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11863 } | |
| 11864 } | |
| 11865 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11866 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 11867 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 11868 unittest.expect(queryMap["audienceSegmentIds"], unittest.equals(arg_audi
enceSegmentIds)); | |
| 11869 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 11870 unittest.expect(queryMap["compatibility"].first, unittest.equals(arg_com
patibility)); | |
| 11871 unittest.expect(queryMap["creativeIds"], unittest.equals(arg_creativeIds
)); | |
| 11872 unittest.expect(queryMap["creativeOptimizationConfigurationIds"], unitte
st.equals(arg_creativeOptimizationConfigurationIds)); | |
| 11873 unittest.expect(queryMap["creativeType"].first, unittest.equals(arg_crea
tiveType)); | |
| 11874 unittest.expect(queryMap["dynamicClickTracker"].first, unittest.equals("
$arg_dynamicClickTracker")); | |
| 11875 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11876 unittest.expect(queryMap["landingPageIds"], unittest.equals(arg_landingP
ageIds)); | |
| 11877 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11878 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 11879 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11880 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 11881 unittest.expect(queryMap["remarketingListIds"], unittest.equals(arg_rema
rketingListIds)); | |
| 11882 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11883 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 11884 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11885 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11886 unittest.expect(queryMap["sslCompliant"].first, unittest.equals("$arg_ss
lCompliant")); | |
| 11887 unittest.expect(queryMap["sslRequired"].first, unittest.equals("$arg_ssl
Required")); | |
| 11888 unittest.expect(queryMap["type"], unittest.equals(arg_type)); | |
| 11889 | |
| 11890 | |
| 11891 var h = { | |
| 11892 "content-type" : "application/json; charset=utf-8", | |
| 11893 }; | |
| 11894 var resp = convert.JSON.encode(buildAdsListResponse()); | |
| 11895 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11896 }), true); | |
| 11897 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) { | |
| 11898 checkAdsListResponse(response); | |
| 11899 }))); | |
| 11900 }); | |
| 11901 | |
| 11902 unittest.test("method--patch", () { | |
| 11903 | |
| 11904 var mock = new HttpServerMock(); | |
| 11905 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11906 var arg_request = buildAd(); | |
| 11907 var arg_profileId = "foo"; | |
| 11908 var arg_id = "foo"; | |
| 11909 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11910 var obj = new api.Ad.fromJson(json); | |
| 11911 checkAd(obj); | |
| 11912 | |
| 11913 var path = (req.url).path; | |
| 11914 var pathOffset = 0; | |
| 11915 var index; | |
| 11916 var subPart; | |
| 11917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11918 pathOffset += 1; | |
| 11919 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11920 pathOffset += 18; | |
| 11921 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11922 pathOffset += 13; | |
| 11923 index = path.indexOf("/ads", pathOffset); | |
| 11924 unittest.expect(index >= 0, unittest.isTrue); | |
| 11925 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11926 pathOffset = index; | |
| 11927 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11928 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11929 pathOffset += 4; | |
| 11930 | |
| 11931 var query = (req.url).query; | |
| 11932 var queryOffset = 0; | |
| 11933 var queryMap = {}; | |
| 11934 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11935 parseBool(n) { | |
| 11936 if (n == "true") return true; | |
| 11937 if (n == "false") return false; | |
| 11938 if (n == null) return null; | |
| 11939 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11940 } | |
| 11941 if (query.length > 0) { | |
| 11942 for (var part in query.split("&")) { | |
| 11943 var keyvalue = part.split("="); | |
| 11944 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11945 } | |
| 11946 } | |
| 11947 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11948 | |
| 11949 | |
| 11950 var h = { | |
| 11951 "content-type" : "application/json; charset=utf-8", | |
| 11952 }; | |
| 11953 var resp = convert.JSON.encode(buildAd()); | |
| 11954 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11955 }), true); | |
| 11956 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Ad response) { | |
| 11957 checkAd(response); | |
| 11958 }))); | |
| 11959 }); | |
| 11960 | |
| 11961 unittest.test("method--update", () { | |
| 11962 | |
| 11963 var mock = new HttpServerMock(); | |
| 11964 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11965 var arg_request = buildAd(); | |
| 11966 var arg_profileId = "foo"; | |
| 11967 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11968 var obj = new api.Ad.fromJson(json); | |
| 11969 checkAd(obj); | |
| 11970 | |
| 11971 var path = (req.url).path; | |
| 11972 var pathOffset = 0; | |
| 11973 var index; | |
| 11974 var subPart; | |
| 11975 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11976 pathOffset += 1; | |
| 11977 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 11978 pathOffset += 18; | |
| 11979 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11980 pathOffset += 13; | |
| 11981 index = path.indexOf("/ads", pathOffset); | |
| 11982 unittest.expect(index >= 0, unittest.isTrue); | |
| 11983 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11984 pathOffset = index; | |
| 11985 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11986 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11987 pathOffset += 4; | |
| 11988 | |
| 11989 var query = (req.url).query; | |
| 11990 var queryOffset = 0; | |
| 11991 var queryMap = {}; | |
| 11992 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11993 parseBool(n) { | |
| 11994 if (n == "true") return true; | |
| 11995 if (n == "false") return false; | |
| 11996 if (n == null) return null; | |
| 11997 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11998 } | |
| 11999 if (query.length > 0) { | |
| 12000 for (var part in query.split("&")) { | |
| 12001 var keyvalue = part.split("="); | |
| 12002 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12003 } | |
| 12004 } | |
| 12005 | |
| 12006 | |
| 12007 var h = { | |
| 12008 "content-type" : "application/json; charset=utf-8", | |
| 12009 }; | |
| 12010 var resp = convert.JSON.encode(buildAd()); | |
| 12011 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12012 }), true); | |
| 12013 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 12014 checkAd(response); | |
| 12015 }))); | |
| 12016 }); | |
| 12017 | |
| 12018 }); | |
| 12019 | |
| 12020 | |
| 12021 unittest.group("resource-AdvertiserGroupsResourceApi", () { | |
| 12022 unittest.test("method--delete", () { | |
| 12023 | |
| 12024 var mock = new HttpServerMock(); | |
| 12025 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12026 var arg_profileId = "foo"; | |
| 12027 var arg_id = "foo"; | |
| 12028 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12029 var path = (req.url).path; | |
| 12030 var pathOffset = 0; | |
| 12031 var index; | |
| 12032 var subPart; | |
| 12033 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12034 pathOffset += 1; | |
| 12035 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12036 pathOffset += 18; | |
| 12037 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12038 pathOffset += 13; | |
| 12039 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12040 unittest.expect(index >= 0, unittest.isTrue); | |
| 12041 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12042 pathOffset = index; | |
| 12043 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12044 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12045 pathOffset += 18; | |
| 12046 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12047 pathOffset = path.length; | |
| 12048 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12049 | |
| 12050 var query = (req.url).query; | |
| 12051 var queryOffset = 0; | |
| 12052 var queryMap = {}; | |
| 12053 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12054 parseBool(n) { | |
| 12055 if (n == "true") return true; | |
| 12056 if (n == "false") return false; | |
| 12057 if (n == null) return null; | |
| 12058 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12059 } | |
| 12060 if (query.length > 0) { | |
| 12061 for (var part in query.split("&")) { | |
| 12062 var keyvalue = part.split("="); | |
| 12063 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12064 } | |
| 12065 } | |
| 12066 | |
| 12067 | |
| 12068 var h = { | |
| 12069 "content-type" : "application/json; charset=utf-8", | |
| 12070 }; | |
| 12071 var resp = ""; | |
| 12072 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12073 }), true); | |
| 12074 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 12075 }); | |
| 12076 | |
| 12077 unittest.test("method--get", () { | |
| 12078 | |
| 12079 var mock = new HttpServerMock(); | |
| 12080 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12081 var arg_profileId = "foo"; | |
| 12082 var arg_id = "foo"; | |
| 12083 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12084 var path = (req.url).path; | |
| 12085 var pathOffset = 0; | |
| 12086 var index; | |
| 12087 var subPart; | |
| 12088 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12089 pathOffset += 1; | |
| 12090 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12091 pathOffset += 18; | |
| 12092 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12093 pathOffset += 13; | |
| 12094 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12095 unittest.expect(index >= 0, unittest.isTrue); | |
| 12096 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12097 pathOffset = index; | |
| 12098 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12099 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12100 pathOffset += 18; | |
| 12101 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12102 pathOffset = path.length; | |
| 12103 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12104 | |
| 12105 var query = (req.url).query; | |
| 12106 var queryOffset = 0; | |
| 12107 var queryMap = {}; | |
| 12108 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12109 parseBool(n) { | |
| 12110 if (n == "true") return true; | |
| 12111 if (n == "false") return false; | |
| 12112 if (n == null) return null; | |
| 12113 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12114 } | |
| 12115 if (query.length > 0) { | |
| 12116 for (var part in query.split("&")) { | |
| 12117 var keyvalue = part.split("="); | |
| 12118 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12119 } | |
| 12120 } | |
| 12121 | |
| 12122 | |
| 12123 var h = { | |
| 12124 "content-type" : "application/json; charset=utf-8", | |
| 12125 }; | |
| 12126 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12127 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12128 }), true); | |
| 12129 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AdvertiserG
roup response) { | |
| 12130 checkAdvertiserGroup(response); | |
| 12131 }))); | |
| 12132 }); | |
| 12133 | |
| 12134 unittest.test("method--insert", () { | |
| 12135 | |
| 12136 var mock = new HttpServerMock(); | |
| 12137 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12138 var arg_request = buildAdvertiserGroup(); | |
| 12139 var arg_profileId = "foo"; | |
| 12140 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12141 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12142 checkAdvertiserGroup(obj); | |
| 12143 | |
| 12144 var path = (req.url).path; | |
| 12145 var pathOffset = 0; | |
| 12146 var index; | |
| 12147 var subPart; | |
| 12148 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12149 pathOffset += 1; | |
| 12150 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12151 pathOffset += 18; | |
| 12152 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12153 pathOffset += 13; | |
| 12154 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12155 unittest.expect(index >= 0, unittest.isTrue); | |
| 12156 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12157 pathOffset = index; | |
| 12158 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12159 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12160 pathOffset += 17; | |
| 12161 | |
| 12162 var query = (req.url).query; | |
| 12163 var queryOffset = 0; | |
| 12164 var queryMap = {}; | |
| 12165 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12166 parseBool(n) { | |
| 12167 if (n == "true") return true; | |
| 12168 if (n == "false") return false; | |
| 12169 if (n == null) return null; | |
| 12170 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12171 } | |
| 12172 if (query.length > 0) { | |
| 12173 for (var part in query.split("&")) { | |
| 12174 var keyvalue = part.split("="); | |
| 12175 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12176 } | |
| 12177 } | |
| 12178 | |
| 12179 | |
| 12180 var h = { | |
| 12181 "content-type" : "application/json; charset=utf-8", | |
| 12182 }; | |
| 12183 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12184 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12185 }), true); | |
| 12186 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12187 checkAdvertiserGroup(response); | |
| 12188 }))); | |
| 12189 }); | |
| 12190 | |
| 12191 unittest.test("method--list", () { | |
| 12192 | |
| 12193 var mock = new HttpServerMock(); | |
| 12194 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12195 var arg_profileId = "foo"; | |
| 12196 var arg_ids = buildUnnamed3230(); | |
| 12197 var arg_maxResults = 42; | |
| 12198 var arg_pageToken = "foo"; | |
| 12199 var arg_searchString = "foo"; | |
| 12200 var arg_sortField = "foo"; | |
| 12201 var arg_sortOrder = "foo"; | |
| 12202 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12203 var path = (req.url).path; | |
| 12204 var pathOffset = 0; | |
| 12205 var index; | |
| 12206 var subPart; | |
| 12207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12208 pathOffset += 1; | |
| 12209 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12210 pathOffset += 18; | |
| 12211 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12212 pathOffset += 13; | |
| 12213 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12214 unittest.expect(index >= 0, unittest.isTrue); | |
| 12215 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12216 pathOffset = index; | |
| 12217 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12218 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12219 pathOffset += 17; | |
| 12220 | |
| 12221 var query = (req.url).query; | |
| 12222 var queryOffset = 0; | |
| 12223 var queryMap = {}; | |
| 12224 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12225 parseBool(n) { | |
| 12226 if (n == "true") return true; | |
| 12227 if (n == "false") return false; | |
| 12228 if (n == null) return null; | |
| 12229 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12230 } | |
| 12231 if (query.length > 0) { | |
| 12232 for (var part in query.split("&")) { | |
| 12233 var keyvalue = part.split("="); | |
| 12234 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12235 } | |
| 12236 } | |
| 12237 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12238 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12239 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12240 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12241 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12242 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12243 | |
| 12244 | |
| 12245 var h = { | |
| 12246 "content-type" : "application/json; charset=utf-8", | |
| 12247 }; | |
| 12248 var resp = convert.JSON.encode(buildAdvertiserGroupsListResponse()); | |
| 12249 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12250 }), true); | |
| 12251 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) { | |
| 12252 checkAdvertiserGroupsListResponse(response); | |
| 12253 }))); | |
| 12254 }); | |
| 12255 | |
| 12256 unittest.test("method--patch", () { | |
| 12257 | |
| 12258 var mock = new HttpServerMock(); | |
| 12259 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12260 var arg_request = buildAdvertiserGroup(); | |
| 12261 var arg_profileId = "foo"; | |
| 12262 var arg_id = "foo"; | |
| 12263 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12264 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12265 checkAdvertiserGroup(obj); | |
| 12266 | |
| 12267 var path = (req.url).path; | |
| 12268 var pathOffset = 0; | |
| 12269 var index; | |
| 12270 var subPart; | |
| 12271 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12272 pathOffset += 1; | |
| 12273 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12274 pathOffset += 18; | |
| 12275 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12276 pathOffset += 13; | |
| 12277 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12278 unittest.expect(index >= 0, unittest.isTrue); | |
| 12279 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12280 pathOffset = index; | |
| 12281 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12282 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12283 pathOffset += 17; | |
| 12284 | |
| 12285 var query = (req.url).query; | |
| 12286 var queryOffset = 0; | |
| 12287 var queryMap = {}; | |
| 12288 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12289 parseBool(n) { | |
| 12290 if (n == "true") return true; | |
| 12291 if (n == "false") return false; | |
| 12292 if (n == null) return null; | |
| 12293 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12294 } | |
| 12295 if (query.length > 0) { | |
| 12296 for (var part in query.split("&")) { | |
| 12297 var keyvalue = part.split("="); | |
| 12298 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12299 } | |
| 12300 } | |
| 12301 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12302 | |
| 12303 | |
| 12304 var h = { | |
| 12305 "content-type" : "application/json; charset=utf-8", | |
| 12306 }; | |
| 12307 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12308 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12309 }), true); | |
| 12310 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AdvertiserGroup response) { | |
| 12311 checkAdvertiserGroup(response); | |
| 12312 }))); | |
| 12313 }); | |
| 12314 | |
| 12315 unittest.test("method--update", () { | |
| 12316 | |
| 12317 var mock = new HttpServerMock(); | |
| 12318 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12319 var arg_request = buildAdvertiserGroup(); | |
| 12320 var arg_profileId = "foo"; | |
| 12321 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12322 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12323 checkAdvertiserGroup(obj); | |
| 12324 | |
| 12325 var path = (req.url).path; | |
| 12326 var pathOffset = 0; | |
| 12327 var index; | |
| 12328 var subPart; | |
| 12329 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12330 pathOffset += 1; | |
| 12331 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12332 pathOffset += 18; | |
| 12333 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12334 pathOffset += 13; | |
| 12335 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12336 unittest.expect(index >= 0, unittest.isTrue); | |
| 12337 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12338 pathOffset = index; | |
| 12339 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12340 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12341 pathOffset += 17; | |
| 12342 | |
| 12343 var query = (req.url).query; | |
| 12344 var queryOffset = 0; | |
| 12345 var queryMap = {}; | |
| 12346 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12347 parseBool(n) { | |
| 12348 if (n == "true") return true; | |
| 12349 if (n == "false") return false; | |
| 12350 if (n == null) return null; | |
| 12351 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12352 } | |
| 12353 if (query.length > 0) { | |
| 12354 for (var part in query.split("&")) { | |
| 12355 var keyvalue = part.split("="); | |
| 12356 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12357 } | |
| 12358 } | |
| 12359 | |
| 12360 | |
| 12361 var h = { | |
| 12362 "content-type" : "application/json; charset=utf-8", | |
| 12363 }; | |
| 12364 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12365 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12366 }), true); | |
| 12367 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12368 checkAdvertiserGroup(response); | |
| 12369 }))); | |
| 12370 }); | |
| 12371 | |
| 12372 }); | |
| 12373 | |
| 12374 | |
| 12375 unittest.group("resource-AdvertisersResourceApi", () { | |
| 12376 unittest.test("method--get", () { | |
| 12377 | |
| 12378 var mock = new HttpServerMock(); | |
| 12379 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12380 var arg_profileId = "foo"; | |
| 12381 var arg_id = "foo"; | |
| 12382 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12383 var path = (req.url).path; | |
| 12384 var pathOffset = 0; | |
| 12385 var index; | |
| 12386 var subPart; | |
| 12387 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12388 pathOffset += 1; | |
| 12389 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12390 pathOffset += 18; | |
| 12391 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12392 pathOffset += 13; | |
| 12393 index = path.indexOf("/advertisers/", pathOffset); | |
| 12394 unittest.expect(index >= 0, unittest.isTrue); | |
| 12395 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12396 pathOffset = index; | |
| 12397 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12398 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/advertisers/")); | |
| 12399 pathOffset += 13; | |
| 12400 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12401 pathOffset = path.length; | |
| 12402 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12403 | |
| 12404 var query = (req.url).query; | |
| 12405 var queryOffset = 0; | |
| 12406 var queryMap = {}; | |
| 12407 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12408 parseBool(n) { | |
| 12409 if (n == "true") return true; | |
| 12410 if (n == "false") return false; | |
| 12411 if (n == null) return null; | |
| 12412 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12413 } | |
| 12414 if (query.length > 0) { | |
| 12415 for (var part in query.split("&")) { | |
| 12416 var keyvalue = part.split("="); | |
| 12417 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12418 } | |
| 12419 } | |
| 12420 | |
| 12421 | |
| 12422 var h = { | |
| 12423 "content-type" : "application/json; charset=utf-8", | |
| 12424 }; | |
| 12425 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12426 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12427 }), true); | |
| 12428 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Advertiser
response) { | |
| 12429 checkAdvertiser(response); | |
| 12430 }))); | |
| 12431 }); | |
| 12432 | |
| 12433 unittest.test("method--insert", () { | |
| 12434 | |
| 12435 var mock = new HttpServerMock(); | |
| 12436 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12437 var arg_request = buildAdvertiser(); | |
| 12438 var arg_profileId = "foo"; | |
| 12439 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12440 var obj = new api.Advertiser.fromJson(json); | |
| 12441 checkAdvertiser(obj); | |
| 12442 | |
| 12443 var path = (req.url).path; | |
| 12444 var pathOffset = 0; | |
| 12445 var index; | |
| 12446 var subPart; | |
| 12447 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12448 pathOffset += 1; | |
| 12449 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12450 pathOffset += 18; | |
| 12451 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12452 pathOffset += 13; | |
| 12453 index = path.indexOf("/advertisers", pathOffset); | |
| 12454 unittest.expect(index >= 0, unittest.isTrue); | |
| 12455 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12456 pathOffset = index; | |
| 12457 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12458 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12459 pathOffset += 12; | |
| 12460 | |
| 12461 var query = (req.url).query; | |
| 12462 var queryOffset = 0; | |
| 12463 var queryMap = {}; | |
| 12464 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12465 parseBool(n) { | |
| 12466 if (n == "true") return true; | |
| 12467 if (n == "false") return false; | |
| 12468 if (n == null) return null; | |
| 12469 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12470 } | |
| 12471 if (query.length > 0) { | |
| 12472 for (var part in query.split("&")) { | |
| 12473 var keyvalue = part.split("="); | |
| 12474 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12475 } | |
| 12476 } | |
| 12477 | |
| 12478 | |
| 12479 var h = { | |
| 12480 "content-type" : "application/json; charset=utf-8", | |
| 12481 }; | |
| 12482 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12483 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12484 }), true); | |
| 12485 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12486 checkAdvertiser(response); | |
| 12487 }))); | |
| 12488 }); | |
| 12489 | |
| 12490 unittest.test("method--list", () { | |
| 12491 | |
| 12492 var mock = new HttpServerMock(); | |
| 12493 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12494 var arg_profileId = "foo"; | |
| 12495 var arg_advertiserGroupIds = buildUnnamed3231(); | |
| 12496 var arg_floodlightConfigurationIds = buildUnnamed3232(); | |
| 12497 var arg_ids = buildUnnamed3233(); | |
| 12498 var arg_includeAdvertisersWithoutGroupsOnly = true; | |
| 12499 var arg_maxResults = 42; | |
| 12500 var arg_onlyParent = true; | |
| 12501 var arg_pageToken = "foo"; | |
| 12502 var arg_searchString = "foo"; | |
| 12503 var arg_sortField = "foo"; | |
| 12504 var arg_sortOrder = "foo"; | |
| 12505 var arg_status = "foo"; | |
| 12506 var arg_subaccountId = "foo"; | |
| 12507 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12508 var path = (req.url).path; | |
| 12509 var pathOffset = 0; | |
| 12510 var index; | |
| 12511 var subPart; | |
| 12512 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12513 pathOffset += 1; | |
| 12514 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12515 pathOffset += 18; | |
| 12516 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12517 pathOffset += 13; | |
| 12518 index = path.indexOf("/advertisers", pathOffset); | |
| 12519 unittest.expect(index >= 0, unittest.isTrue); | |
| 12520 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12521 pathOffset = index; | |
| 12522 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12523 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12524 pathOffset += 12; | |
| 12525 | |
| 12526 var query = (req.url).query; | |
| 12527 var queryOffset = 0; | |
| 12528 var queryMap = {}; | |
| 12529 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12530 parseBool(n) { | |
| 12531 if (n == "true") return true; | |
| 12532 if (n == "false") return false; | |
| 12533 if (n == null) return null; | |
| 12534 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12535 } | |
| 12536 if (query.length > 0) { | |
| 12537 for (var part in query.split("&")) { | |
| 12538 var keyvalue = part.split("="); | |
| 12539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12540 } | |
| 12541 } | |
| 12542 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 12543 unittest.expect(queryMap["floodlightConfigurationIds"], unittest.equals(
arg_floodlightConfigurationIds)); | |
| 12544 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12545 unittest.expect(queryMap["includeAdvertisersWithoutGroupsOnly"].first, u
nittest.equals("$arg_includeAdvertisersWithoutGroupsOnly")); | |
| 12546 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12547 unittest.expect(queryMap["onlyParent"].first, unittest.equals("$arg_only
Parent")); | |
| 12548 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12549 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12550 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12551 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12552 unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); | |
| 12553 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 12554 | |
| 12555 | |
| 12556 var h = { | |
| 12557 "content-type" : "application/json; charset=utf-8", | |
| 12558 }; | |
| 12559 var resp = convert.JSON.encode(buildAdvertisersListResponse()); | |
| 12560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12561 }), true); | |
| 12562 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) { | |
| 12563 checkAdvertisersListResponse(response); | |
| 12564 }))); | |
| 12565 }); | |
| 12566 | |
| 12567 unittest.test("method--patch", () { | |
| 12568 | |
| 12569 var mock = new HttpServerMock(); | |
| 12570 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12571 var arg_request = buildAdvertiser(); | |
| 12572 var arg_profileId = "foo"; | |
| 12573 var arg_id = "foo"; | |
| 12574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12575 var obj = new api.Advertiser.fromJson(json); | |
| 12576 checkAdvertiser(obj); | |
| 12577 | |
| 12578 var path = (req.url).path; | |
| 12579 var pathOffset = 0; | |
| 12580 var index; | |
| 12581 var subPart; | |
| 12582 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12583 pathOffset += 1; | |
| 12584 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12585 pathOffset += 18; | |
| 12586 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12587 pathOffset += 13; | |
| 12588 index = path.indexOf("/advertisers", pathOffset); | |
| 12589 unittest.expect(index >= 0, unittest.isTrue); | |
| 12590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12591 pathOffset = index; | |
| 12592 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12593 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12594 pathOffset += 12; | |
| 12595 | |
| 12596 var query = (req.url).query; | |
| 12597 var queryOffset = 0; | |
| 12598 var queryMap = {}; | |
| 12599 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12600 parseBool(n) { | |
| 12601 if (n == "true") return true; | |
| 12602 if (n == "false") return false; | |
| 12603 if (n == null) return null; | |
| 12604 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12605 } | |
| 12606 if (query.length > 0) { | |
| 12607 for (var part in query.split("&")) { | |
| 12608 var keyvalue = part.split("="); | |
| 12609 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12610 } | |
| 12611 } | |
| 12612 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12613 | |
| 12614 | |
| 12615 var h = { | |
| 12616 "content-type" : "application/json; charset=utf-8", | |
| 12617 }; | |
| 12618 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12619 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12620 }), true); | |
| 12621 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Advertiser response) { | |
| 12622 checkAdvertiser(response); | |
| 12623 }))); | |
| 12624 }); | |
| 12625 | |
| 12626 unittest.test("method--update", () { | |
| 12627 | |
| 12628 var mock = new HttpServerMock(); | |
| 12629 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12630 var arg_request = buildAdvertiser(); | |
| 12631 var arg_profileId = "foo"; | |
| 12632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12633 var obj = new api.Advertiser.fromJson(json); | |
| 12634 checkAdvertiser(obj); | |
| 12635 | |
| 12636 var path = (req.url).path; | |
| 12637 var pathOffset = 0; | |
| 12638 var index; | |
| 12639 var subPart; | |
| 12640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12641 pathOffset += 1; | |
| 12642 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12643 pathOffset += 18; | |
| 12644 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12645 pathOffset += 13; | |
| 12646 index = path.indexOf("/advertisers", pathOffset); | |
| 12647 unittest.expect(index >= 0, unittest.isTrue); | |
| 12648 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12649 pathOffset = index; | |
| 12650 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12651 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12652 pathOffset += 12; | |
| 12653 | |
| 12654 var query = (req.url).query; | |
| 12655 var queryOffset = 0; | |
| 12656 var queryMap = {}; | |
| 12657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12658 parseBool(n) { | |
| 12659 if (n == "true") return true; | |
| 12660 if (n == "false") return false; | |
| 12661 if (n == null) return null; | |
| 12662 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12663 } | |
| 12664 if (query.length > 0) { | |
| 12665 for (var part in query.split("&")) { | |
| 12666 var keyvalue = part.split("="); | |
| 12667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12668 } | |
| 12669 } | |
| 12670 | |
| 12671 | |
| 12672 var h = { | |
| 12673 "content-type" : "application/json; charset=utf-8", | |
| 12674 }; | |
| 12675 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12676 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12677 }), true); | |
| 12678 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12679 checkAdvertiser(response); | |
| 12680 }))); | |
| 12681 }); | |
| 12682 | |
| 12683 }); | |
| 12684 | |
| 12685 | |
| 12686 unittest.group("resource-BrowsersResourceApi", () { | |
| 12687 unittest.test("method--list", () { | |
| 12688 | |
| 12689 var mock = new HttpServerMock(); | |
| 12690 api.BrowsersResourceApi res = new api.DfareportingApi(mock).browsers; | |
| 12691 var arg_profileId = "foo"; | |
| 12692 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12693 var path = (req.url).path; | |
| 12694 var pathOffset = 0; | |
| 12695 var index; | |
| 12696 var subPart; | |
| 12697 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12698 pathOffset += 1; | |
| 12699 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12700 pathOffset += 18; | |
| 12701 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12702 pathOffset += 13; | |
| 12703 index = path.indexOf("/browsers", pathOffset); | |
| 12704 unittest.expect(index >= 0, unittest.isTrue); | |
| 12705 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12706 pathOffset = index; | |
| 12707 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12708 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/browsers")); | |
| 12709 pathOffset += 9; | |
| 12710 | |
| 12711 var query = (req.url).query; | |
| 12712 var queryOffset = 0; | |
| 12713 var queryMap = {}; | |
| 12714 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12715 parseBool(n) { | |
| 12716 if (n == "true") return true; | |
| 12717 if (n == "false") return false; | |
| 12718 if (n == null) return null; | |
| 12719 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12720 } | |
| 12721 if (query.length > 0) { | |
| 12722 for (var part in query.split("&")) { | |
| 12723 var keyvalue = part.split("="); | |
| 12724 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12725 } | |
| 12726 } | |
| 12727 | |
| 12728 | |
| 12729 var h = { | |
| 12730 "content-type" : "application/json; charset=utf-8", | |
| 12731 }; | |
| 12732 var resp = convert.JSON.encode(buildBrowsersListResponse()); | |
| 12733 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12734 }), true); | |
| 12735 res.list(arg_profileId).then(unittest.expectAsync(((api.BrowsersListRespon
se response) { | |
| 12736 checkBrowsersListResponse(response); | |
| 12737 }))); | |
| 12738 }); | |
| 12739 | |
| 12740 }); | |
| 12741 | |
| 12742 | |
| 12743 unittest.group("resource-CampaignCreativeAssociationsResourceApi", () { | |
| 12744 unittest.test("method--insert", () { | |
| 12745 | |
| 12746 var mock = new HttpServerMock(); | |
| 12747 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12748 var arg_request = buildCampaignCreativeAssociation(); | |
| 12749 var arg_profileId = "foo"; | |
| 12750 var arg_campaignId = "foo"; | |
| 12751 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12752 var obj = new api.CampaignCreativeAssociation.fromJson(json); | |
| 12753 checkCampaignCreativeAssociation(obj); | |
| 12754 | |
| 12755 var path = (req.url).path; | |
| 12756 var pathOffset = 0; | |
| 12757 var index; | |
| 12758 var subPart; | |
| 12759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12760 pathOffset += 1; | |
| 12761 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12762 pathOffset += 18; | |
| 12763 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12764 pathOffset += 13; | |
| 12765 index = path.indexOf("/campaigns/", pathOffset); | |
| 12766 unittest.expect(index >= 0, unittest.isTrue); | |
| 12767 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12768 pathOffset = index; | |
| 12769 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12770 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12771 pathOffset += 11; | |
| 12772 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12773 unittest.expect(index >= 0, unittest.isTrue); | |
| 12774 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12775 pathOffset = index; | |
| 12776 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12777 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12778 pathOffset += 29; | |
| 12779 | |
| 12780 var query = (req.url).query; | |
| 12781 var queryOffset = 0; | |
| 12782 var queryMap = {}; | |
| 12783 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12784 parseBool(n) { | |
| 12785 if (n == "true") return true; | |
| 12786 if (n == "false") return false; | |
| 12787 if (n == null) return null; | |
| 12788 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12789 } | |
| 12790 if (query.length > 0) { | |
| 12791 for (var part in query.split("&")) { | |
| 12792 var keyvalue = part.split("="); | |
| 12793 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12794 } | |
| 12795 } | |
| 12796 | |
| 12797 | |
| 12798 var h = { | |
| 12799 "content-type" : "application/json; charset=utf-8", | |
| 12800 }; | |
| 12801 var resp = convert.JSON.encode(buildCampaignCreativeAssociation()); | |
| 12802 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12803 }), true); | |
| 12804 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.CampaignCreativeAssociation response) { | |
| 12805 checkCampaignCreativeAssociation(response); | |
| 12806 }))); | |
| 12807 }); | |
| 12808 | |
| 12809 unittest.test("method--list", () { | |
| 12810 | |
| 12811 var mock = new HttpServerMock(); | |
| 12812 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12813 var arg_profileId = "foo"; | |
| 12814 var arg_campaignId = "foo"; | |
| 12815 var arg_maxResults = 42; | |
| 12816 var arg_pageToken = "foo"; | |
| 12817 var arg_sortOrder = "foo"; | |
| 12818 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12819 var path = (req.url).path; | |
| 12820 var pathOffset = 0; | |
| 12821 var index; | |
| 12822 var subPart; | |
| 12823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12824 pathOffset += 1; | |
| 12825 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12826 pathOffset += 18; | |
| 12827 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12828 pathOffset += 13; | |
| 12829 index = path.indexOf("/campaigns/", pathOffset); | |
| 12830 unittest.expect(index >= 0, unittest.isTrue); | |
| 12831 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12832 pathOffset = index; | |
| 12833 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12834 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12835 pathOffset += 11; | |
| 12836 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12837 unittest.expect(index >= 0, unittest.isTrue); | |
| 12838 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12839 pathOffset = index; | |
| 12840 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12841 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12842 pathOffset += 29; | |
| 12843 | |
| 12844 var query = (req.url).query; | |
| 12845 var queryOffset = 0; | |
| 12846 var queryMap = {}; | |
| 12847 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12848 parseBool(n) { | |
| 12849 if (n == "true") return true; | |
| 12850 if (n == "false") return false; | |
| 12851 if (n == null) return null; | |
| 12852 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12853 } | |
| 12854 if (query.length > 0) { | |
| 12855 for (var part in query.split("&")) { | |
| 12856 var keyvalue = part.split("="); | |
| 12857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12858 } | |
| 12859 } | |
| 12860 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12861 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12862 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12863 | |
| 12864 | |
| 12865 var h = { | |
| 12866 "content-type" : "application/json; charset=utf-8", | |
| 12867 }; | |
| 12868 var resp = convert.JSON.encode(buildCampaignCreativeAssociationsListResp
onse()); | |
| 12869 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12870 }), true); | |
| 12871 res.list(arg_profileId, arg_campaignId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Ca
mpaignCreativeAssociationsListResponse response) { | |
| 12872 checkCampaignCreativeAssociationsListResponse(response); | |
| 12873 }))); | |
| 12874 }); | |
| 12875 | |
| 12876 }); | |
| 12877 | |
| 12878 | |
| 12879 unittest.group("resource-CampaignsResourceApi", () { | |
| 12880 unittest.test("method--get", () { | |
| 12881 | |
| 12882 var mock = new HttpServerMock(); | |
| 12883 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12884 var arg_profileId = "foo"; | |
| 12885 var arg_id = "foo"; | |
| 12886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12887 var path = (req.url).path; | |
| 12888 var pathOffset = 0; | |
| 12889 var index; | |
| 12890 var subPart; | |
| 12891 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12892 pathOffset += 1; | |
| 12893 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12894 pathOffset += 18; | |
| 12895 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12896 pathOffset += 13; | |
| 12897 index = path.indexOf("/campaigns/", pathOffset); | |
| 12898 unittest.expect(index >= 0, unittest.isTrue); | |
| 12899 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12900 pathOffset = index; | |
| 12901 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12902 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12903 pathOffset += 11; | |
| 12904 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12905 pathOffset = path.length; | |
| 12906 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12907 | |
| 12908 var query = (req.url).query; | |
| 12909 var queryOffset = 0; | |
| 12910 var queryMap = {}; | |
| 12911 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12912 parseBool(n) { | |
| 12913 if (n == "true") return true; | |
| 12914 if (n == "false") return false; | |
| 12915 if (n == null) return null; | |
| 12916 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12917 } | |
| 12918 if (query.length > 0) { | |
| 12919 for (var part in query.split("&")) { | |
| 12920 var keyvalue = part.split("="); | |
| 12921 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12922 } | |
| 12923 } | |
| 12924 | |
| 12925 | |
| 12926 var h = { | |
| 12927 "content-type" : "application/json; charset=utf-8", | |
| 12928 }; | |
| 12929 var resp = convert.JSON.encode(buildCampaign()); | |
| 12930 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12931 }), true); | |
| 12932 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Campaign re
sponse) { | |
| 12933 checkCampaign(response); | |
| 12934 }))); | |
| 12935 }); | |
| 12936 | |
| 12937 unittest.test("method--insert", () { | |
| 12938 | |
| 12939 var mock = new HttpServerMock(); | |
| 12940 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12941 var arg_request = buildCampaign(); | |
| 12942 var arg_profileId = "foo"; | |
| 12943 var arg_defaultLandingPageName = "foo"; | |
| 12944 var arg_defaultLandingPageUrl = "foo"; | |
| 12945 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12946 var obj = new api.Campaign.fromJson(json); | |
| 12947 checkCampaign(obj); | |
| 12948 | |
| 12949 var path = (req.url).path; | |
| 12950 var pathOffset = 0; | |
| 12951 var index; | |
| 12952 var subPart; | |
| 12953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12954 pathOffset += 1; | |
| 12955 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 12956 pathOffset += 18; | |
| 12957 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12958 pathOffset += 13; | |
| 12959 index = path.indexOf("/campaigns", pathOffset); | |
| 12960 unittest.expect(index >= 0, unittest.isTrue); | |
| 12961 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12962 pathOffset = index; | |
| 12963 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12964 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 12965 pathOffset += 10; | |
| 12966 | |
| 12967 var query = (req.url).query; | |
| 12968 var queryOffset = 0; | |
| 12969 var queryMap = {}; | |
| 12970 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12971 parseBool(n) { | |
| 12972 if (n == "true") return true; | |
| 12973 if (n == "false") return false; | |
| 12974 if (n == null) return null; | |
| 12975 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12976 } | |
| 12977 if (query.length > 0) { | |
| 12978 for (var part in query.split("&")) { | |
| 12979 var keyvalue = part.split("="); | |
| 12980 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12981 } | |
| 12982 } | |
| 12983 unittest.expect(queryMap["defaultLandingPageName"].first, unittest.equal
s(arg_defaultLandingPageName)); | |
| 12984 unittest.expect(queryMap["defaultLandingPageUrl"].first, unittest.equals
(arg_defaultLandingPageUrl)); | |
| 12985 | |
| 12986 | |
| 12987 var h = { | |
| 12988 "content-type" : "application/json; charset=utf-8", | |
| 12989 }; | |
| 12990 var resp = convert.JSON.encode(buildCampaign()); | |
| 12991 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12992 }), true); | |
| 12993 res.insert(arg_request, arg_profileId, arg_defaultLandingPageName, arg_def
aultLandingPageUrl).then(unittest.expectAsync(((api.Campaign response) { | |
| 12994 checkCampaign(response); | |
| 12995 }))); | |
| 12996 }); | |
| 12997 | |
| 12998 unittest.test("method--list", () { | |
| 12999 | |
| 13000 var mock = new HttpServerMock(); | |
| 13001 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13002 var arg_profileId = "foo"; | |
| 13003 var arg_advertiserGroupIds = buildUnnamed3234(); | |
| 13004 var arg_advertiserIds = buildUnnamed3235(); | |
| 13005 var arg_archived = true; | |
| 13006 var arg_atLeastOneOptimizationActivity = true; | |
| 13007 var arg_excludedIds = buildUnnamed3236(); | |
| 13008 var arg_ids = buildUnnamed3237(); | |
| 13009 var arg_maxResults = 42; | |
| 13010 var arg_overriddenEventTagId = "foo"; | |
| 13011 var arg_pageToken = "foo"; | |
| 13012 var arg_searchString = "foo"; | |
| 13013 var arg_sortField = "foo"; | |
| 13014 var arg_sortOrder = "foo"; | |
| 13015 var arg_subaccountId = "foo"; | |
| 13016 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13017 var path = (req.url).path; | |
| 13018 var pathOffset = 0; | |
| 13019 var index; | |
| 13020 var subPart; | |
| 13021 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13022 pathOffset += 1; | |
| 13023 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13024 pathOffset += 18; | |
| 13025 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13026 pathOffset += 13; | |
| 13027 index = path.indexOf("/campaigns", pathOffset); | |
| 13028 unittest.expect(index >= 0, unittest.isTrue); | |
| 13029 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13030 pathOffset = index; | |
| 13031 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13032 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13033 pathOffset += 10; | |
| 13034 | |
| 13035 var query = (req.url).query; | |
| 13036 var queryOffset = 0; | |
| 13037 var queryMap = {}; | |
| 13038 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13039 parseBool(n) { | |
| 13040 if (n == "true") return true; | |
| 13041 if (n == "false") return false; | |
| 13042 if (n == null) return null; | |
| 13043 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13044 } | |
| 13045 if (query.length > 0) { | |
| 13046 for (var part in query.split("&")) { | |
| 13047 var keyvalue = part.split("="); | |
| 13048 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13049 } | |
| 13050 } | |
| 13051 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 13052 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 13053 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 13054 unittest.expect(queryMap["atLeastOneOptimizationActivity"].first, unitte
st.equals("$arg_atLeastOneOptimizationActivity")); | |
| 13055 unittest.expect(queryMap["excludedIds"], unittest.equals(arg_excludedIds
)); | |
| 13056 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13057 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13058 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 13059 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13060 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13061 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13062 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13063 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 13064 | |
| 13065 | |
| 13066 var h = { | |
| 13067 "content-type" : "application/json; charset=utf-8", | |
| 13068 }; | |
| 13069 var resp = convert.JSON.encode(buildCampaignsListResponse()); | |
| 13070 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13071 }), true); | |
| 13072 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) { | |
| 13073 checkCampaignsListResponse(response); | |
| 13074 }))); | |
| 13075 }); | |
| 13076 | |
| 13077 unittest.test("method--patch", () { | |
| 13078 | |
| 13079 var mock = new HttpServerMock(); | |
| 13080 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13081 var arg_request = buildCampaign(); | |
| 13082 var arg_profileId = "foo"; | |
| 13083 var arg_id = "foo"; | |
| 13084 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13085 var obj = new api.Campaign.fromJson(json); | |
| 13086 checkCampaign(obj); | |
| 13087 | |
| 13088 var path = (req.url).path; | |
| 13089 var pathOffset = 0; | |
| 13090 var index; | |
| 13091 var subPart; | |
| 13092 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13093 pathOffset += 1; | |
| 13094 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13095 pathOffset += 18; | |
| 13096 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13097 pathOffset += 13; | |
| 13098 index = path.indexOf("/campaigns", pathOffset); | |
| 13099 unittest.expect(index >= 0, unittest.isTrue); | |
| 13100 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13101 pathOffset = index; | |
| 13102 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13103 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13104 pathOffset += 10; | |
| 13105 | |
| 13106 var query = (req.url).query; | |
| 13107 var queryOffset = 0; | |
| 13108 var queryMap = {}; | |
| 13109 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13110 parseBool(n) { | |
| 13111 if (n == "true") return true; | |
| 13112 if (n == "false") return false; | |
| 13113 if (n == null) return null; | |
| 13114 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13115 } | |
| 13116 if (query.length > 0) { | |
| 13117 for (var part in query.split("&")) { | |
| 13118 var keyvalue = part.split("="); | |
| 13119 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13120 } | |
| 13121 } | |
| 13122 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13123 | |
| 13124 | |
| 13125 var h = { | |
| 13126 "content-type" : "application/json; charset=utf-8", | |
| 13127 }; | |
| 13128 var resp = convert.JSON.encode(buildCampaign()); | |
| 13129 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13130 }), true); | |
| 13131 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Campaign response) { | |
| 13132 checkCampaign(response); | |
| 13133 }))); | |
| 13134 }); | |
| 13135 | |
| 13136 unittest.test("method--update", () { | |
| 13137 | |
| 13138 var mock = new HttpServerMock(); | |
| 13139 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13140 var arg_request = buildCampaign(); | |
| 13141 var arg_profileId = "foo"; | |
| 13142 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13143 var obj = new api.Campaign.fromJson(json); | |
| 13144 checkCampaign(obj); | |
| 13145 | |
| 13146 var path = (req.url).path; | |
| 13147 var pathOffset = 0; | |
| 13148 var index; | |
| 13149 var subPart; | |
| 13150 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13151 pathOffset += 1; | |
| 13152 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13153 pathOffset += 18; | |
| 13154 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13155 pathOffset += 13; | |
| 13156 index = path.indexOf("/campaigns", pathOffset); | |
| 13157 unittest.expect(index >= 0, unittest.isTrue); | |
| 13158 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13159 pathOffset = index; | |
| 13160 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13161 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13162 pathOffset += 10; | |
| 13163 | |
| 13164 var query = (req.url).query; | |
| 13165 var queryOffset = 0; | |
| 13166 var queryMap = {}; | |
| 13167 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13168 parseBool(n) { | |
| 13169 if (n == "true") return true; | |
| 13170 if (n == "false") return false; | |
| 13171 if (n == null) return null; | |
| 13172 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13173 } | |
| 13174 if (query.length > 0) { | |
| 13175 for (var part in query.split("&")) { | |
| 13176 var keyvalue = part.split("="); | |
| 13177 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13178 } | |
| 13179 } | |
| 13180 | |
| 13181 | |
| 13182 var h = { | |
| 13183 "content-type" : "application/json; charset=utf-8", | |
| 13184 }; | |
| 13185 var resp = convert.JSON.encode(buildCampaign()); | |
| 13186 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13187 }), true); | |
| 13188 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cam
paign response) { | |
| 13189 checkCampaign(response); | |
| 13190 }))); | |
| 13191 }); | |
| 13192 | |
| 13193 }); | |
| 13194 | |
| 13195 | |
| 13196 unittest.group("resource-ChangeLogsResourceApi", () { | |
| 13197 unittest.test("method--get", () { | |
| 13198 | |
| 13199 var mock = new HttpServerMock(); | |
| 13200 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13201 var arg_profileId = "foo"; | |
| 13202 var arg_id = "foo"; | |
| 13203 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13204 var path = (req.url).path; | |
| 13205 var pathOffset = 0; | |
| 13206 var index; | |
| 13207 var subPart; | |
| 13208 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13209 pathOffset += 1; | |
| 13210 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13211 pathOffset += 18; | |
| 13212 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13213 pathOffset += 13; | |
| 13214 index = path.indexOf("/changeLogs/", pathOffset); | |
| 13215 unittest.expect(index >= 0, unittest.isTrue); | |
| 13216 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13217 pathOffset = index; | |
| 13218 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13219 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/changeLogs/")); | |
| 13220 pathOffset += 12; | |
| 13221 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13222 pathOffset = path.length; | |
| 13223 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13224 | |
| 13225 var query = (req.url).query; | |
| 13226 var queryOffset = 0; | |
| 13227 var queryMap = {}; | |
| 13228 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13229 parseBool(n) { | |
| 13230 if (n == "true") return true; | |
| 13231 if (n == "false") return false; | |
| 13232 if (n == null) return null; | |
| 13233 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13234 } | |
| 13235 if (query.length > 0) { | |
| 13236 for (var part in query.split("&")) { | |
| 13237 var keyvalue = part.split("="); | |
| 13238 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13239 } | |
| 13240 } | |
| 13241 | |
| 13242 | |
| 13243 var h = { | |
| 13244 "content-type" : "application/json; charset=utf-8", | |
| 13245 }; | |
| 13246 var resp = convert.JSON.encode(buildChangeLog()); | |
| 13247 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13248 }), true); | |
| 13249 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ChangeLog r
esponse) { | |
| 13250 checkChangeLog(response); | |
| 13251 }))); | |
| 13252 }); | |
| 13253 | |
| 13254 unittest.test("method--list", () { | |
| 13255 | |
| 13256 var mock = new HttpServerMock(); | |
| 13257 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13258 var arg_profileId = "foo"; | |
| 13259 var arg_action = "foo"; | |
| 13260 var arg_ids = buildUnnamed3238(); | |
| 13261 var arg_maxChangeTime = "foo"; | |
| 13262 var arg_maxResults = 42; | |
| 13263 var arg_minChangeTime = "foo"; | |
| 13264 var arg_objectIds = buildUnnamed3239(); | |
| 13265 var arg_objectType = "foo"; | |
| 13266 var arg_pageToken = "foo"; | |
| 13267 var arg_searchString = "foo"; | |
| 13268 var arg_userProfileIds = buildUnnamed3240(); | |
| 13269 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13270 var path = (req.url).path; | |
| 13271 var pathOffset = 0; | |
| 13272 var index; | |
| 13273 var subPart; | |
| 13274 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13275 pathOffset += 1; | |
| 13276 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13277 pathOffset += 18; | |
| 13278 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13279 pathOffset += 13; | |
| 13280 index = path.indexOf("/changeLogs", pathOffset); | |
| 13281 unittest.expect(index >= 0, unittest.isTrue); | |
| 13282 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13283 pathOffset = index; | |
| 13284 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13285 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/changeLogs")); | |
| 13286 pathOffset += 11; | |
| 13287 | |
| 13288 var query = (req.url).query; | |
| 13289 var queryOffset = 0; | |
| 13290 var queryMap = {}; | |
| 13291 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13292 parseBool(n) { | |
| 13293 if (n == "true") return true; | |
| 13294 if (n == "false") return false; | |
| 13295 if (n == null) return null; | |
| 13296 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13297 } | |
| 13298 if (query.length > 0) { | |
| 13299 for (var part in query.split("&")) { | |
| 13300 var keyvalue = part.split("="); | |
| 13301 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13302 } | |
| 13303 } | |
| 13304 unittest.expect(queryMap["action"].first, unittest.equals(arg_action)); | |
| 13305 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13306 unittest.expect(queryMap["maxChangeTime"].first, unittest.equals(arg_max
ChangeTime)); | |
| 13307 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13308 unittest.expect(queryMap["minChangeTime"].first, unittest.equals(arg_min
ChangeTime)); | |
| 13309 unittest.expect(queryMap["objectIds"], unittest.equals(arg_objectIds)); | |
| 13310 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 13311 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13312 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13313 unittest.expect(queryMap["userProfileIds"], unittest.equals(arg_userProf
ileIds)); | |
| 13314 | |
| 13315 | |
| 13316 var h = { | |
| 13317 "content-type" : "application/json; charset=utf-8", | |
| 13318 }; | |
| 13319 var resp = convert.JSON.encode(buildChangeLogsListResponse()); | |
| 13320 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13321 }), true); | |
| 13322 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) { | |
| 13323 checkChangeLogsListResponse(response); | |
| 13324 }))); | |
| 13325 }); | |
| 13326 | |
| 13327 }); | |
| 13328 | |
| 13329 | |
| 13330 unittest.group("resource-CitiesResourceApi", () { | |
| 13331 unittest.test("method--list", () { | |
| 13332 | |
| 13333 var mock = new HttpServerMock(); | |
| 13334 api.CitiesResourceApi res = new api.DfareportingApi(mock).cities; | |
| 13335 var arg_profileId = "foo"; | |
| 13336 var arg_countryDartIds = buildUnnamed3241(); | |
| 13337 var arg_dartIds = buildUnnamed3242(); | |
| 13338 var arg_namePrefix = "foo"; | |
| 13339 var arg_regionDartIds = buildUnnamed3243(); | |
| 13340 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13341 var path = (req.url).path; | |
| 13342 var pathOffset = 0; | |
| 13343 var index; | |
| 13344 var subPart; | |
| 13345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13346 pathOffset += 1; | |
| 13347 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13348 pathOffset += 18; | |
| 13349 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13350 pathOffset += 13; | |
| 13351 index = path.indexOf("/cities", pathOffset); | |
| 13352 unittest.expect(index >= 0, unittest.isTrue); | |
| 13353 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13354 pathOffset = index; | |
| 13355 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13356 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/cities")); | |
| 13357 pathOffset += 7; | |
| 13358 | |
| 13359 var query = (req.url).query; | |
| 13360 var queryOffset = 0; | |
| 13361 var queryMap = {}; | |
| 13362 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13363 parseBool(n) { | |
| 13364 if (n == "true") return true; | |
| 13365 if (n == "false") return false; | |
| 13366 if (n == null) return null; | |
| 13367 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13368 } | |
| 13369 if (query.length > 0) { | |
| 13370 for (var part in query.split("&")) { | |
| 13371 var keyvalue = part.split("="); | |
| 13372 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13373 } | |
| 13374 } | |
| 13375 unittest.expect(queryMap["countryDartIds"], unittest.equals(arg_countryD
artIds)); | |
| 13376 unittest.expect(queryMap["dartIds"], unittest.equals(arg_dartIds)); | |
| 13377 unittest.expect(queryMap["namePrefix"].first, unittest.equals(arg_namePr
efix)); | |
| 13378 unittest.expect(queryMap["regionDartIds"], unittest.equals(arg_regionDar
tIds)); | |
| 13379 | |
| 13380 | |
| 13381 var h = { | |
| 13382 "content-type" : "application/json; charset=utf-8", | |
| 13383 }; | |
| 13384 var resp = convert.JSON.encode(buildCitiesListResponse()); | |
| 13385 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13386 }), true); | |
| 13387 res.list(arg_profileId, countryDartIds: arg_countryDartIds, dartIds: arg_d
artIds, namePrefix: arg_namePrefix, regionDartIds: arg_regionDartIds).then(unitt
est.expectAsync(((api.CitiesListResponse response) { | |
| 13388 checkCitiesListResponse(response); | |
| 13389 }))); | |
| 13390 }); | |
| 13391 | |
| 13392 }); | |
| 13393 | |
| 13394 | |
| 13395 unittest.group("resource-ConnectionTypesResourceApi", () { | |
| 13396 unittest.test("method--get", () { | |
| 13397 | |
| 13398 var mock = new HttpServerMock(); | |
| 13399 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13400 var arg_profileId = "foo"; | |
| 13401 var arg_id = "foo"; | |
| 13402 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13403 var path = (req.url).path; | |
| 13404 var pathOffset = 0; | |
| 13405 var index; | |
| 13406 var subPart; | |
| 13407 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13408 pathOffset += 1; | |
| 13409 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13410 pathOffset += 18; | |
| 13411 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13412 pathOffset += 13; | |
| 13413 index = path.indexOf("/connectionTypes/", pathOffset); | |
| 13414 unittest.expect(index >= 0, unittest.isTrue); | |
| 13415 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13416 pathOffset = index; | |
| 13417 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13418 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/connectionTypes/")); | |
| 13419 pathOffset += 17; | |
| 13420 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13421 pathOffset = path.length; | |
| 13422 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13423 | |
| 13424 var query = (req.url).query; | |
| 13425 var queryOffset = 0; | |
| 13426 var queryMap = {}; | |
| 13427 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13428 parseBool(n) { | |
| 13429 if (n == "true") return true; | |
| 13430 if (n == "false") return false; | |
| 13431 if (n == null) return null; | |
| 13432 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13433 } | |
| 13434 if (query.length > 0) { | |
| 13435 for (var part in query.split("&")) { | |
| 13436 var keyvalue = part.split("="); | |
| 13437 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13438 } | |
| 13439 } | |
| 13440 | |
| 13441 | |
| 13442 var h = { | |
| 13443 "content-type" : "application/json; charset=utf-8", | |
| 13444 }; | |
| 13445 var resp = convert.JSON.encode(buildConnectionType()); | |
| 13446 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13447 }), true); | |
| 13448 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ConnectionT
ype response) { | |
| 13449 checkConnectionType(response); | |
| 13450 }))); | |
| 13451 }); | |
| 13452 | |
| 13453 unittest.test("method--list", () { | |
| 13454 | |
| 13455 var mock = new HttpServerMock(); | |
| 13456 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13457 var arg_profileId = "foo"; | |
| 13458 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13459 var path = (req.url).path; | |
| 13460 var pathOffset = 0; | |
| 13461 var index; | |
| 13462 var subPart; | |
| 13463 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13464 pathOffset += 1; | |
| 13465 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13466 pathOffset += 18; | |
| 13467 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13468 pathOffset += 13; | |
| 13469 index = path.indexOf("/connectionTypes", pathOffset); | |
| 13470 unittest.expect(index >= 0, unittest.isTrue); | |
| 13471 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13472 pathOffset = index; | |
| 13473 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13474 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/connectionTypes")); | |
| 13475 pathOffset += 16; | |
| 13476 | |
| 13477 var query = (req.url).query; | |
| 13478 var queryOffset = 0; | |
| 13479 var queryMap = {}; | |
| 13480 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13481 parseBool(n) { | |
| 13482 if (n == "true") return true; | |
| 13483 if (n == "false") return false; | |
| 13484 if (n == null) return null; | |
| 13485 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13486 } | |
| 13487 if (query.length > 0) { | |
| 13488 for (var part in query.split("&")) { | |
| 13489 var keyvalue = part.split("="); | |
| 13490 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13491 } | |
| 13492 } | |
| 13493 | |
| 13494 | |
| 13495 var h = { | |
| 13496 "content-type" : "application/json; charset=utf-8", | |
| 13497 }; | |
| 13498 var resp = convert.JSON.encode(buildConnectionTypesListResponse()); | |
| 13499 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13500 }), true); | |
| 13501 res.list(arg_profileId).then(unittest.expectAsync(((api.ConnectionTypesLis
tResponse response) { | |
| 13502 checkConnectionTypesListResponse(response); | |
| 13503 }))); | |
| 13504 }); | |
| 13505 | |
| 13506 }); | |
| 13507 | |
| 13508 | |
| 13509 unittest.group("resource-ContentCategoriesResourceApi", () { | |
| 13510 unittest.test("method--delete", () { | |
| 13511 | |
| 13512 var mock = new HttpServerMock(); | |
| 13513 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13514 var arg_profileId = "foo"; | |
| 13515 var arg_id = "foo"; | |
| 13516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13517 var path = (req.url).path; | |
| 13518 var pathOffset = 0; | |
| 13519 var index; | |
| 13520 var subPart; | |
| 13521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13522 pathOffset += 1; | |
| 13523 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13524 pathOffset += 18; | |
| 13525 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13526 pathOffset += 13; | |
| 13527 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13528 unittest.expect(index >= 0, unittest.isTrue); | |
| 13529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13530 pathOffset = index; | |
| 13531 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13532 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13533 pathOffset += 19; | |
| 13534 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13535 pathOffset = path.length; | |
| 13536 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13537 | |
| 13538 var query = (req.url).query; | |
| 13539 var queryOffset = 0; | |
| 13540 var queryMap = {}; | |
| 13541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13542 parseBool(n) { | |
| 13543 if (n == "true") return true; | |
| 13544 if (n == "false") return false; | |
| 13545 if (n == null) return null; | |
| 13546 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13547 } | |
| 13548 if (query.length > 0) { | |
| 13549 for (var part in query.split("&")) { | |
| 13550 var keyvalue = part.split("="); | |
| 13551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13552 } | |
| 13553 } | |
| 13554 | |
| 13555 | |
| 13556 var h = { | |
| 13557 "content-type" : "application/json; charset=utf-8", | |
| 13558 }; | |
| 13559 var resp = ""; | |
| 13560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13561 }), true); | |
| 13562 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 13563 }); | |
| 13564 | |
| 13565 unittest.test("method--get", () { | |
| 13566 | |
| 13567 var mock = new HttpServerMock(); | |
| 13568 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13569 var arg_profileId = "foo"; | |
| 13570 var arg_id = "foo"; | |
| 13571 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13572 var path = (req.url).path; | |
| 13573 var pathOffset = 0; | |
| 13574 var index; | |
| 13575 var subPart; | |
| 13576 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13577 pathOffset += 1; | |
| 13578 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13579 pathOffset += 18; | |
| 13580 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13581 pathOffset += 13; | |
| 13582 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13583 unittest.expect(index >= 0, unittest.isTrue); | |
| 13584 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13585 pathOffset = index; | |
| 13586 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13587 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13588 pathOffset += 19; | |
| 13589 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13590 pathOffset = path.length; | |
| 13591 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13592 | |
| 13593 var query = (req.url).query; | |
| 13594 var queryOffset = 0; | |
| 13595 var queryMap = {}; | |
| 13596 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13597 parseBool(n) { | |
| 13598 if (n == "true") return true; | |
| 13599 if (n == "false") return false; | |
| 13600 if (n == null) return null; | |
| 13601 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13602 } | |
| 13603 if (query.length > 0) { | |
| 13604 for (var part in query.split("&")) { | |
| 13605 var keyvalue = part.split("="); | |
| 13606 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13607 } | |
| 13608 } | |
| 13609 | |
| 13610 | |
| 13611 var h = { | |
| 13612 "content-type" : "application/json; charset=utf-8", | |
| 13613 }; | |
| 13614 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13615 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13616 }), true); | |
| 13617 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ContentCate
gory response) { | |
| 13618 checkContentCategory(response); | |
| 13619 }))); | |
| 13620 }); | |
| 13621 | |
| 13622 unittest.test("method--insert", () { | |
| 13623 | |
| 13624 var mock = new HttpServerMock(); | |
| 13625 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13626 var arg_request = buildContentCategory(); | |
| 13627 var arg_profileId = "foo"; | |
| 13628 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13629 var obj = new api.ContentCategory.fromJson(json); | |
| 13630 checkContentCategory(obj); | |
| 13631 | |
| 13632 var path = (req.url).path; | |
| 13633 var pathOffset = 0; | |
| 13634 var index; | |
| 13635 var subPart; | |
| 13636 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13637 pathOffset += 1; | |
| 13638 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13639 pathOffset += 18; | |
| 13640 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13641 pathOffset += 13; | |
| 13642 index = path.indexOf("/contentCategories", pathOffset); | |
| 13643 unittest.expect(index >= 0, unittest.isTrue); | |
| 13644 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13645 pathOffset = index; | |
| 13646 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13647 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13648 pathOffset += 18; | |
| 13649 | |
| 13650 var query = (req.url).query; | |
| 13651 var queryOffset = 0; | |
| 13652 var queryMap = {}; | |
| 13653 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13654 parseBool(n) { | |
| 13655 if (n == "true") return true; | |
| 13656 if (n == "false") return false; | |
| 13657 if (n == null) return null; | |
| 13658 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13659 } | |
| 13660 if (query.length > 0) { | |
| 13661 for (var part in query.split("&")) { | |
| 13662 var keyvalue = part.split("="); | |
| 13663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13664 } | |
| 13665 } | |
| 13666 | |
| 13667 | |
| 13668 var h = { | |
| 13669 "content-type" : "application/json; charset=utf-8", | |
| 13670 }; | |
| 13671 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13672 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13673 }), true); | |
| 13674 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13675 checkContentCategory(response); | |
| 13676 }))); | |
| 13677 }); | |
| 13678 | |
| 13679 unittest.test("method--list", () { | |
| 13680 | |
| 13681 var mock = new HttpServerMock(); | |
| 13682 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13683 var arg_profileId = "foo"; | |
| 13684 var arg_ids = buildUnnamed3244(); | |
| 13685 var arg_maxResults = 42; | |
| 13686 var arg_pageToken = "foo"; | |
| 13687 var arg_searchString = "foo"; | |
| 13688 var arg_sortField = "foo"; | |
| 13689 var arg_sortOrder = "foo"; | |
| 13690 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13691 var path = (req.url).path; | |
| 13692 var pathOffset = 0; | |
| 13693 var index; | |
| 13694 var subPart; | |
| 13695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13696 pathOffset += 1; | |
| 13697 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13698 pathOffset += 18; | |
| 13699 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13700 pathOffset += 13; | |
| 13701 index = path.indexOf("/contentCategories", pathOffset); | |
| 13702 unittest.expect(index >= 0, unittest.isTrue); | |
| 13703 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13704 pathOffset = index; | |
| 13705 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13706 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13707 pathOffset += 18; | |
| 13708 | |
| 13709 var query = (req.url).query; | |
| 13710 var queryOffset = 0; | |
| 13711 var queryMap = {}; | |
| 13712 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13713 parseBool(n) { | |
| 13714 if (n == "true") return true; | |
| 13715 if (n == "false") return false; | |
| 13716 if (n == null) return null; | |
| 13717 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13718 } | |
| 13719 if (query.length > 0) { | |
| 13720 for (var part in query.split("&")) { | |
| 13721 var keyvalue = part.split("="); | |
| 13722 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13723 } | |
| 13724 } | |
| 13725 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13726 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13727 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13728 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13729 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13730 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13731 | |
| 13732 | |
| 13733 var h = { | |
| 13734 "content-type" : "application/json; charset=utf-8", | |
| 13735 }; | |
| 13736 var resp = convert.JSON.encode(buildContentCategoriesListResponse()); | |
| 13737 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13738 }), true); | |
| 13739 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) { | |
| 13740 checkContentCategoriesListResponse(response); | |
| 13741 }))); | |
| 13742 }); | |
| 13743 | |
| 13744 unittest.test("method--patch", () { | |
| 13745 | |
| 13746 var mock = new HttpServerMock(); | |
| 13747 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13748 var arg_request = buildContentCategory(); | |
| 13749 var arg_profileId = "foo"; | |
| 13750 var arg_id = "foo"; | |
| 13751 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13752 var obj = new api.ContentCategory.fromJson(json); | |
| 13753 checkContentCategory(obj); | |
| 13754 | |
| 13755 var path = (req.url).path; | |
| 13756 var pathOffset = 0; | |
| 13757 var index; | |
| 13758 var subPart; | |
| 13759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13760 pathOffset += 1; | |
| 13761 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13762 pathOffset += 18; | |
| 13763 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13764 pathOffset += 13; | |
| 13765 index = path.indexOf("/contentCategories", pathOffset); | |
| 13766 unittest.expect(index >= 0, unittest.isTrue); | |
| 13767 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13768 pathOffset = index; | |
| 13769 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13770 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13771 pathOffset += 18; | |
| 13772 | |
| 13773 var query = (req.url).query; | |
| 13774 var queryOffset = 0; | |
| 13775 var queryMap = {}; | |
| 13776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13777 parseBool(n) { | |
| 13778 if (n == "true") return true; | |
| 13779 if (n == "false") return false; | |
| 13780 if (n == null) return null; | |
| 13781 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13782 } | |
| 13783 if (query.length > 0) { | |
| 13784 for (var part in query.split("&")) { | |
| 13785 var keyvalue = part.split("="); | |
| 13786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13787 } | |
| 13788 } | |
| 13789 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13790 | |
| 13791 | |
| 13792 var h = { | |
| 13793 "content-type" : "application/json; charset=utf-8", | |
| 13794 }; | |
| 13795 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13796 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13797 }), true); | |
| 13798 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.ContentCategory response) { | |
| 13799 checkContentCategory(response); | |
| 13800 }))); | |
| 13801 }); | |
| 13802 | |
| 13803 unittest.test("method--update", () { | |
| 13804 | |
| 13805 var mock = new HttpServerMock(); | |
| 13806 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13807 var arg_request = buildContentCategory(); | |
| 13808 var arg_profileId = "foo"; | |
| 13809 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13810 var obj = new api.ContentCategory.fromJson(json); | |
| 13811 checkContentCategory(obj); | |
| 13812 | |
| 13813 var path = (req.url).path; | |
| 13814 var pathOffset = 0; | |
| 13815 var index; | |
| 13816 var subPart; | |
| 13817 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13818 pathOffset += 1; | |
| 13819 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13820 pathOffset += 18; | |
| 13821 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13822 pathOffset += 13; | |
| 13823 index = path.indexOf("/contentCategories", pathOffset); | |
| 13824 unittest.expect(index >= 0, unittest.isTrue); | |
| 13825 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13826 pathOffset = index; | |
| 13827 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13828 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13829 pathOffset += 18; | |
| 13830 | |
| 13831 var query = (req.url).query; | |
| 13832 var queryOffset = 0; | |
| 13833 var queryMap = {}; | |
| 13834 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13835 parseBool(n) { | |
| 13836 if (n == "true") return true; | |
| 13837 if (n == "false") return false; | |
| 13838 if (n == null) return null; | |
| 13839 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13840 } | |
| 13841 if (query.length > 0) { | |
| 13842 for (var part in query.split("&")) { | |
| 13843 var keyvalue = part.split("="); | |
| 13844 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13845 } | |
| 13846 } | |
| 13847 | |
| 13848 | |
| 13849 var h = { | |
| 13850 "content-type" : "application/json; charset=utf-8", | |
| 13851 }; | |
| 13852 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13853 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13854 }), true); | |
| 13855 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13856 checkContentCategory(response); | |
| 13857 }))); | |
| 13858 }); | |
| 13859 | |
| 13860 }); | |
| 13861 | |
| 13862 | |
| 13863 unittest.group("resource-CountriesResourceApi", () { | |
| 13864 unittest.test("method--get", () { | |
| 13865 | |
| 13866 var mock = new HttpServerMock(); | |
| 13867 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13868 var arg_profileId = "foo"; | |
| 13869 var arg_dartId = "foo"; | |
| 13870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13871 var path = (req.url).path; | |
| 13872 var pathOffset = 0; | |
| 13873 var index; | |
| 13874 var subPart; | |
| 13875 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13876 pathOffset += 1; | |
| 13877 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13878 pathOffset += 18; | |
| 13879 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13880 pathOffset += 13; | |
| 13881 index = path.indexOf("/countries/", pathOffset); | |
| 13882 unittest.expect(index >= 0, unittest.isTrue); | |
| 13883 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13884 pathOffset = index; | |
| 13885 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13886 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/countries/")); | |
| 13887 pathOffset += 11; | |
| 13888 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13889 pathOffset = path.length; | |
| 13890 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 13891 | |
| 13892 var query = (req.url).query; | |
| 13893 var queryOffset = 0; | |
| 13894 var queryMap = {}; | |
| 13895 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13896 parseBool(n) { | |
| 13897 if (n == "true") return true; | |
| 13898 if (n == "false") return false; | |
| 13899 if (n == null) return null; | |
| 13900 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13901 } | |
| 13902 if (query.length > 0) { | |
| 13903 for (var part in query.split("&")) { | |
| 13904 var keyvalue = part.split("="); | |
| 13905 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13906 } | |
| 13907 } | |
| 13908 | |
| 13909 | |
| 13910 var h = { | |
| 13911 "content-type" : "application/json; charset=utf-8", | |
| 13912 }; | |
| 13913 var resp = convert.JSON.encode(buildCountry()); | |
| 13914 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13915 }), true); | |
| 13916 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Country
response) { | |
| 13917 checkCountry(response); | |
| 13918 }))); | |
| 13919 }); | |
| 13920 | |
| 13921 unittest.test("method--list", () { | |
| 13922 | |
| 13923 var mock = new HttpServerMock(); | |
| 13924 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13925 var arg_profileId = "foo"; | |
| 13926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13927 var path = (req.url).path; | |
| 13928 var pathOffset = 0; | |
| 13929 var index; | |
| 13930 var subPart; | |
| 13931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13932 pathOffset += 1; | |
| 13933 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13934 pathOffset += 18; | |
| 13935 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13936 pathOffset += 13; | |
| 13937 index = path.indexOf("/countries", pathOffset); | |
| 13938 unittest.expect(index >= 0, unittest.isTrue); | |
| 13939 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13940 pathOffset = index; | |
| 13941 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13942 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/countries")); | |
| 13943 pathOffset += 10; | |
| 13944 | |
| 13945 var query = (req.url).query; | |
| 13946 var queryOffset = 0; | |
| 13947 var queryMap = {}; | |
| 13948 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13949 parseBool(n) { | |
| 13950 if (n == "true") return true; | |
| 13951 if (n == "false") return false; | |
| 13952 if (n == null) return null; | |
| 13953 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13954 } | |
| 13955 if (query.length > 0) { | |
| 13956 for (var part in query.split("&")) { | |
| 13957 var keyvalue = part.split("="); | |
| 13958 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13959 } | |
| 13960 } | |
| 13961 | |
| 13962 | |
| 13963 var h = { | |
| 13964 "content-type" : "application/json; charset=utf-8", | |
| 13965 }; | |
| 13966 var resp = convert.JSON.encode(buildCountriesListResponse()); | |
| 13967 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13968 }), true); | |
| 13969 res.list(arg_profileId).then(unittest.expectAsync(((api.CountriesListRespo
nse response) { | |
| 13970 checkCountriesListResponse(response); | |
| 13971 }))); | |
| 13972 }); | |
| 13973 | |
| 13974 }); | |
| 13975 | |
| 13976 | |
| 13977 unittest.group("resource-CreativeAssetsResourceApi", () { | |
| 13978 unittest.test("method--insert", () { | |
| 13979 // TODO: Implement tests for media upload; | |
| 13980 // TODO: Implement tests for media download; | |
| 13981 | |
| 13982 var mock = new HttpServerMock(); | |
| 13983 api.CreativeAssetsResourceApi res = new api.DfareportingApi(mock).creative
Assets; | |
| 13984 var arg_request = buildCreativeAssetMetadata(); | |
| 13985 var arg_profileId = "foo"; | |
| 13986 var arg_advertiserId = "foo"; | |
| 13987 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13988 var obj = new api.CreativeAssetMetadata.fromJson(json); | |
| 13989 checkCreativeAssetMetadata(obj); | |
| 13990 | |
| 13991 var path = (req.url).path; | |
| 13992 var pathOffset = 0; | |
| 13993 var index; | |
| 13994 var subPart; | |
| 13995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13996 pathOffset += 1; | |
| 13997 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 13998 pathOffset += 18; | |
| 13999 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14000 pathOffset += 13; | |
| 14001 index = path.indexOf("/creativeAssets/", pathOffset); | |
| 14002 unittest.expect(index >= 0, unittest.isTrue); | |
| 14003 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14004 pathOffset = index; | |
| 14005 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14006 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeAssets/")); | |
| 14007 pathOffset += 16; | |
| 14008 index = path.indexOf("/creativeAssets", pathOffset); | |
| 14009 unittest.expect(index >= 0, unittest.isTrue); | |
| 14010 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14011 pathOffset = index; | |
| 14012 unittest.expect(subPart, unittest.equals("$arg_advertiserId")); | |
| 14013 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeAssets")); | |
| 14014 pathOffset += 15; | |
| 14015 | |
| 14016 var query = (req.url).query; | |
| 14017 var queryOffset = 0; | |
| 14018 var queryMap = {}; | |
| 14019 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14020 parseBool(n) { | |
| 14021 if (n == "true") return true; | |
| 14022 if (n == "false") return false; | |
| 14023 if (n == null) return null; | |
| 14024 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14025 } | |
| 14026 if (query.length > 0) { | |
| 14027 for (var part in query.split("&")) { | |
| 14028 var keyvalue = part.split("="); | |
| 14029 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14030 } | |
| 14031 } | |
| 14032 | |
| 14033 | |
| 14034 var h = { | |
| 14035 "content-type" : "application/json; charset=utf-8", | |
| 14036 }; | |
| 14037 var resp = convert.JSON.encode(buildCreativeAssetMetadata()); | |
| 14038 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14039 }), true); | |
| 14040 res.insert(arg_request, arg_profileId, arg_advertiserId).then(unittest.exp
ectAsync(((api.CreativeAssetMetadata response) { | |
| 14041 checkCreativeAssetMetadata(response); | |
| 14042 }))); | |
| 14043 }); | |
| 14044 | |
| 14045 }); | |
| 14046 | |
| 14047 | |
| 14048 unittest.group("resource-CreativeFieldValuesResourceApi", () { | |
| 14049 unittest.test("method--delete", () { | |
| 14050 | |
| 14051 var mock = new HttpServerMock(); | |
| 14052 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14053 var arg_profileId = "foo"; | |
| 14054 var arg_creativeFieldId = "foo"; | |
| 14055 var arg_id = "foo"; | |
| 14056 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14057 var path = (req.url).path; | |
| 14058 var pathOffset = 0; | |
| 14059 var index; | |
| 14060 var subPart; | |
| 14061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14062 pathOffset += 1; | |
| 14063 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14064 pathOffset += 18; | |
| 14065 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14066 pathOffset += 13; | |
| 14067 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14068 unittest.expect(index >= 0, unittest.isTrue); | |
| 14069 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14070 pathOffset = index; | |
| 14071 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14072 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14073 pathOffset += 16; | |
| 14074 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14075 unittest.expect(index >= 0, unittest.isTrue); | |
| 14076 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14077 pathOffset = index; | |
| 14078 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14079 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14080 pathOffset += 21; | |
| 14081 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14082 pathOffset = path.length; | |
| 14083 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14084 | |
| 14085 var query = (req.url).query; | |
| 14086 var queryOffset = 0; | |
| 14087 var queryMap = {}; | |
| 14088 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14089 parseBool(n) { | |
| 14090 if (n == "true") return true; | |
| 14091 if (n == "false") return false; | |
| 14092 if (n == null) return null; | |
| 14093 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14094 } | |
| 14095 if (query.length > 0) { | |
| 14096 for (var part in query.split("&")) { | |
| 14097 var keyvalue = part.split("="); | |
| 14098 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14099 } | |
| 14100 } | |
| 14101 | |
| 14102 | |
| 14103 var h = { | |
| 14104 "content-type" : "application/json; charset=utf-8", | |
| 14105 }; | |
| 14106 var resp = ""; | |
| 14107 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14108 }), true); | |
| 14109 res.delete(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expec
tAsync((_) {})); | |
| 14110 }); | |
| 14111 | |
| 14112 unittest.test("method--get", () { | |
| 14113 | |
| 14114 var mock = new HttpServerMock(); | |
| 14115 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14116 var arg_profileId = "foo"; | |
| 14117 var arg_creativeFieldId = "foo"; | |
| 14118 var arg_id = "foo"; | |
| 14119 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14120 var path = (req.url).path; | |
| 14121 var pathOffset = 0; | |
| 14122 var index; | |
| 14123 var subPart; | |
| 14124 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14125 pathOffset += 1; | |
| 14126 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14127 pathOffset += 18; | |
| 14128 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14129 pathOffset += 13; | |
| 14130 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14131 unittest.expect(index >= 0, unittest.isTrue); | |
| 14132 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14133 pathOffset = index; | |
| 14134 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14135 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14136 pathOffset += 16; | |
| 14137 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14138 unittest.expect(index >= 0, unittest.isTrue); | |
| 14139 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14140 pathOffset = index; | |
| 14141 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14142 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14143 pathOffset += 21; | |
| 14144 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14145 pathOffset = path.length; | |
| 14146 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14147 | |
| 14148 var query = (req.url).query; | |
| 14149 var queryOffset = 0; | |
| 14150 var queryMap = {}; | |
| 14151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14152 parseBool(n) { | |
| 14153 if (n == "true") return true; | |
| 14154 if (n == "false") return false; | |
| 14155 if (n == null) return null; | |
| 14156 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14157 } | |
| 14158 if (query.length > 0) { | |
| 14159 for (var part in query.split("&")) { | |
| 14160 var keyvalue = part.split("="); | |
| 14161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14162 } | |
| 14163 } | |
| 14164 | |
| 14165 | |
| 14166 var h = { | |
| 14167 "content-type" : "application/json; charset=utf-8", | |
| 14168 }; | |
| 14169 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14170 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14171 }), true); | |
| 14172 res.get(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expectAs
ync(((api.CreativeFieldValue response) { | |
| 14173 checkCreativeFieldValue(response); | |
| 14174 }))); | |
| 14175 }); | |
| 14176 | |
| 14177 unittest.test("method--insert", () { | |
| 14178 | |
| 14179 var mock = new HttpServerMock(); | |
| 14180 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14181 var arg_request = buildCreativeFieldValue(); | |
| 14182 var arg_profileId = "foo"; | |
| 14183 var arg_creativeFieldId = "foo"; | |
| 14184 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14185 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14186 checkCreativeFieldValue(obj); | |
| 14187 | |
| 14188 var path = (req.url).path; | |
| 14189 var pathOffset = 0; | |
| 14190 var index; | |
| 14191 var subPart; | |
| 14192 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14193 pathOffset += 1; | |
| 14194 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14195 pathOffset += 18; | |
| 14196 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14197 pathOffset += 13; | |
| 14198 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14199 unittest.expect(index >= 0, unittest.isTrue); | |
| 14200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14201 pathOffset = index; | |
| 14202 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14203 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14204 pathOffset += 16; | |
| 14205 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14206 unittest.expect(index >= 0, unittest.isTrue); | |
| 14207 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14208 pathOffset = index; | |
| 14209 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14210 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14211 pathOffset += 20; | |
| 14212 | |
| 14213 var query = (req.url).query; | |
| 14214 var queryOffset = 0; | |
| 14215 var queryMap = {}; | |
| 14216 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14217 parseBool(n) { | |
| 14218 if (n == "true") return true; | |
| 14219 if (n == "false") return false; | |
| 14220 if (n == null) return null; | |
| 14221 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14222 } | |
| 14223 if (query.length > 0) { | |
| 14224 for (var part in query.split("&")) { | |
| 14225 var keyvalue = part.split("="); | |
| 14226 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14227 } | |
| 14228 } | |
| 14229 | |
| 14230 | |
| 14231 var h = { | |
| 14232 "content-type" : "application/json; charset=utf-8", | |
| 14233 }; | |
| 14234 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14235 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14236 }), true); | |
| 14237 res.insert(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14238 checkCreativeFieldValue(response); | |
| 14239 }))); | |
| 14240 }); | |
| 14241 | |
| 14242 unittest.test("method--list", () { | |
| 14243 | |
| 14244 var mock = new HttpServerMock(); | |
| 14245 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14246 var arg_profileId = "foo"; | |
| 14247 var arg_creativeFieldId = "foo"; | |
| 14248 var arg_ids = buildUnnamed3245(); | |
| 14249 var arg_maxResults = 42; | |
| 14250 var arg_pageToken = "foo"; | |
| 14251 var arg_searchString = "foo"; | |
| 14252 var arg_sortField = "foo"; | |
| 14253 var arg_sortOrder = "foo"; | |
| 14254 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14255 var path = (req.url).path; | |
| 14256 var pathOffset = 0; | |
| 14257 var index; | |
| 14258 var subPart; | |
| 14259 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14260 pathOffset += 1; | |
| 14261 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14262 pathOffset += 18; | |
| 14263 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14264 pathOffset += 13; | |
| 14265 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14266 unittest.expect(index >= 0, unittest.isTrue); | |
| 14267 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14268 pathOffset = index; | |
| 14269 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14270 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14271 pathOffset += 16; | |
| 14272 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14273 unittest.expect(index >= 0, unittest.isTrue); | |
| 14274 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14275 pathOffset = index; | |
| 14276 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14277 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14278 pathOffset += 20; | |
| 14279 | |
| 14280 var query = (req.url).query; | |
| 14281 var queryOffset = 0; | |
| 14282 var queryMap = {}; | |
| 14283 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14284 parseBool(n) { | |
| 14285 if (n == "true") return true; | |
| 14286 if (n == "false") return false; | |
| 14287 if (n == null) return null; | |
| 14288 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14289 } | |
| 14290 if (query.length > 0) { | |
| 14291 for (var part in query.split("&")) { | |
| 14292 var keyvalue = part.split("="); | |
| 14293 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14294 } | |
| 14295 } | |
| 14296 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14297 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14298 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14299 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14300 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14301 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14302 | |
| 14303 | |
| 14304 var h = { | |
| 14305 "content-type" : "application/json; charset=utf-8", | |
| 14306 }; | |
| 14307 var resp = convert.JSON.encode(buildCreativeFieldValuesListResponse()); | |
| 14308 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14309 }), true); | |
| 14310 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) { | |
| 14311 checkCreativeFieldValuesListResponse(response); | |
| 14312 }))); | |
| 14313 }); | |
| 14314 | |
| 14315 unittest.test("method--patch", () { | |
| 14316 | |
| 14317 var mock = new HttpServerMock(); | |
| 14318 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14319 var arg_request = buildCreativeFieldValue(); | |
| 14320 var arg_profileId = "foo"; | |
| 14321 var arg_creativeFieldId = "foo"; | |
| 14322 var arg_id = "foo"; | |
| 14323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14324 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14325 checkCreativeFieldValue(obj); | |
| 14326 | |
| 14327 var path = (req.url).path; | |
| 14328 var pathOffset = 0; | |
| 14329 var index; | |
| 14330 var subPart; | |
| 14331 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14332 pathOffset += 1; | |
| 14333 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14334 pathOffset += 18; | |
| 14335 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14336 pathOffset += 13; | |
| 14337 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14338 unittest.expect(index >= 0, unittest.isTrue); | |
| 14339 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14340 pathOffset = index; | |
| 14341 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14342 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14343 pathOffset += 16; | |
| 14344 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14345 unittest.expect(index >= 0, unittest.isTrue); | |
| 14346 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14347 pathOffset = index; | |
| 14348 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14349 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14350 pathOffset += 20; | |
| 14351 | |
| 14352 var query = (req.url).query; | |
| 14353 var queryOffset = 0; | |
| 14354 var queryMap = {}; | |
| 14355 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14356 parseBool(n) { | |
| 14357 if (n == "true") return true; | |
| 14358 if (n == "false") return false; | |
| 14359 if (n == null) return null; | |
| 14360 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14361 } | |
| 14362 if (query.length > 0) { | |
| 14363 for (var part in query.split("&")) { | |
| 14364 var keyvalue = part.split("="); | |
| 14365 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14366 } | |
| 14367 } | |
| 14368 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14369 | |
| 14370 | |
| 14371 var h = { | |
| 14372 "content-type" : "application/json; charset=utf-8", | |
| 14373 }; | |
| 14374 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14375 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14376 }), true); | |
| 14377 res.patch(arg_request, arg_profileId, arg_creativeFieldId, arg_id).then(un
ittest.expectAsync(((api.CreativeFieldValue response) { | |
| 14378 checkCreativeFieldValue(response); | |
| 14379 }))); | |
| 14380 }); | |
| 14381 | |
| 14382 unittest.test("method--update", () { | |
| 14383 | |
| 14384 var mock = new HttpServerMock(); | |
| 14385 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14386 var arg_request = buildCreativeFieldValue(); | |
| 14387 var arg_profileId = "foo"; | |
| 14388 var arg_creativeFieldId = "foo"; | |
| 14389 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14390 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14391 checkCreativeFieldValue(obj); | |
| 14392 | |
| 14393 var path = (req.url).path; | |
| 14394 var pathOffset = 0; | |
| 14395 var index; | |
| 14396 var subPart; | |
| 14397 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14398 pathOffset += 1; | |
| 14399 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14400 pathOffset += 18; | |
| 14401 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14402 pathOffset += 13; | |
| 14403 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14404 unittest.expect(index >= 0, unittest.isTrue); | |
| 14405 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14406 pathOffset = index; | |
| 14407 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14408 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14409 pathOffset += 16; | |
| 14410 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14411 unittest.expect(index >= 0, unittest.isTrue); | |
| 14412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14413 pathOffset = index; | |
| 14414 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14415 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14416 pathOffset += 20; | |
| 14417 | |
| 14418 var query = (req.url).query; | |
| 14419 var queryOffset = 0; | |
| 14420 var queryMap = {}; | |
| 14421 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14422 parseBool(n) { | |
| 14423 if (n == "true") return true; | |
| 14424 if (n == "false") return false; | |
| 14425 if (n == null) return null; | |
| 14426 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14427 } | |
| 14428 if (query.length > 0) { | |
| 14429 for (var part in query.split("&")) { | |
| 14430 var keyvalue = part.split("="); | |
| 14431 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14432 } | |
| 14433 } | |
| 14434 | |
| 14435 | |
| 14436 var h = { | |
| 14437 "content-type" : "application/json; charset=utf-8", | |
| 14438 }; | |
| 14439 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14440 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14441 }), true); | |
| 14442 res.update(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14443 checkCreativeFieldValue(response); | |
| 14444 }))); | |
| 14445 }); | |
| 14446 | |
| 14447 }); | |
| 14448 | |
| 14449 | |
| 14450 unittest.group("resource-CreativeFieldsResourceApi", () { | |
| 14451 unittest.test("method--delete", () { | |
| 14452 | |
| 14453 var mock = new HttpServerMock(); | |
| 14454 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14455 var arg_profileId = "foo"; | |
| 14456 var arg_id = "foo"; | |
| 14457 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14458 var path = (req.url).path; | |
| 14459 var pathOffset = 0; | |
| 14460 var index; | |
| 14461 var subPart; | |
| 14462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14463 pathOffset += 1; | |
| 14464 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14465 pathOffset += 18; | |
| 14466 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14467 pathOffset += 13; | |
| 14468 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14469 unittest.expect(index >= 0, unittest.isTrue); | |
| 14470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14471 pathOffset = index; | |
| 14472 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14473 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14474 pathOffset += 16; | |
| 14475 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14476 pathOffset = path.length; | |
| 14477 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14478 | |
| 14479 var query = (req.url).query; | |
| 14480 var queryOffset = 0; | |
| 14481 var queryMap = {}; | |
| 14482 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14483 parseBool(n) { | |
| 14484 if (n == "true") return true; | |
| 14485 if (n == "false") return false; | |
| 14486 if (n == null) return null; | |
| 14487 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14488 } | |
| 14489 if (query.length > 0) { | |
| 14490 for (var part in query.split("&")) { | |
| 14491 var keyvalue = part.split("="); | |
| 14492 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14493 } | |
| 14494 } | |
| 14495 | |
| 14496 | |
| 14497 var h = { | |
| 14498 "content-type" : "application/json; charset=utf-8", | |
| 14499 }; | |
| 14500 var resp = ""; | |
| 14501 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14502 }), true); | |
| 14503 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 14504 }); | |
| 14505 | |
| 14506 unittest.test("method--get", () { | |
| 14507 | |
| 14508 var mock = new HttpServerMock(); | |
| 14509 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14510 var arg_profileId = "foo"; | |
| 14511 var arg_id = "foo"; | |
| 14512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14513 var path = (req.url).path; | |
| 14514 var pathOffset = 0; | |
| 14515 var index; | |
| 14516 var subPart; | |
| 14517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14518 pathOffset += 1; | |
| 14519 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14520 pathOffset += 18; | |
| 14521 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14522 pathOffset += 13; | |
| 14523 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14524 unittest.expect(index >= 0, unittest.isTrue); | |
| 14525 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14526 pathOffset = index; | |
| 14527 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14528 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14529 pathOffset += 16; | |
| 14530 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14531 pathOffset = path.length; | |
| 14532 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14533 | |
| 14534 var query = (req.url).query; | |
| 14535 var queryOffset = 0; | |
| 14536 var queryMap = {}; | |
| 14537 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14538 parseBool(n) { | |
| 14539 if (n == "true") return true; | |
| 14540 if (n == "false") return false; | |
| 14541 if (n == null) return null; | |
| 14542 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14543 } | |
| 14544 if (query.length > 0) { | |
| 14545 for (var part in query.split("&")) { | |
| 14546 var keyvalue = part.split("="); | |
| 14547 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14548 } | |
| 14549 } | |
| 14550 | |
| 14551 | |
| 14552 var h = { | |
| 14553 "content-type" : "application/json; charset=utf-8", | |
| 14554 }; | |
| 14555 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14556 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14557 }), true); | |
| 14558 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeFie
ld response) { | |
| 14559 checkCreativeField(response); | |
| 14560 }))); | |
| 14561 }); | |
| 14562 | |
| 14563 unittest.test("method--insert", () { | |
| 14564 | |
| 14565 var mock = new HttpServerMock(); | |
| 14566 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14567 var arg_request = buildCreativeField(); | |
| 14568 var arg_profileId = "foo"; | |
| 14569 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14570 var obj = new api.CreativeField.fromJson(json); | |
| 14571 checkCreativeField(obj); | |
| 14572 | |
| 14573 var path = (req.url).path; | |
| 14574 var pathOffset = 0; | |
| 14575 var index; | |
| 14576 var subPart; | |
| 14577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14578 pathOffset += 1; | |
| 14579 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14580 pathOffset += 18; | |
| 14581 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14582 pathOffset += 13; | |
| 14583 index = path.indexOf("/creativeFields", pathOffset); | |
| 14584 unittest.expect(index >= 0, unittest.isTrue); | |
| 14585 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14586 pathOffset = index; | |
| 14587 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14588 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14589 pathOffset += 15; | |
| 14590 | |
| 14591 var query = (req.url).query; | |
| 14592 var queryOffset = 0; | |
| 14593 var queryMap = {}; | |
| 14594 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14595 parseBool(n) { | |
| 14596 if (n == "true") return true; | |
| 14597 if (n == "false") return false; | |
| 14598 if (n == null) return null; | |
| 14599 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14600 } | |
| 14601 if (query.length > 0) { | |
| 14602 for (var part in query.split("&")) { | |
| 14603 var keyvalue = part.split("="); | |
| 14604 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14605 } | |
| 14606 } | |
| 14607 | |
| 14608 | |
| 14609 var h = { | |
| 14610 "content-type" : "application/json; charset=utf-8", | |
| 14611 }; | |
| 14612 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14613 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14614 }), true); | |
| 14615 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14616 checkCreativeField(response); | |
| 14617 }))); | |
| 14618 }); | |
| 14619 | |
| 14620 unittest.test("method--list", () { | |
| 14621 | |
| 14622 var mock = new HttpServerMock(); | |
| 14623 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14624 var arg_profileId = "foo"; | |
| 14625 var arg_advertiserIds = buildUnnamed3246(); | |
| 14626 var arg_ids = buildUnnamed3247(); | |
| 14627 var arg_maxResults = 42; | |
| 14628 var arg_pageToken = "foo"; | |
| 14629 var arg_searchString = "foo"; | |
| 14630 var arg_sortField = "foo"; | |
| 14631 var arg_sortOrder = "foo"; | |
| 14632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14633 var path = (req.url).path; | |
| 14634 var pathOffset = 0; | |
| 14635 var index; | |
| 14636 var subPart; | |
| 14637 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14638 pathOffset += 1; | |
| 14639 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14640 pathOffset += 18; | |
| 14641 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14642 pathOffset += 13; | |
| 14643 index = path.indexOf("/creativeFields", pathOffset); | |
| 14644 unittest.expect(index >= 0, unittest.isTrue); | |
| 14645 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14646 pathOffset = index; | |
| 14647 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14648 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14649 pathOffset += 15; | |
| 14650 | |
| 14651 var query = (req.url).query; | |
| 14652 var queryOffset = 0; | |
| 14653 var queryMap = {}; | |
| 14654 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14655 parseBool(n) { | |
| 14656 if (n == "true") return true; | |
| 14657 if (n == "false") return false; | |
| 14658 if (n == null) return null; | |
| 14659 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14660 } | |
| 14661 if (query.length > 0) { | |
| 14662 for (var part in query.split("&")) { | |
| 14663 var keyvalue = part.split("="); | |
| 14664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14665 } | |
| 14666 } | |
| 14667 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14668 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14669 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14670 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14671 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14672 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14673 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14674 | |
| 14675 | |
| 14676 var h = { | |
| 14677 "content-type" : "application/json; charset=utf-8", | |
| 14678 }; | |
| 14679 var resp = convert.JSON.encode(buildCreativeFieldsListResponse()); | |
| 14680 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14681 }), true); | |
| 14682 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) { | |
| 14683 checkCreativeFieldsListResponse(response); | |
| 14684 }))); | |
| 14685 }); | |
| 14686 | |
| 14687 unittest.test("method--patch", () { | |
| 14688 | |
| 14689 var mock = new HttpServerMock(); | |
| 14690 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14691 var arg_request = buildCreativeField(); | |
| 14692 var arg_profileId = "foo"; | |
| 14693 var arg_id = "foo"; | |
| 14694 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14695 var obj = new api.CreativeField.fromJson(json); | |
| 14696 checkCreativeField(obj); | |
| 14697 | |
| 14698 var path = (req.url).path; | |
| 14699 var pathOffset = 0; | |
| 14700 var index; | |
| 14701 var subPart; | |
| 14702 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14703 pathOffset += 1; | |
| 14704 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14705 pathOffset += 18; | |
| 14706 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14707 pathOffset += 13; | |
| 14708 index = path.indexOf("/creativeFields", pathOffset); | |
| 14709 unittest.expect(index >= 0, unittest.isTrue); | |
| 14710 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14711 pathOffset = index; | |
| 14712 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14713 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14714 pathOffset += 15; | |
| 14715 | |
| 14716 var query = (req.url).query; | |
| 14717 var queryOffset = 0; | |
| 14718 var queryMap = {}; | |
| 14719 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14720 parseBool(n) { | |
| 14721 if (n == "true") return true; | |
| 14722 if (n == "false") return false; | |
| 14723 if (n == null) return null; | |
| 14724 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14725 } | |
| 14726 if (query.length > 0) { | |
| 14727 for (var part in query.split("&")) { | |
| 14728 var keyvalue = part.split("="); | |
| 14729 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14730 } | |
| 14731 } | |
| 14732 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14733 | |
| 14734 | |
| 14735 var h = { | |
| 14736 "content-type" : "application/json; charset=utf-8", | |
| 14737 }; | |
| 14738 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14739 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14740 }), true); | |
| 14741 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeField response) { | |
| 14742 checkCreativeField(response); | |
| 14743 }))); | |
| 14744 }); | |
| 14745 | |
| 14746 unittest.test("method--update", () { | |
| 14747 | |
| 14748 var mock = new HttpServerMock(); | |
| 14749 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14750 var arg_request = buildCreativeField(); | |
| 14751 var arg_profileId = "foo"; | |
| 14752 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14753 var obj = new api.CreativeField.fromJson(json); | |
| 14754 checkCreativeField(obj); | |
| 14755 | |
| 14756 var path = (req.url).path; | |
| 14757 var pathOffset = 0; | |
| 14758 var index; | |
| 14759 var subPart; | |
| 14760 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14761 pathOffset += 1; | |
| 14762 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14763 pathOffset += 18; | |
| 14764 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14765 pathOffset += 13; | |
| 14766 index = path.indexOf("/creativeFields", pathOffset); | |
| 14767 unittest.expect(index >= 0, unittest.isTrue); | |
| 14768 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14769 pathOffset = index; | |
| 14770 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14771 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14772 pathOffset += 15; | |
| 14773 | |
| 14774 var query = (req.url).query; | |
| 14775 var queryOffset = 0; | |
| 14776 var queryMap = {}; | |
| 14777 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14778 parseBool(n) { | |
| 14779 if (n == "true") return true; | |
| 14780 if (n == "false") return false; | |
| 14781 if (n == null) return null; | |
| 14782 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14783 } | |
| 14784 if (query.length > 0) { | |
| 14785 for (var part in query.split("&")) { | |
| 14786 var keyvalue = part.split("="); | |
| 14787 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14788 } | |
| 14789 } | |
| 14790 | |
| 14791 | |
| 14792 var h = { | |
| 14793 "content-type" : "application/json; charset=utf-8", | |
| 14794 }; | |
| 14795 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14796 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14797 }), true); | |
| 14798 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14799 checkCreativeField(response); | |
| 14800 }))); | |
| 14801 }); | |
| 14802 | |
| 14803 }); | |
| 14804 | |
| 14805 | |
| 14806 unittest.group("resource-CreativeGroupsResourceApi", () { | |
| 14807 unittest.test("method--get", () { | |
| 14808 | |
| 14809 var mock = new HttpServerMock(); | |
| 14810 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14811 var arg_profileId = "foo"; | |
| 14812 var arg_id = "foo"; | |
| 14813 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14814 var path = (req.url).path; | |
| 14815 var pathOffset = 0; | |
| 14816 var index; | |
| 14817 var subPart; | |
| 14818 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14819 pathOffset += 1; | |
| 14820 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14821 pathOffset += 18; | |
| 14822 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14823 pathOffset += 13; | |
| 14824 index = path.indexOf("/creativeGroups/", pathOffset); | |
| 14825 unittest.expect(index >= 0, unittest.isTrue); | |
| 14826 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14827 pathOffset = index; | |
| 14828 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14829 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeGroups/")); | |
| 14830 pathOffset += 16; | |
| 14831 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14832 pathOffset = path.length; | |
| 14833 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14834 | |
| 14835 var query = (req.url).query; | |
| 14836 var queryOffset = 0; | |
| 14837 var queryMap = {}; | |
| 14838 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14839 parseBool(n) { | |
| 14840 if (n == "true") return true; | |
| 14841 if (n == "false") return false; | |
| 14842 if (n == null) return null; | |
| 14843 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14844 } | |
| 14845 if (query.length > 0) { | |
| 14846 for (var part in query.split("&")) { | |
| 14847 var keyvalue = part.split("="); | |
| 14848 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14849 } | |
| 14850 } | |
| 14851 | |
| 14852 | |
| 14853 var h = { | |
| 14854 "content-type" : "application/json; charset=utf-8", | |
| 14855 }; | |
| 14856 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14857 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14858 }), true); | |
| 14859 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeGro
up response) { | |
| 14860 checkCreativeGroup(response); | |
| 14861 }))); | |
| 14862 }); | |
| 14863 | |
| 14864 unittest.test("method--insert", () { | |
| 14865 | |
| 14866 var mock = new HttpServerMock(); | |
| 14867 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14868 var arg_request = buildCreativeGroup(); | |
| 14869 var arg_profileId = "foo"; | |
| 14870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14871 var obj = new api.CreativeGroup.fromJson(json); | |
| 14872 checkCreativeGroup(obj); | |
| 14873 | |
| 14874 var path = (req.url).path; | |
| 14875 var pathOffset = 0; | |
| 14876 var index; | |
| 14877 var subPart; | |
| 14878 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14879 pathOffset += 1; | |
| 14880 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14881 pathOffset += 18; | |
| 14882 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14883 pathOffset += 13; | |
| 14884 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14885 unittest.expect(index >= 0, unittest.isTrue); | |
| 14886 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14887 pathOffset = index; | |
| 14888 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14889 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14890 pathOffset += 15; | |
| 14891 | |
| 14892 var query = (req.url).query; | |
| 14893 var queryOffset = 0; | |
| 14894 var queryMap = {}; | |
| 14895 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14896 parseBool(n) { | |
| 14897 if (n == "true") return true; | |
| 14898 if (n == "false") return false; | |
| 14899 if (n == null) return null; | |
| 14900 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14901 } | |
| 14902 if (query.length > 0) { | |
| 14903 for (var part in query.split("&")) { | |
| 14904 var keyvalue = part.split("="); | |
| 14905 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14906 } | |
| 14907 } | |
| 14908 | |
| 14909 | |
| 14910 var h = { | |
| 14911 "content-type" : "application/json; charset=utf-8", | |
| 14912 }; | |
| 14913 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14914 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14915 }), true); | |
| 14916 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 14917 checkCreativeGroup(response); | |
| 14918 }))); | |
| 14919 }); | |
| 14920 | |
| 14921 unittest.test("method--list", () { | |
| 14922 | |
| 14923 var mock = new HttpServerMock(); | |
| 14924 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14925 var arg_profileId = "foo"; | |
| 14926 var arg_advertiserIds = buildUnnamed3248(); | |
| 14927 var arg_groupNumber = 42; | |
| 14928 var arg_ids = buildUnnamed3249(); | |
| 14929 var arg_maxResults = 42; | |
| 14930 var arg_pageToken = "foo"; | |
| 14931 var arg_searchString = "foo"; | |
| 14932 var arg_sortField = "foo"; | |
| 14933 var arg_sortOrder = "foo"; | |
| 14934 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14935 var path = (req.url).path; | |
| 14936 var pathOffset = 0; | |
| 14937 var index; | |
| 14938 var subPart; | |
| 14939 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14940 pathOffset += 1; | |
| 14941 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 14942 pathOffset += 18; | |
| 14943 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14944 pathOffset += 13; | |
| 14945 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14946 unittest.expect(index >= 0, unittest.isTrue); | |
| 14947 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14948 pathOffset = index; | |
| 14949 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14950 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14951 pathOffset += 15; | |
| 14952 | |
| 14953 var query = (req.url).query; | |
| 14954 var queryOffset = 0; | |
| 14955 var queryMap = {}; | |
| 14956 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14957 parseBool(n) { | |
| 14958 if (n == "true") return true; | |
| 14959 if (n == "false") return false; | |
| 14960 if (n == null) return null; | |
| 14961 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14962 } | |
| 14963 if (query.length > 0) { | |
| 14964 for (var part in query.split("&")) { | |
| 14965 var keyvalue = part.split("="); | |
| 14966 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14967 } | |
| 14968 } | |
| 14969 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14970 unittest.expect(core.int.parse(queryMap["groupNumber"].first), unittest.
equals(arg_groupNumber)); | |
| 14971 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14972 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14973 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14974 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14975 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14976 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14977 | |
| 14978 | |
| 14979 var h = { | |
| 14980 "content-type" : "application/json; charset=utf-8", | |
| 14981 }; | |
| 14982 var resp = convert.JSON.encode(buildCreativeGroupsListResponse()); | |
| 14983 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14984 }), true); | |
| 14985 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) { | |
| 14986 checkCreativeGroupsListResponse(response); | |
| 14987 }))); | |
| 14988 }); | |
| 14989 | |
| 14990 unittest.test("method--patch", () { | |
| 14991 | |
| 14992 var mock = new HttpServerMock(); | |
| 14993 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14994 var arg_request = buildCreativeGroup(); | |
| 14995 var arg_profileId = "foo"; | |
| 14996 var arg_id = "foo"; | |
| 14997 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14998 var obj = new api.CreativeGroup.fromJson(json); | |
| 14999 checkCreativeGroup(obj); | |
| 15000 | |
| 15001 var path = (req.url).path; | |
| 15002 var pathOffset = 0; | |
| 15003 var index; | |
| 15004 var subPart; | |
| 15005 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15006 pathOffset += 1; | |
| 15007 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15008 pathOffset += 18; | |
| 15009 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15010 pathOffset += 13; | |
| 15011 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15012 unittest.expect(index >= 0, unittest.isTrue); | |
| 15013 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15014 pathOffset = index; | |
| 15015 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15016 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15017 pathOffset += 15; | |
| 15018 | |
| 15019 var query = (req.url).query; | |
| 15020 var queryOffset = 0; | |
| 15021 var queryMap = {}; | |
| 15022 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15023 parseBool(n) { | |
| 15024 if (n == "true") return true; | |
| 15025 if (n == "false") return false; | |
| 15026 if (n == null) return null; | |
| 15027 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15028 } | |
| 15029 if (query.length > 0) { | |
| 15030 for (var part in query.split("&")) { | |
| 15031 var keyvalue = part.split("="); | |
| 15032 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15033 } | |
| 15034 } | |
| 15035 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15036 | |
| 15037 | |
| 15038 var h = { | |
| 15039 "content-type" : "application/json; charset=utf-8", | |
| 15040 }; | |
| 15041 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15042 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15043 }), true); | |
| 15044 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeGroup response) { | |
| 15045 checkCreativeGroup(response); | |
| 15046 }))); | |
| 15047 }); | |
| 15048 | |
| 15049 unittest.test("method--update", () { | |
| 15050 | |
| 15051 var mock = new HttpServerMock(); | |
| 15052 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15053 var arg_request = buildCreativeGroup(); | |
| 15054 var arg_profileId = "foo"; | |
| 15055 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15056 var obj = new api.CreativeGroup.fromJson(json); | |
| 15057 checkCreativeGroup(obj); | |
| 15058 | |
| 15059 var path = (req.url).path; | |
| 15060 var pathOffset = 0; | |
| 15061 var index; | |
| 15062 var subPart; | |
| 15063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15064 pathOffset += 1; | |
| 15065 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15066 pathOffset += 18; | |
| 15067 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15068 pathOffset += 13; | |
| 15069 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15070 unittest.expect(index >= 0, unittest.isTrue); | |
| 15071 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15072 pathOffset = index; | |
| 15073 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15074 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15075 pathOffset += 15; | |
| 15076 | |
| 15077 var query = (req.url).query; | |
| 15078 var queryOffset = 0; | |
| 15079 var queryMap = {}; | |
| 15080 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15081 parseBool(n) { | |
| 15082 if (n == "true") return true; | |
| 15083 if (n == "false") return false; | |
| 15084 if (n == null) return null; | |
| 15085 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15086 } | |
| 15087 if (query.length > 0) { | |
| 15088 for (var part in query.split("&")) { | |
| 15089 var keyvalue = part.split("="); | |
| 15090 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15091 } | |
| 15092 } | |
| 15093 | |
| 15094 | |
| 15095 var h = { | |
| 15096 "content-type" : "application/json; charset=utf-8", | |
| 15097 }; | |
| 15098 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15099 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15100 }), true); | |
| 15101 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 15102 checkCreativeGroup(response); | |
| 15103 }))); | |
| 15104 }); | |
| 15105 | |
| 15106 }); | |
| 15107 | |
| 15108 | |
| 15109 unittest.group("resource-CreativesResourceApi", () { | |
| 15110 unittest.test("method--get", () { | |
| 15111 | |
| 15112 var mock = new HttpServerMock(); | |
| 15113 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15114 var arg_profileId = "foo"; | |
| 15115 var arg_id = "foo"; | |
| 15116 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15117 var path = (req.url).path; | |
| 15118 var pathOffset = 0; | |
| 15119 var index; | |
| 15120 var subPart; | |
| 15121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15122 pathOffset += 1; | |
| 15123 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15124 pathOffset += 18; | |
| 15125 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15126 pathOffset += 13; | |
| 15127 index = path.indexOf("/creatives/", pathOffset); | |
| 15128 unittest.expect(index >= 0, unittest.isTrue); | |
| 15129 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15130 pathOffset = index; | |
| 15131 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15132 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | |
| 15133 pathOffset += 11; | |
| 15134 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15135 pathOffset = path.length; | |
| 15136 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15137 | |
| 15138 var query = (req.url).query; | |
| 15139 var queryOffset = 0; | |
| 15140 var queryMap = {}; | |
| 15141 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15142 parseBool(n) { | |
| 15143 if (n == "true") return true; | |
| 15144 if (n == "false") return false; | |
| 15145 if (n == null) return null; | |
| 15146 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15147 } | |
| 15148 if (query.length > 0) { | |
| 15149 for (var part in query.split("&")) { | |
| 15150 var keyvalue = part.split("="); | |
| 15151 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15152 } | |
| 15153 } | |
| 15154 | |
| 15155 | |
| 15156 var h = { | |
| 15157 "content-type" : "application/json; charset=utf-8", | |
| 15158 }; | |
| 15159 var resp = convert.JSON.encode(buildCreative()); | |
| 15160 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15161 }), true); | |
| 15162 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Creative re
sponse) { | |
| 15163 checkCreative(response); | |
| 15164 }))); | |
| 15165 }); | |
| 15166 | |
| 15167 unittest.test("method--insert", () { | |
| 15168 | |
| 15169 var mock = new HttpServerMock(); | |
| 15170 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15171 var arg_request = buildCreative(); | |
| 15172 var arg_profileId = "foo"; | |
| 15173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15174 var obj = new api.Creative.fromJson(json); | |
| 15175 checkCreative(obj); | |
| 15176 | |
| 15177 var path = (req.url).path; | |
| 15178 var pathOffset = 0; | |
| 15179 var index; | |
| 15180 var subPart; | |
| 15181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15182 pathOffset += 1; | |
| 15183 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15184 pathOffset += 18; | |
| 15185 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15186 pathOffset += 13; | |
| 15187 index = path.indexOf("/creatives", pathOffset); | |
| 15188 unittest.expect(index >= 0, unittest.isTrue); | |
| 15189 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15190 pathOffset = index; | |
| 15191 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15192 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15193 pathOffset += 10; | |
| 15194 | |
| 15195 var query = (req.url).query; | |
| 15196 var queryOffset = 0; | |
| 15197 var queryMap = {}; | |
| 15198 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15199 parseBool(n) { | |
| 15200 if (n == "true") return true; | |
| 15201 if (n == "false") return false; | |
| 15202 if (n == null) return null; | |
| 15203 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15204 } | |
| 15205 if (query.length > 0) { | |
| 15206 for (var part in query.split("&")) { | |
| 15207 var keyvalue = part.split("="); | |
| 15208 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15209 } | |
| 15210 } | |
| 15211 | |
| 15212 | |
| 15213 var h = { | |
| 15214 "content-type" : "application/json; charset=utf-8", | |
| 15215 }; | |
| 15216 var resp = convert.JSON.encode(buildCreative()); | |
| 15217 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15218 }), true); | |
| 15219 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15220 checkCreative(response); | |
| 15221 }))); | |
| 15222 }); | |
| 15223 | |
| 15224 unittest.test("method--list", () { | |
| 15225 | |
| 15226 var mock = new HttpServerMock(); | |
| 15227 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15228 var arg_profileId = "foo"; | |
| 15229 var arg_active = true; | |
| 15230 var arg_advertiserId = "foo"; | |
| 15231 var arg_archived = true; | |
| 15232 var arg_campaignId = "foo"; | |
| 15233 var arg_companionCreativeIds = buildUnnamed3250(); | |
| 15234 var arg_creativeFieldIds = buildUnnamed3251(); | |
| 15235 var arg_ids = buildUnnamed3252(); | |
| 15236 var arg_maxResults = 42; | |
| 15237 var arg_pageToken = "foo"; | |
| 15238 var arg_renderingIds = buildUnnamed3253(); | |
| 15239 var arg_searchString = "foo"; | |
| 15240 var arg_sizeIds = buildUnnamed3254(); | |
| 15241 var arg_sortField = "foo"; | |
| 15242 var arg_sortOrder = "foo"; | |
| 15243 var arg_studioCreativeId = "foo"; | |
| 15244 var arg_types = buildUnnamed3255(); | |
| 15245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15246 var path = (req.url).path; | |
| 15247 var pathOffset = 0; | |
| 15248 var index; | |
| 15249 var subPart; | |
| 15250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15251 pathOffset += 1; | |
| 15252 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15253 pathOffset += 18; | |
| 15254 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15255 pathOffset += 13; | |
| 15256 index = path.indexOf("/creatives", pathOffset); | |
| 15257 unittest.expect(index >= 0, unittest.isTrue); | |
| 15258 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15259 pathOffset = index; | |
| 15260 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15261 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15262 pathOffset += 10; | |
| 15263 | |
| 15264 var query = (req.url).query; | |
| 15265 var queryOffset = 0; | |
| 15266 var queryMap = {}; | |
| 15267 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15268 parseBool(n) { | |
| 15269 if (n == "true") return true; | |
| 15270 if (n == "false") return false; | |
| 15271 if (n == null) return null; | |
| 15272 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15273 } | |
| 15274 if (query.length > 0) { | |
| 15275 for (var part in query.split("&")) { | |
| 15276 var keyvalue = part.split("="); | |
| 15277 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15278 } | |
| 15279 } | |
| 15280 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15281 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 15282 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 15283 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 15284 unittest.expect(queryMap["companionCreativeIds"], unittest.equals(arg_co
mpanionCreativeIds)); | |
| 15285 unittest.expect(queryMap["creativeFieldIds"], unittest.equals(arg_creati
veFieldIds)); | |
| 15286 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15287 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15288 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15289 unittest.expect(queryMap["renderingIds"], unittest.equals(arg_renderingI
ds)); | |
| 15290 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15291 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 15292 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15293 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15294 unittest.expect(queryMap["studioCreativeId"].first, unittest.equals(arg_
studioCreativeId)); | |
| 15295 unittest.expect(queryMap["types"], unittest.equals(arg_types)); | |
| 15296 | |
| 15297 | |
| 15298 var h = { | |
| 15299 "content-type" : "application/json; charset=utf-8", | |
| 15300 }; | |
| 15301 var resp = convert.JSON.encode(buildCreativesListResponse()); | |
| 15302 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15303 }), true); | |
| 15304 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) { | |
| 15305 checkCreativesListResponse(response); | |
| 15306 }))); | |
| 15307 }); | |
| 15308 | |
| 15309 unittest.test("method--patch", () { | |
| 15310 | |
| 15311 var mock = new HttpServerMock(); | |
| 15312 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15313 var arg_request = buildCreative(); | |
| 15314 var arg_profileId = "foo"; | |
| 15315 var arg_id = "foo"; | |
| 15316 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15317 var obj = new api.Creative.fromJson(json); | |
| 15318 checkCreative(obj); | |
| 15319 | |
| 15320 var path = (req.url).path; | |
| 15321 var pathOffset = 0; | |
| 15322 var index; | |
| 15323 var subPart; | |
| 15324 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15325 pathOffset += 1; | |
| 15326 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15327 pathOffset += 18; | |
| 15328 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15329 pathOffset += 13; | |
| 15330 index = path.indexOf("/creatives", pathOffset); | |
| 15331 unittest.expect(index >= 0, unittest.isTrue); | |
| 15332 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15333 pathOffset = index; | |
| 15334 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15335 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15336 pathOffset += 10; | |
| 15337 | |
| 15338 var query = (req.url).query; | |
| 15339 var queryOffset = 0; | |
| 15340 var queryMap = {}; | |
| 15341 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15342 parseBool(n) { | |
| 15343 if (n == "true") return true; | |
| 15344 if (n == "false") return false; | |
| 15345 if (n == null) return null; | |
| 15346 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15347 } | |
| 15348 if (query.length > 0) { | |
| 15349 for (var part in query.split("&")) { | |
| 15350 var keyvalue = part.split("="); | |
| 15351 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15352 } | |
| 15353 } | |
| 15354 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15355 | |
| 15356 | |
| 15357 var h = { | |
| 15358 "content-type" : "application/json; charset=utf-8", | |
| 15359 }; | |
| 15360 var resp = convert.JSON.encode(buildCreative()); | |
| 15361 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15362 }), true); | |
| 15363 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Creative response) { | |
| 15364 checkCreative(response); | |
| 15365 }))); | |
| 15366 }); | |
| 15367 | |
| 15368 unittest.test("method--update", () { | |
| 15369 | |
| 15370 var mock = new HttpServerMock(); | |
| 15371 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15372 var arg_request = buildCreative(); | |
| 15373 var arg_profileId = "foo"; | |
| 15374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15375 var obj = new api.Creative.fromJson(json); | |
| 15376 checkCreative(obj); | |
| 15377 | |
| 15378 var path = (req.url).path; | |
| 15379 var pathOffset = 0; | |
| 15380 var index; | |
| 15381 var subPart; | |
| 15382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15383 pathOffset += 1; | |
| 15384 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15385 pathOffset += 18; | |
| 15386 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15387 pathOffset += 13; | |
| 15388 index = path.indexOf("/creatives", pathOffset); | |
| 15389 unittest.expect(index >= 0, unittest.isTrue); | |
| 15390 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15391 pathOffset = index; | |
| 15392 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15393 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15394 pathOffset += 10; | |
| 15395 | |
| 15396 var query = (req.url).query; | |
| 15397 var queryOffset = 0; | |
| 15398 var queryMap = {}; | |
| 15399 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15400 parseBool(n) { | |
| 15401 if (n == "true") return true; | |
| 15402 if (n == "false") return false; | |
| 15403 if (n == null) return null; | |
| 15404 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15405 } | |
| 15406 if (query.length > 0) { | |
| 15407 for (var part in query.split("&")) { | |
| 15408 var keyvalue = part.split("="); | |
| 15409 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15410 } | |
| 15411 } | |
| 15412 | |
| 15413 | |
| 15414 var h = { | |
| 15415 "content-type" : "application/json; charset=utf-8", | |
| 15416 }; | |
| 15417 var resp = convert.JSON.encode(buildCreative()); | |
| 15418 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15419 }), true); | |
| 15420 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15421 checkCreative(response); | |
| 15422 }))); | |
| 15423 }); | |
| 15424 | |
| 15425 }); | |
| 15426 | |
| 15427 | |
| 15428 unittest.group("resource-DimensionValuesResourceApi", () { | |
| 15429 unittest.test("method--query", () { | |
| 15430 | |
| 15431 var mock = new HttpServerMock(); | |
| 15432 api.DimensionValuesResourceApi res = new api.DfareportingApi(mock).dimensi
onValues; | |
| 15433 var arg_request = buildDimensionValueRequest(); | |
| 15434 var arg_profileId = "foo"; | |
| 15435 var arg_maxResults = 42; | |
| 15436 var arg_pageToken = "foo"; | |
| 15437 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15438 var obj = new api.DimensionValueRequest.fromJson(json); | |
| 15439 checkDimensionValueRequest(obj); | |
| 15440 | |
| 15441 var path = (req.url).path; | |
| 15442 var pathOffset = 0; | |
| 15443 var index; | |
| 15444 var subPart; | |
| 15445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15446 pathOffset += 1; | |
| 15447 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15448 pathOffset += 18; | |
| 15449 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15450 pathOffset += 13; | |
| 15451 index = path.indexOf("/dimensionvalues/query", pathOffset); | |
| 15452 unittest.expect(index >= 0, unittest.isTrue); | |
| 15453 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15454 pathOffset = index; | |
| 15455 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15456 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dimensionvalues/query")); | |
| 15457 pathOffset += 22; | |
| 15458 | |
| 15459 var query = (req.url).query; | |
| 15460 var queryOffset = 0; | |
| 15461 var queryMap = {}; | |
| 15462 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15463 parseBool(n) { | |
| 15464 if (n == "true") return true; | |
| 15465 if (n == "false") return false; | |
| 15466 if (n == null) return null; | |
| 15467 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15468 } | |
| 15469 if (query.length > 0) { | |
| 15470 for (var part in query.split("&")) { | |
| 15471 var keyvalue = part.split("="); | |
| 15472 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15473 } | |
| 15474 } | |
| 15475 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15476 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15477 | |
| 15478 | |
| 15479 var h = { | |
| 15480 "content-type" : "application/json; charset=utf-8", | |
| 15481 }; | |
| 15482 var resp = convert.JSON.encode(buildDimensionValueList()); | |
| 15483 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15484 }), true); | |
| 15485 res.query(arg_request, arg_profileId, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DimensionValueList response) { | |
| 15486 checkDimensionValueList(response); | |
| 15487 }))); | |
| 15488 }); | |
| 15489 | |
| 15490 }); | |
| 15491 | |
| 15492 | |
| 15493 unittest.group("resource-DirectorySiteContactsResourceApi", () { | |
| 15494 unittest.test("method--get", () { | |
| 15495 | |
| 15496 var mock = new HttpServerMock(); | |
| 15497 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15498 var arg_profileId = "foo"; | |
| 15499 var arg_id = "foo"; | |
| 15500 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15501 var path = (req.url).path; | |
| 15502 var pathOffset = 0; | |
| 15503 var index; | |
| 15504 var subPart; | |
| 15505 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15506 pathOffset += 1; | |
| 15507 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15508 pathOffset += 18; | |
| 15509 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15510 pathOffset += 13; | |
| 15511 index = path.indexOf("/directorySiteContacts/", pathOffset); | |
| 15512 unittest.expect(index >= 0, unittest.isTrue); | |
| 15513 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15514 pathOffset = index; | |
| 15515 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15516 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/directorySiteContacts/")); | |
| 15517 pathOffset += 23; | |
| 15518 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15519 pathOffset = path.length; | |
| 15520 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15521 | |
| 15522 var query = (req.url).query; | |
| 15523 var queryOffset = 0; | |
| 15524 var queryMap = {}; | |
| 15525 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15526 parseBool(n) { | |
| 15527 if (n == "true") return true; | |
| 15528 if (n == "false") return false; | |
| 15529 if (n == null) return null; | |
| 15530 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15531 } | |
| 15532 if (query.length > 0) { | |
| 15533 for (var part in query.split("&")) { | |
| 15534 var keyvalue = part.split("="); | |
| 15535 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15536 } | |
| 15537 } | |
| 15538 | |
| 15539 | |
| 15540 var h = { | |
| 15541 "content-type" : "application/json; charset=utf-8", | |
| 15542 }; | |
| 15543 var resp = convert.JSON.encode(buildDirectorySiteContact()); | |
| 15544 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15545 }), true); | |
| 15546 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
teContact response) { | |
| 15547 checkDirectorySiteContact(response); | |
| 15548 }))); | |
| 15549 }); | |
| 15550 | |
| 15551 unittest.test("method--list", () { | |
| 15552 | |
| 15553 var mock = new HttpServerMock(); | |
| 15554 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15555 var arg_profileId = "foo"; | |
| 15556 var arg_directorySiteIds = buildUnnamed3256(); | |
| 15557 var arg_ids = buildUnnamed3257(); | |
| 15558 var arg_maxResults = 42; | |
| 15559 var arg_pageToken = "foo"; | |
| 15560 var arg_searchString = "foo"; | |
| 15561 var arg_sortField = "foo"; | |
| 15562 var arg_sortOrder = "foo"; | |
| 15563 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15564 var path = (req.url).path; | |
| 15565 var pathOffset = 0; | |
| 15566 var index; | |
| 15567 var subPart; | |
| 15568 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15569 pathOffset += 1; | |
| 15570 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15571 pathOffset += 18; | |
| 15572 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15573 pathOffset += 13; | |
| 15574 index = path.indexOf("/directorySiteContacts", pathOffset); | |
| 15575 unittest.expect(index >= 0, unittest.isTrue); | |
| 15576 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15577 pathOffset = index; | |
| 15578 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15579 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/directorySiteContacts")); | |
| 15580 pathOffset += 22; | |
| 15581 | |
| 15582 var query = (req.url).query; | |
| 15583 var queryOffset = 0; | |
| 15584 var queryMap = {}; | |
| 15585 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15586 parseBool(n) { | |
| 15587 if (n == "true") return true; | |
| 15588 if (n == "false") return false; | |
| 15589 if (n == null) return null; | |
| 15590 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15591 } | |
| 15592 if (query.length > 0) { | |
| 15593 for (var part in query.split("&")) { | |
| 15594 var keyvalue = part.split("="); | |
| 15595 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15596 } | |
| 15597 } | |
| 15598 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 15599 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15600 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15601 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15602 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15603 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15604 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15605 | |
| 15606 | |
| 15607 var h = { | |
| 15608 "content-type" : "application/json; charset=utf-8", | |
| 15609 }; | |
| 15610 var resp = convert.JSON.encode(buildDirectorySiteContactsListResponse())
; | |
| 15611 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15612 }), true); | |
| 15613 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) { | |
| 15614 checkDirectorySiteContactsListResponse(response); | |
| 15615 }))); | |
| 15616 }); | |
| 15617 | |
| 15618 }); | |
| 15619 | |
| 15620 | |
| 15621 unittest.group("resource-DirectorySitesResourceApi", () { | |
| 15622 unittest.test("method--get", () { | |
| 15623 | |
| 15624 var mock = new HttpServerMock(); | |
| 15625 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15626 var arg_profileId = "foo"; | |
| 15627 var arg_id = "foo"; | |
| 15628 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15629 var path = (req.url).path; | |
| 15630 var pathOffset = 0; | |
| 15631 var index; | |
| 15632 var subPart; | |
| 15633 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15634 pathOffset += 1; | |
| 15635 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15636 pathOffset += 18; | |
| 15637 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15638 pathOffset += 13; | |
| 15639 index = path.indexOf("/directorySites/", pathOffset); | |
| 15640 unittest.expect(index >= 0, unittest.isTrue); | |
| 15641 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15642 pathOffset = index; | |
| 15643 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15644 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/directorySites/")); | |
| 15645 pathOffset += 16; | |
| 15646 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15647 pathOffset = path.length; | |
| 15648 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15649 | |
| 15650 var query = (req.url).query; | |
| 15651 var queryOffset = 0; | |
| 15652 var queryMap = {}; | |
| 15653 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15654 parseBool(n) { | |
| 15655 if (n == "true") return true; | |
| 15656 if (n == "false") return false; | |
| 15657 if (n == null) return null; | |
| 15658 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15659 } | |
| 15660 if (query.length > 0) { | |
| 15661 for (var part in query.split("&")) { | |
| 15662 var keyvalue = part.split("="); | |
| 15663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15664 } | |
| 15665 } | |
| 15666 | |
| 15667 | |
| 15668 var h = { | |
| 15669 "content-type" : "application/json; charset=utf-8", | |
| 15670 }; | |
| 15671 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15672 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15673 }), true); | |
| 15674 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
te response) { | |
| 15675 checkDirectorySite(response); | |
| 15676 }))); | |
| 15677 }); | |
| 15678 | |
| 15679 unittest.test("method--insert", () { | |
| 15680 | |
| 15681 var mock = new HttpServerMock(); | |
| 15682 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15683 var arg_request = buildDirectorySite(); | |
| 15684 var arg_profileId = "foo"; | |
| 15685 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15686 var obj = new api.DirectorySite.fromJson(json); | |
| 15687 checkDirectorySite(obj); | |
| 15688 | |
| 15689 var path = (req.url).path; | |
| 15690 var pathOffset = 0; | |
| 15691 var index; | |
| 15692 var subPart; | |
| 15693 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15694 pathOffset += 1; | |
| 15695 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15696 pathOffset += 18; | |
| 15697 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15698 pathOffset += 13; | |
| 15699 index = path.indexOf("/directorySites", pathOffset); | |
| 15700 unittest.expect(index >= 0, unittest.isTrue); | |
| 15701 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15702 pathOffset = index; | |
| 15703 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15704 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15705 pathOffset += 15; | |
| 15706 | |
| 15707 var query = (req.url).query; | |
| 15708 var queryOffset = 0; | |
| 15709 var queryMap = {}; | |
| 15710 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15711 parseBool(n) { | |
| 15712 if (n == "true") return true; | |
| 15713 if (n == "false") return false; | |
| 15714 if (n == null) return null; | |
| 15715 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15716 } | |
| 15717 if (query.length > 0) { | |
| 15718 for (var part in query.split("&")) { | |
| 15719 var keyvalue = part.split("="); | |
| 15720 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15721 } | |
| 15722 } | |
| 15723 | |
| 15724 | |
| 15725 var h = { | |
| 15726 "content-type" : "application/json; charset=utf-8", | |
| 15727 }; | |
| 15728 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15729 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15730 }), true); | |
| 15731 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Dir
ectorySite response) { | |
| 15732 checkDirectorySite(response); | |
| 15733 }))); | |
| 15734 }); | |
| 15735 | |
| 15736 unittest.test("method--list", () { | |
| 15737 | |
| 15738 var mock = new HttpServerMock(); | |
| 15739 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15740 var arg_profileId = "foo"; | |
| 15741 var arg_acceptsInStreamVideoPlacements = true; | |
| 15742 var arg_acceptsInterstitialPlacements = true; | |
| 15743 var arg_acceptsPublisherPaidPlacements = true; | |
| 15744 var arg_active = true; | |
| 15745 var arg_countryId = "foo"; | |
| 15746 var arg_dfpNetworkCode = "foo"; | |
| 15747 var arg_ids = buildUnnamed3258(); | |
| 15748 var arg_maxResults = 42; | |
| 15749 var arg_pageToken = "foo"; | |
| 15750 var arg_parentId = "foo"; | |
| 15751 var arg_searchString = "foo"; | |
| 15752 var arg_sortField = "foo"; | |
| 15753 var arg_sortOrder = "foo"; | |
| 15754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15755 var path = (req.url).path; | |
| 15756 var pathOffset = 0; | |
| 15757 var index; | |
| 15758 var subPart; | |
| 15759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15760 pathOffset += 1; | |
| 15761 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15762 pathOffset += 18; | |
| 15763 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15764 pathOffset += 13; | |
| 15765 index = path.indexOf("/directorySites", pathOffset); | |
| 15766 unittest.expect(index >= 0, unittest.isTrue); | |
| 15767 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15768 pathOffset = index; | |
| 15769 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15770 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15771 pathOffset += 15; | |
| 15772 | |
| 15773 var query = (req.url).query; | |
| 15774 var queryOffset = 0; | |
| 15775 var queryMap = {}; | |
| 15776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15777 parseBool(n) { | |
| 15778 if (n == "true") return true; | |
| 15779 if (n == "false") return false; | |
| 15780 if (n == null) return null; | |
| 15781 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15782 } | |
| 15783 if (query.length > 0) { | |
| 15784 for (var part in query.split("&")) { | |
| 15785 var keyvalue = part.split("="); | |
| 15786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15787 } | |
| 15788 } | |
| 15789 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 15790 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 15791 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 15792 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15793 unittest.expect(queryMap["countryId"].first, unittest.equals(arg_country
Id)); | |
| 15794 unittest.expect(queryMap["dfp_network_code"].first, unittest.equals(arg_
dfpNetworkCode)); | |
| 15795 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15796 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15797 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15798 unittest.expect(queryMap["parentId"].first, unittest.equals(arg_parentId
)); | |
| 15799 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15800 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15801 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15802 | |
| 15803 | |
| 15804 var h = { | |
| 15805 "content-type" : "application/json; charset=utf-8", | |
| 15806 }; | |
| 15807 var resp = convert.JSON.encode(buildDirectorySitesListResponse()); | |
| 15808 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15809 }), true); | |
| 15810 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) { | |
| 15811 checkDirectorySitesListResponse(response); | |
| 15812 }))); | |
| 15813 }); | |
| 15814 | |
| 15815 }); | |
| 15816 | |
| 15817 | |
| 15818 unittest.group("resource-EventTagsResourceApi", () { | |
| 15819 unittest.test("method--delete", () { | |
| 15820 | |
| 15821 var mock = new HttpServerMock(); | |
| 15822 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15823 var arg_profileId = "foo"; | |
| 15824 var arg_id = "foo"; | |
| 15825 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15826 var path = (req.url).path; | |
| 15827 var pathOffset = 0; | |
| 15828 var index; | |
| 15829 var subPart; | |
| 15830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15831 pathOffset += 1; | |
| 15832 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15833 pathOffset += 18; | |
| 15834 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15835 pathOffset += 13; | |
| 15836 index = path.indexOf("/eventTags/", pathOffset); | |
| 15837 unittest.expect(index >= 0, unittest.isTrue); | |
| 15838 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15839 pathOffset = index; | |
| 15840 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15841 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15842 pathOffset += 11; | |
| 15843 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15844 pathOffset = path.length; | |
| 15845 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15846 | |
| 15847 var query = (req.url).query; | |
| 15848 var queryOffset = 0; | |
| 15849 var queryMap = {}; | |
| 15850 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15851 parseBool(n) { | |
| 15852 if (n == "true") return true; | |
| 15853 if (n == "false") return false; | |
| 15854 if (n == null) return null; | |
| 15855 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15856 } | |
| 15857 if (query.length > 0) { | |
| 15858 for (var part in query.split("&")) { | |
| 15859 var keyvalue = part.split("="); | |
| 15860 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15861 } | |
| 15862 } | |
| 15863 | |
| 15864 | |
| 15865 var h = { | |
| 15866 "content-type" : "application/json; charset=utf-8", | |
| 15867 }; | |
| 15868 var resp = ""; | |
| 15869 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15870 }), true); | |
| 15871 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 15872 }); | |
| 15873 | |
| 15874 unittest.test("method--get", () { | |
| 15875 | |
| 15876 var mock = new HttpServerMock(); | |
| 15877 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15878 var arg_profileId = "foo"; | |
| 15879 var arg_id = "foo"; | |
| 15880 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15881 var path = (req.url).path; | |
| 15882 var pathOffset = 0; | |
| 15883 var index; | |
| 15884 var subPart; | |
| 15885 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15886 pathOffset += 1; | |
| 15887 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15888 pathOffset += 18; | |
| 15889 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15890 pathOffset += 13; | |
| 15891 index = path.indexOf("/eventTags/", pathOffset); | |
| 15892 unittest.expect(index >= 0, unittest.isTrue); | |
| 15893 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15894 pathOffset = index; | |
| 15895 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15896 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15897 pathOffset += 11; | |
| 15898 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15899 pathOffset = path.length; | |
| 15900 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15901 | |
| 15902 var query = (req.url).query; | |
| 15903 var queryOffset = 0; | |
| 15904 var queryMap = {}; | |
| 15905 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15906 parseBool(n) { | |
| 15907 if (n == "true") return true; | |
| 15908 if (n == "false") return false; | |
| 15909 if (n == null) return null; | |
| 15910 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15911 } | |
| 15912 if (query.length > 0) { | |
| 15913 for (var part in query.split("&")) { | |
| 15914 var keyvalue = part.split("="); | |
| 15915 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15916 } | |
| 15917 } | |
| 15918 | |
| 15919 | |
| 15920 var h = { | |
| 15921 "content-type" : "application/json; charset=utf-8", | |
| 15922 }; | |
| 15923 var resp = convert.JSON.encode(buildEventTag()); | |
| 15924 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15925 }), true); | |
| 15926 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.EventTag re
sponse) { | |
| 15927 checkEventTag(response); | |
| 15928 }))); | |
| 15929 }); | |
| 15930 | |
| 15931 unittest.test("method--insert", () { | |
| 15932 | |
| 15933 var mock = new HttpServerMock(); | |
| 15934 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15935 var arg_request = buildEventTag(); | |
| 15936 var arg_profileId = "foo"; | |
| 15937 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15938 var obj = new api.EventTag.fromJson(json); | |
| 15939 checkEventTag(obj); | |
| 15940 | |
| 15941 var path = (req.url).path; | |
| 15942 var pathOffset = 0; | |
| 15943 var index; | |
| 15944 var subPart; | |
| 15945 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15946 pathOffset += 1; | |
| 15947 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 15948 pathOffset += 18; | |
| 15949 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15950 pathOffset += 13; | |
| 15951 index = path.indexOf("/eventTags", pathOffset); | |
| 15952 unittest.expect(index >= 0, unittest.isTrue); | |
| 15953 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15954 pathOffset = index; | |
| 15955 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15956 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 15957 pathOffset += 10; | |
| 15958 | |
| 15959 var query = (req.url).query; | |
| 15960 var queryOffset = 0; | |
| 15961 var queryMap = {}; | |
| 15962 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15963 parseBool(n) { | |
| 15964 if (n == "true") return true; | |
| 15965 if (n == "false") return false; | |
| 15966 if (n == null) return null; | |
| 15967 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15968 } | |
| 15969 if (query.length > 0) { | |
| 15970 for (var part in query.split("&")) { | |
| 15971 var keyvalue = part.split("="); | |
| 15972 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15973 } | |
| 15974 } | |
| 15975 | |
| 15976 | |
| 15977 var h = { | |
| 15978 "content-type" : "application/json; charset=utf-8", | |
| 15979 }; | |
| 15980 var resp = convert.JSON.encode(buildEventTag()); | |
| 15981 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15982 }), true); | |
| 15983 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 15984 checkEventTag(response); | |
| 15985 }))); | |
| 15986 }); | |
| 15987 | |
| 15988 unittest.test("method--list", () { | |
| 15989 | |
| 15990 var mock = new HttpServerMock(); | |
| 15991 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15992 var arg_profileId = "foo"; | |
| 15993 var arg_adId = "foo"; | |
| 15994 var arg_advertiserId = "foo"; | |
| 15995 var arg_campaignId = "foo"; | |
| 15996 var arg_definitionsOnly = true; | |
| 15997 var arg_enabled = true; | |
| 15998 var arg_eventTagTypes = buildUnnamed3259(); | |
| 15999 var arg_ids = buildUnnamed3260(); | |
| 16000 var arg_searchString = "foo"; | |
| 16001 var arg_sortField = "foo"; | |
| 16002 var arg_sortOrder = "foo"; | |
| 16003 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16004 var path = (req.url).path; | |
| 16005 var pathOffset = 0; | |
| 16006 var index; | |
| 16007 var subPart; | |
| 16008 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16009 pathOffset += 1; | |
| 16010 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16011 pathOffset += 18; | |
| 16012 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16013 pathOffset += 13; | |
| 16014 index = path.indexOf("/eventTags", pathOffset); | |
| 16015 unittest.expect(index >= 0, unittest.isTrue); | |
| 16016 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16017 pathOffset = index; | |
| 16018 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16019 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16020 pathOffset += 10; | |
| 16021 | |
| 16022 var query = (req.url).query; | |
| 16023 var queryOffset = 0; | |
| 16024 var queryMap = {}; | |
| 16025 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16026 parseBool(n) { | |
| 16027 if (n == "true") return true; | |
| 16028 if (n == "false") return false; | |
| 16029 if (n == null) return null; | |
| 16030 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16031 } | |
| 16032 if (query.length > 0) { | |
| 16033 for (var part in query.split("&")) { | |
| 16034 var keyvalue = part.split("="); | |
| 16035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16036 } | |
| 16037 } | |
| 16038 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId)); | |
| 16039 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16040 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 16041 unittest.expect(queryMap["definitionsOnly"].first, unittest.equals("$arg
_definitionsOnly")); | |
| 16042 unittest.expect(queryMap["enabled"].first, unittest.equals("$arg_enabled
")); | |
| 16043 unittest.expect(queryMap["eventTagTypes"], unittest.equals(arg_eventTagT
ypes)); | |
| 16044 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16045 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16046 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16047 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16048 | |
| 16049 | |
| 16050 var h = { | |
| 16051 "content-type" : "application/json; charset=utf-8", | |
| 16052 }; | |
| 16053 var resp = convert.JSON.encode(buildEventTagsListResponse()); | |
| 16054 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16055 }), true); | |
| 16056 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) { | |
| 16057 checkEventTagsListResponse(response); | |
| 16058 }))); | |
| 16059 }); | |
| 16060 | |
| 16061 unittest.test("method--patch", () { | |
| 16062 | |
| 16063 var mock = new HttpServerMock(); | |
| 16064 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16065 var arg_request = buildEventTag(); | |
| 16066 var arg_profileId = "foo"; | |
| 16067 var arg_id = "foo"; | |
| 16068 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16069 var obj = new api.EventTag.fromJson(json); | |
| 16070 checkEventTag(obj); | |
| 16071 | |
| 16072 var path = (req.url).path; | |
| 16073 var pathOffset = 0; | |
| 16074 var index; | |
| 16075 var subPart; | |
| 16076 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16077 pathOffset += 1; | |
| 16078 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16079 pathOffset += 18; | |
| 16080 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16081 pathOffset += 13; | |
| 16082 index = path.indexOf("/eventTags", pathOffset); | |
| 16083 unittest.expect(index >= 0, unittest.isTrue); | |
| 16084 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16085 pathOffset = index; | |
| 16086 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16087 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16088 pathOffset += 10; | |
| 16089 | |
| 16090 var query = (req.url).query; | |
| 16091 var queryOffset = 0; | |
| 16092 var queryMap = {}; | |
| 16093 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16094 parseBool(n) { | |
| 16095 if (n == "true") return true; | |
| 16096 if (n == "false") return false; | |
| 16097 if (n == null) return null; | |
| 16098 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16099 } | |
| 16100 if (query.length > 0) { | |
| 16101 for (var part in query.split("&")) { | |
| 16102 var keyvalue = part.split("="); | |
| 16103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16104 } | |
| 16105 } | |
| 16106 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16107 | |
| 16108 | |
| 16109 var h = { | |
| 16110 "content-type" : "application/json; charset=utf-8", | |
| 16111 }; | |
| 16112 var resp = convert.JSON.encode(buildEventTag()); | |
| 16113 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16114 }), true); | |
| 16115 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.EventTag response) { | |
| 16116 checkEventTag(response); | |
| 16117 }))); | |
| 16118 }); | |
| 16119 | |
| 16120 unittest.test("method--update", () { | |
| 16121 | |
| 16122 var mock = new HttpServerMock(); | |
| 16123 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16124 var arg_request = buildEventTag(); | |
| 16125 var arg_profileId = "foo"; | |
| 16126 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16127 var obj = new api.EventTag.fromJson(json); | |
| 16128 checkEventTag(obj); | |
| 16129 | |
| 16130 var path = (req.url).path; | |
| 16131 var pathOffset = 0; | |
| 16132 var index; | |
| 16133 var subPart; | |
| 16134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16135 pathOffset += 1; | |
| 16136 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16137 pathOffset += 18; | |
| 16138 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16139 pathOffset += 13; | |
| 16140 index = path.indexOf("/eventTags", pathOffset); | |
| 16141 unittest.expect(index >= 0, unittest.isTrue); | |
| 16142 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16143 pathOffset = index; | |
| 16144 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16145 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16146 pathOffset += 10; | |
| 16147 | |
| 16148 var query = (req.url).query; | |
| 16149 var queryOffset = 0; | |
| 16150 var queryMap = {}; | |
| 16151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16152 parseBool(n) { | |
| 16153 if (n == "true") return true; | |
| 16154 if (n == "false") return false; | |
| 16155 if (n == null) return null; | |
| 16156 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16157 } | |
| 16158 if (query.length > 0) { | |
| 16159 for (var part in query.split("&")) { | |
| 16160 var keyvalue = part.split("="); | |
| 16161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16162 } | |
| 16163 } | |
| 16164 | |
| 16165 | |
| 16166 var h = { | |
| 16167 "content-type" : "application/json; charset=utf-8", | |
| 16168 }; | |
| 16169 var resp = convert.JSON.encode(buildEventTag()); | |
| 16170 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16171 }), true); | |
| 16172 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 16173 checkEventTag(response); | |
| 16174 }))); | |
| 16175 }); | |
| 16176 | |
| 16177 }); | |
| 16178 | |
| 16179 | |
| 16180 unittest.group("resource-FilesResourceApi", () { | |
| 16181 unittest.test("method--get", () { | |
| 16182 // TODO: Implement tests for media upload; | |
| 16183 // TODO: Implement tests for media download; | |
| 16184 | |
| 16185 var mock = new HttpServerMock(); | |
| 16186 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16187 var arg_reportId = "foo"; | |
| 16188 var arg_fileId = "foo"; | |
| 16189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16190 var path = (req.url).path; | |
| 16191 var pathOffset = 0; | |
| 16192 var index; | |
| 16193 var subPart; | |
| 16194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16195 pathOffset += 1; | |
| 16196 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16197 pathOffset += 18; | |
| 16198 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("reports/")); | |
| 16199 pathOffset += 8; | |
| 16200 index = path.indexOf("/files/", pathOffset); | |
| 16201 unittest.expect(index >= 0, unittest.isTrue); | |
| 16202 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16203 pathOffset = index; | |
| 16204 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 16205 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 16206 pathOffset += 7; | |
| 16207 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16208 pathOffset = path.length; | |
| 16209 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 16210 | |
| 16211 var query = (req.url).query; | |
| 16212 var queryOffset = 0; | |
| 16213 var queryMap = {}; | |
| 16214 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16215 parseBool(n) { | |
| 16216 if (n == "true") return true; | |
| 16217 if (n == "false") return false; | |
| 16218 if (n == null) return null; | |
| 16219 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16220 } | |
| 16221 if (query.length > 0) { | |
| 16222 for (var part in query.split("&")) { | |
| 16223 var keyvalue = part.split("="); | |
| 16224 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16225 } | |
| 16226 } | |
| 16227 | |
| 16228 | |
| 16229 var h = { | |
| 16230 "content-type" : "application/json; charset=utf-8", | |
| 16231 }; | |
| 16232 var resp = convert.JSON.encode(buildFile()); | |
| 16233 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16234 }), true); | |
| 16235 res.get(arg_reportId, arg_fileId).then(unittest.expectAsync(((api.File res
ponse) { | |
| 16236 checkFile(response); | |
| 16237 }))); | |
| 16238 }); | |
| 16239 | |
| 16240 unittest.test("method--list", () { | |
| 16241 | |
| 16242 var mock = new HttpServerMock(); | |
| 16243 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16244 var arg_profileId = "foo"; | |
| 16245 var arg_maxResults = 42; | |
| 16246 var arg_pageToken = "foo"; | |
| 16247 var arg_scope = "foo"; | |
| 16248 var arg_sortField = "foo"; | |
| 16249 var arg_sortOrder = "foo"; | |
| 16250 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16251 var path = (req.url).path; | |
| 16252 var pathOffset = 0; | |
| 16253 var index; | |
| 16254 var subPart; | |
| 16255 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16256 pathOffset += 1; | |
| 16257 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16258 pathOffset += 18; | |
| 16259 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16260 pathOffset += 13; | |
| 16261 index = path.indexOf("/files", pathOffset); | |
| 16262 unittest.expect(index >= 0, unittest.isTrue); | |
| 16263 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16264 pathOffset = index; | |
| 16265 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16266 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 16267 pathOffset += 6; | |
| 16268 | |
| 16269 var query = (req.url).query; | |
| 16270 var queryOffset = 0; | |
| 16271 var queryMap = {}; | |
| 16272 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16273 parseBool(n) { | |
| 16274 if (n == "true") return true; | |
| 16275 if (n == "false") return false; | |
| 16276 if (n == null) return null; | |
| 16277 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16278 } | |
| 16279 if (query.length > 0) { | |
| 16280 for (var part in query.split("&")) { | |
| 16281 var keyvalue = part.split("="); | |
| 16282 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16283 } | |
| 16284 } | |
| 16285 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16286 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16287 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 16288 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16289 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16290 | |
| 16291 | |
| 16292 var h = { | |
| 16293 "content-type" : "application/json; charset=utf-8", | |
| 16294 }; | |
| 16295 var resp = convert.JSON.encode(buildFileList()); | |
| 16296 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16297 }), true); | |
| 16298 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) { | |
| 16299 checkFileList(response); | |
| 16300 }))); | |
| 16301 }); | |
| 16302 | |
| 16303 }); | |
| 16304 | |
| 16305 | |
| 16306 unittest.group("resource-FloodlightActivitiesResourceApi", () { | |
| 16307 unittest.test("method--delete", () { | |
| 16308 | |
| 16309 var mock = new HttpServerMock(); | |
| 16310 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16311 var arg_profileId = "foo"; | |
| 16312 var arg_id = "foo"; | |
| 16313 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16314 var path = (req.url).path; | |
| 16315 var pathOffset = 0; | |
| 16316 var index; | |
| 16317 var subPart; | |
| 16318 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16319 pathOffset += 1; | |
| 16320 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16321 pathOffset += 18; | |
| 16322 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16323 pathOffset += 13; | |
| 16324 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16325 unittest.expect(index >= 0, unittest.isTrue); | |
| 16326 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16327 pathOffset = index; | |
| 16328 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16329 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16330 pathOffset += 22; | |
| 16331 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16332 pathOffset = path.length; | |
| 16333 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16334 | |
| 16335 var query = (req.url).query; | |
| 16336 var queryOffset = 0; | |
| 16337 var queryMap = {}; | |
| 16338 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16339 parseBool(n) { | |
| 16340 if (n == "true") return true; | |
| 16341 if (n == "false") return false; | |
| 16342 if (n == null) return null; | |
| 16343 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16344 } | |
| 16345 if (query.length > 0) { | |
| 16346 for (var part in query.split("&")) { | |
| 16347 var keyvalue = part.split("="); | |
| 16348 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16349 } | |
| 16350 } | |
| 16351 | |
| 16352 | |
| 16353 var h = { | |
| 16354 "content-type" : "application/json; charset=utf-8", | |
| 16355 }; | |
| 16356 var resp = ""; | |
| 16357 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16358 }), true); | |
| 16359 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16360 }); | |
| 16361 | |
| 16362 unittest.test("method--generatetag", () { | |
| 16363 | |
| 16364 var mock = new HttpServerMock(); | |
| 16365 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16366 var arg_profileId = "foo"; | |
| 16367 var arg_floodlightActivityId = "foo"; | |
| 16368 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16369 var path = (req.url).path; | |
| 16370 var pathOffset = 0; | |
| 16371 var index; | |
| 16372 var subPart; | |
| 16373 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16374 pathOffset += 1; | |
| 16375 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16376 pathOffset += 18; | |
| 16377 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16378 pathOffset += 13; | |
| 16379 index = path.indexOf("/floodlightActivities/generatetag", pathOffset); | |
| 16380 unittest.expect(index >= 0, unittest.isTrue); | |
| 16381 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16382 pathOffset = index; | |
| 16383 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16384 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/floodlightActivities/generatetag")); | |
| 16385 pathOffset += 33; | |
| 16386 | |
| 16387 var query = (req.url).query; | |
| 16388 var queryOffset = 0; | |
| 16389 var queryMap = {}; | |
| 16390 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16391 parseBool(n) { | |
| 16392 if (n == "true") return true; | |
| 16393 if (n == "false") return false; | |
| 16394 if (n == null) return null; | |
| 16395 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16396 } | |
| 16397 if (query.length > 0) { | |
| 16398 for (var part in query.split("&")) { | |
| 16399 var keyvalue = part.split("="); | |
| 16400 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16401 } | |
| 16402 } | |
| 16403 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 16404 | |
| 16405 | |
| 16406 var h = { | |
| 16407 "content-type" : "application/json; charset=utf-8", | |
| 16408 }; | |
| 16409 var resp = convert.JSON.encode(buildFloodlightActivitiesGenerateTagRespo
nse()); | |
| 16410 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16411 }), true); | |
| 16412 res.generatetag(arg_profileId, floodlightActivityId: arg_floodlightActivit
yId).then(unittest.expectAsync(((api.FloodlightActivitiesGenerateTagResponse res
ponse) { | |
| 16413 checkFloodlightActivitiesGenerateTagResponse(response); | |
| 16414 }))); | |
| 16415 }); | |
| 16416 | |
| 16417 unittest.test("method--get", () { | |
| 16418 | |
| 16419 var mock = new HttpServerMock(); | |
| 16420 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16421 var arg_profileId = "foo"; | |
| 16422 var arg_id = "foo"; | |
| 16423 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16424 var path = (req.url).path; | |
| 16425 var pathOffset = 0; | |
| 16426 var index; | |
| 16427 var subPart; | |
| 16428 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16429 pathOffset += 1; | |
| 16430 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16431 pathOffset += 18; | |
| 16432 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16433 pathOffset += 13; | |
| 16434 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16435 unittest.expect(index >= 0, unittest.isTrue); | |
| 16436 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16437 pathOffset = index; | |
| 16438 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16439 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16440 pathOffset += 22; | |
| 16441 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16442 pathOffset = path.length; | |
| 16443 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16444 | |
| 16445 var query = (req.url).query; | |
| 16446 var queryOffset = 0; | |
| 16447 var queryMap = {}; | |
| 16448 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16449 parseBool(n) { | |
| 16450 if (n == "true") return true; | |
| 16451 if (n == "false") return false; | |
| 16452 if (n == null) return null; | |
| 16453 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16454 } | |
| 16455 if (query.length > 0) { | |
| 16456 for (var part in query.split("&")) { | |
| 16457 var keyvalue = part.split("="); | |
| 16458 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16459 } | |
| 16460 } | |
| 16461 | |
| 16462 | |
| 16463 var h = { | |
| 16464 "content-type" : "application/json; charset=utf-8", | |
| 16465 }; | |
| 16466 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16467 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16468 }), true); | |
| 16469 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivity response) { | |
| 16470 checkFloodlightActivity(response); | |
| 16471 }))); | |
| 16472 }); | |
| 16473 | |
| 16474 unittest.test("method--insert", () { | |
| 16475 | |
| 16476 var mock = new HttpServerMock(); | |
| 16477 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16478 var arg_request = buildFloodlightActivity(); | |
| 16479 var arg_profileId = "foo"; | |
| 16480 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16481 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16482 checkFloodlightActivity(obj); | |
| 16483 | |
| 16484 var path = (req.url).path; | |
| 16485 var pathOffset = 0; | |
| 16486 var index; | |
| 16487 var subPart; | |
| 16488 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16489 pathOffset += 1; | |
| 16490 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16491 pathOffset += 18; | |
| 16492 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16493 pathOffset += 13; | |
| 16494 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16495 unittest.expect(index >= 0, unittest.isTrue); | |
| 16496 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16497 pathOffset = index; | |
| 16498 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16499 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16500 pathOffset += 21; | |
| 16501 | |
| 16502 var query = (req.url).query; | |
| 16503 var queryOffset = 0; | |
| 16504 var queryMap = {}; | |
| 16505 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16506 parseBool(n) { | |
| 16507 if (n == "true") return true; | |
| 16508 if (n == "false") return false; | |
| 16509 if (n == null) return null; | |
| 16510 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16511 } | |
| 16512 if (query.length > 0) { | |
| 16513 for (var part in query.split("&")) { | |
| 16514 var keyvalue = part.split("="); | |
| 16515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16516 } | |
| 16517 } | |
| 16518 | |
| 16519 | |
| 16520 var h = { | |
| 16521 "content-type" : "application/json; charset=utf-8", | |
| 16522 }; | |
| 16523 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16524 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16525 }), true); | |
| 16526 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16527 checkFloodlightActivity(response); | |
| 16528 }))); | |
| 16529 }); | |
| 16530 | |
| 16531 unittest.test("method--list", () { | |
| 16532 | |
| 16533 var mock = new HttpServerMock(); | |
| 16534 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16535 var arg_profileId = "foo"; | |
| 16536 var arg_advertiserId = "foo"; | |
| 16537 var arg_floodlightActivityGroupIds = buildUnnamed3261(); | |
| 16538 var arg_floodlightActivityGroupName = "foo"; | |
| 16539 var arg_floodlightActivityGroupTagString = "foo"; | |
| 16540 var arg_floodlightActivityGroupType = "foo"; | |
| 16541 var arg_floodlightConfigurationId = "foo"; | |
| 16542 var arg_ids = buildUnnamed3262(); | |
| 16543 var arg_maxResults = 42; | |
| 16544 var arg_pageToken = "foo"; | |
| 16545 var arg_searchString = "foo"; | |
| 16546 var arg_sortField = "foo"; | |
| 16547 var arg_sortOrder = "foo"; | |
| 16548 var arg_tagString = "foo"; | |
| 16549 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16550 var path = (req.url).path; | |
| 16551 var pathOffset = 0; | |
| 16552 var index; | |
| 16553 var subPart; | |
| 16554 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16555 pathOffset += 1; | |
| 16556 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16557 pathOffset += 18; | |
| 16558 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16559 pathOffset += 13; | |
| 16560 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16561 unittest.expect(index >= 0, unittest.isTrue); | |
| 16562 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16563 pathOffset = index; | |
| 16564 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16565 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16566 pathOffset += 21; | |
| 16567 | |
| 16568 var query = (req.url).query; | |
| 16569 var queryOffset = 0; | |
| 16570 var queryMap = {}; | |
| 16571 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16572 parseBool(n) { | |
| 16573 if (n == "true") return true; | |
| 16574 if (n == "false") return false; | |
| 16575 if (n == null) return null; | |
| 16576 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16577 } | |
| 16578 if (query.length > 0) { | |
| 16579 for (var part in query.split("&")) { | |
| 16580 var keyvalue = part.split("="); | |
| 16581 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16582 } | |
| 16583 } | |
| 16584 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16585 unittest.expect(queryMap["floodlightActivityGroupIds"], unittest.equals(
arg_floodlightActivityGroupIds)); | |
| 16586 unittest.expect(queryMap["floodlightActivityGroupName"].first, unittest.
equals(arg_floodlightActivityGroupName)); | |
| 16587 unittest.expect(queryMap["floodlightActivityGroupTagString"].first, unit
test.equals(arg_floodlightActivityGroupTagString)); | |
| 16588 unittest.expect(queryMap["floodlightActivityGroupType"].first, unittest.
equals(arg_floodlightActivityGroupType)); | |
| 16589 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16590 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16591 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16592 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16593 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16594 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16595 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16596 unittest.expect(queryMap["tagString"].first, unittest.equals(arg_tagStri
ng)); | |
| 16597 | |
| 16598 | |
| 16599 var h = { | |
| 16600 "content-type" : "application/json; charset=utf-8", | |
| 16601 }; | |
| 16602 var resp = convert.JSON.encode(buildFloodlightActivitiesListResponse()); | |
| 16603 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16604 }), true); | |
| 16605 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) { | |
| 16606 checkFloodlightActivitiesListResponse(response); | |
| 16607 }))); | |
| 16608 }); | |
| 16609 | |
| 16610 unittest.test("method--patch", () { | |
| 16611 | |
| 16612 var mock = new HttpServerMock(); | |
| 16613 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16614 var arg_request = buildFloodlightActivity(); | |
| 16615 var arg_profileId = "foo"; | |
| 16616 var arg_id = "foo"; | |
| 16617 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16618 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16619 checkFloodlightActivity(obj); | |
| 16620 | |
| 16621 var path = (req.url).path; | |
| 16622 var pathOffset = 0; | |
| 16623 var index; | |
| 16624 var subPart; | |
| 16625 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16626 pathOffset += 1; | |
| 16627 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16628 pathOffset += 18; | |
| 16629 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16630 pathOffset += 13; | |
| 16631 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16632 unittest.expect(index >= 0, unittest.isTrue); | |
| 16633 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16634 pathOffset = index; | |
| 16635 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16636 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16637 pathOffset += 21; | |
| 16638 | |
| 16639 var query = (req.url).query; | |
| 16640 var queryOffset = 0; | |
| 16641 var queryMap = {}; | |
| 16642 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16643 parseBool(n) { | |
| 16644 if (n == "true") return true; | |
| 16645 if (n == "false") return false; | |
| 16646 if (n == null) return null; | |
| 16647 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16648 } | |
| 16649 if (query.length > 0) { | |
| 16650 for (var part in query.split("&")) { | |
| 16651 var keyvalue = part.split("="); | |
| 16652 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16653 } | |
| 16654 } | |
| 16655 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16656 | |
| 16657 | |
| 16658 var h = { | |
| 16659 "content-type" : "application/json; charset=utf-8", | |
| 16660 }; | |
| 16661 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16662 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16663 }), true); | |
| 16664 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivity response) { | |
| 16665 checkFloodlightActivity(response); | |
| 16666 }))); | |
| 16667 }); | |
| 16668 | |
| 16669 unittest.test("method--update", () { | |
| 16670 | |
| 16671 var mock = new HttpServerMock(); | |
| 16672 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16673 var arg_request = buildFloodlightActivity(); | |
| 16674 var arg_profileId = "foo"; | |
| 16675 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16676 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16677 checkFloodlightActivity(obj); | |
| 16678 | |
| 16679 var path = (req.url).path; | |
| 16680 var pathOffset = 0; | |
| 16681 var index; | |
| 16682 var subPart; | |
| 16683 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16684 pathOffset += 1; | |
| 16685 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16686 pathOffset += 18; | |
| 16687 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16688 pathOffset += 13; | |
| 16689 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16690 unittest.expect(index >= 0, unittest.isTrue); | |
| 16691 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16692 pathOffset = index; | |
| 16693 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16694 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16695 pathOffset += 21; | |
| 16696 | |
| 16697 var query = (req.url).query; | |
| 16698 var queryOffset = 0; | |
| 16699 var queryMap = {}; | |
| 16700 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16701 parseBool(n) { | |
| 16702 if (n == "true") return true; | |
| 16703 if (n == "false") return false; | |
| 16704 if (n == null) return null; | |
| 16705 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16706 } | |
| 16707 if (query.length > 0) { | |
| 16708 for (var part in query.split("&")) { | |
| 16709 var keyvalue = part.split("="); | |
| 16710 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16711 } | |
| 16712 } | |
| 16713 | |
| 16714 | |
| 16715 var h = { | |
| 16716 "content-type" : "application/json; charset=utf-8", | |
| 16717 }; | |
| 16718 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16719 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16720 }), true); | |
| 16721 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16722 checkFloodlightActivity(response); | |
| 16723 }))); | |
| 16724 }); | |
| 16725 | |
| 16726 }); | |
| 16727 | |
| 16728 | |
| 16729 unittest.group("resource-FloodlightActivityGroupsResourceApi", () { | |
| 16730 unittest.test("method--delete", () { | |
| 16731 | |
| 16732 var mock = new HttpServerMock(); | |
| 16733 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16734 var arg_profileId = "foo"; | |
| 16735 var arg_id = "foo"; | |
| 16736 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16737 var path = (req.url).path; | |
| 16738 var pathOffset = 0; | |
| 16739 var index; | |
| 16740 var subPart; | |
| 16741 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16742 pathOffset += 1; | |
| 16743 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16744 pathOffset += 18; | |
| 16745 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16746 pathOffset += 13; | |
| 16747 index = path.indexOf("/floodlightActivityGroups/", pathOffset); | |
| 16748 unittest.expect(index >= 0, unittest.isTrue); | |
| 16749 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16750 pathOffset = index; | |
| 16751 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16752 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightActivityGroups/")); | |
| 16753 pathOffset += 26; | |
| 16754 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16755 pathOffset = path.length; | |
| 16756 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16757 | |
| 16758 var query = (req.url).query; | |
| 16759 var queryOffset = 0; | |
| 16760 var queryMap = {}; | |
| 16761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16762 parseBool(n) { | |
| 16763 if (n == "true") return true; | |
| 16764 if (n == "false") return false; | |
| 16765 if (n == null) return null; | |
| 16766 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16767 } | |
| 16768 if (query.length > 0) { | |
| 16769 for (var part in query.split("&")) { | |
| 16770 var keyvalue = part.split("="); | |
| 16771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16772 } | |
| 16773 } | |
| 16774 | |
| 16775 | |
| 16776 var h = { | |
| 16777 "content-type" : "application/json; charset=utf-8", | |
| 16778 }; | |
| 16779 var resp = ""; | |
| 16780 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16781 }), true); | |
| 16782 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16783 }); | |
| 16784 | |
| 16785 unittest.test("method--get", () { | |
| 16786 | |
| 16787 var mock = new HttpServerMock(); | |
| 16788 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16789 var arg_profileId = "foo"; | |
| 16790 var arg_id = "foo"; | |
| 16791 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16792 var path = (req.url).path; | |
| 16793 var pathOffset = 0; | |
| 16794 var index; | |
| 16795 var subPart; | |
| 16796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16797 pathOffset += 1; | |
| 16798 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16799 pathOffset += 18; | |
| 16800 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16801 pathOffset += 13; | |
| 16802 index = path.indexOf("/floodlightActivityGroups/", pathOffset); | |
| 16803 unittest.expect(index >= 0, unittest.isTrue); | |
| 16804 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16805 pathOffset = index; | |
| 16806 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16807 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightActivityGroups/")); | |
| 16808 pathOffset += 26; | |
| 16809 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16810 pathOffset = path.length; | |
| 16811 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16812 | |
| 16813 var query = (req.url).query; | |
| 16814 var queryOffset = 0; | |
| 16815 var queryMap = {}; | |
| 16816 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16817 parseBool(n) { | |
| 16818 if (n == "true") return true; | |
| 16819 if (n == "false") return false; | |
| 16820 if (n == null) return null; | |
| 16821 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16822 } | |
| 16823 if (query.length > 0) { | |
| 16824 for (var part in query.split("&")) { | |
| 16825 var keyvalue = part.split("="); | |
| 16826 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16827 } | |
| 16828 } | |
| 16829 | |
| 16830 | |
| 16831 var h = { | |
| 16832 "content-type" : "application/json; charset=utf-8", | |
| 16833 }; | |
| 16834 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16835 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16836 }), true); | |
| 16837 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivityGroup response) { | |
| 16838 checkFloodlightActivityGroup(response); | |
| 16839 }))); | |
| 16840 }); | |
| 16841 | |
| 16842 unittest.test("method--insert", () { | |
| 16843 | |
| 16844 var mock = new HttpServerMock(); | |
| 16845 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16846 var arg_request = buildFloodlightActivityGroup(); | |
| 16847 var arg_profileId = "foo"; | |
| 16848 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16849 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16850 checkFloodlightActivityGroup(obj); | |
| 16851 | |
| 16852 var path = (req.url).path; | |
| 16853 var pathOffset = 0; | |
| 16854 var index; | |
| 16855 var subPart; | |
| 16856 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16857 pathOffset += 1; | |
| 16858 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16859 pathOffset += 18; | |
| 16860 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16861 pathOffset += 13; | |
| 16862 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16863 unittest.expect(index >= 0, unittest.isTrue); | |
| 16864 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16865 pathOffset = index; | |
| 16866 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16867 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16868 pathOffset += 25; | |
| 16869 | |
| 16870 var query = (req.url).query; | |
| 16871 var queryOffset = 0; | |
| 16872 var queryMap = {}; | |
| 16873 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16874 parseBool(n) { | |
| 16875 if (n == "true") return true; | |
| 16876 if (n == "false") return false; | |
| 16877 if (n == null) return null; | |
| 16878 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16879 } | |
| 16880 if (query.length > 0) { | |
| 16881 for (var part in query.split("&")) { | |
| 16882 var keyvalue = part.split("="); | |
| 16883 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16884 } | |
| 16885 } | |
| 16886 | |
| 16887 | |
| 16888 var h = { | |
| 16889 "content-type" : "application/json; charset=utf-8", | |
| 16890 }; | |
| 16891 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16892 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16893 }), true); | |
| 16894 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 16895 checkFloodlightActivityGroup(response); | |
| 16896 }))); | |
| 16897 }); | |
| 16898 | |
| 16899 unittest.test("method--list", () { | |
| 16900 | |
| 16901 var mock = new HttpServerMock(); | |
| 16902 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16903 var arg_profileId = "foo"; | |
| 16904 var arg_advertiserId = "foo"; | |
| 16905 var arg_floodlightConfigurationId = "foo"; | |
| 16906 var arg_ids = buildUnnamed3263(); | |
| 16907 var arg_maxResults = 42; | |
| 16908 var arg_pageToken = "foo"; | |
| 16909 var arg_searchString = "foo"; | |
| 16910 var arg_sortField = "foo"; | |
| 16911 var arg_sortOrder = "foo"; | |
| 16912 var arg_type = "foo"; | |
| 16913 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16914 var path = (req.url).path; | |
| 16915 var pathOffset = 0; | |
| 16916 var index; | |
| 16917 var subPart; | |
| 16918 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16919 pathOffset += 1; | |
| 16920 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16921 pathOffset += 18; | |
| 16922 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16923 pathOffset += 13; | |
| 16924 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16925 unittest.expect(index >= 0, unittest.isTrue); | |
| 16926 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16927 pathOffset = index; | |
| 16928 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16929 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16930 pathOffset += 25; | |
| 16931 | |
| 16932 var query = (req.url).query; | |
| 16933 var queryOffset = 0; | |
| 16934 var queryMap = {}; | |
| 16935 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16936 parseBool(n) { | |
| 16937 if (n == "true") return true; | |
| 16938 if (n == "false") return false; | |
| 16939 if (n == null) return null; | |
| 16940 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16941 } | |
| 16942 if (query.length > 0) { | |
| 16943 for (var part in query.split("&")) { | |
| 16944 var keyvalue = part.split("="); | |
| 16945 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16946 } | |
| 16947 } | |
| 16948 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16949 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16950 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16951 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16952 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16953 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16954 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16955 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16956 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 16957 | |
| 16958 | |
| 16959 var h = { | |
| 16960 "content-type" : "application/json; charset=utf-8", | |
| 16961 }; | |
| 16962 var resp = convert.JSON.encode(buildFloodlightActivityGroupsListResponse
()); | |
| 16963 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16964 }), true); | |
| 16965 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) { | |
| 16966 checkFloodlightActivityGroupsListResponse(response); | |
| 16967 }))); | |
| 16968 }); | |
| 16969 | |
| 16970 unittest.test("method--patch", () { | |
| 16971 | |
| 16972 var mock = new HttpServerMock(); | |
| 16973 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16974 var arg_request = buildFloodlightActivityGroup(); | |
| 16975 var arg_profileId = "foo"; | |
| 16976 var arg_id = "foo"; | |
| 16977 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16978 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16979 checkFloodlightActivityGroup(obj); | |
| 16980 | |
| 16981 var path = (req.url).path; | |
| 16982 var pathOffset = 0; | |
| 16983 var index; | |
| 16984 var subPart; | |
| 16985 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16986 pathOffset += 1; | |
| 16987 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 16988 pathOffset += 18; | |
| 16989 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16990 pathOffset += 13; | |
| 16991 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16992 unittest.expect(index >= 0, unittest.isTrue); | |
| 16993 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16994 pathOffset = index; | |
| 16995 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16996 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16997 pathOffset += 25; | |
| 16998 | |
| 16999 var query = (req.url).query; | |
| 17000 var queryOffset = 0; | |
| 17001 var queryMap = {}; | |
| 17002 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17003 parseBool(n) { | |
| 17004 if (n == "true") return true; | |
| 17005 if (n == "false") return false; | |
| 17006 if (n == null) return null; | |
| 17007 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17008 } | |
| 17009 if (query.length > 0) { | |
| 17010 for (var part in query.split("&")) { | |
| 17011 var keyvalue = part.split("="); | |
| 17012 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17013 } | |
| 17014 } | |
| 17015 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17016 | |
| 17017 | |
| 17018 var h = { | |
| 17019 "content-type" : "application/json; charset=utf-8", | |
| 17020 }; | |
| 17021 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17022 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17023 }), true); | |
| 17024 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivityGroup response) { | |
| 17025 checkFloodlightActivityGroup(response); | |
| 17026 }))); | |
| 17027 }); | |
| 17028 | |
| 17029 unittest.test("method--update", () { | |
| 17030 | |
| 17031 var mock = new HttpServerMock(); | |
| 17032 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17033 var arg_request = buildFloodlightActivityGroup(); | |
| 17034 var arg_profileId = "foo"; | |
| 17035 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17036 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 17037 checkFloodlightActivityGroup(obj); | |
| 17038 | |
| 17039 var path = (req.url).path; | |
| 17040 var pathOffset = 0; | |
| 17041 var index; | |
| 17042 var subPart; | |
| 17043 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17044 pathOffset += 1; | |
| 17045 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17046 pathOffset += 18; | |
| 17047 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17048 pathOffset += 13; | |
| 17049 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17050 unittest.expect(index >= 0, unittest.isTrue); | |
| 17051 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17052 pathOffset = index; | |
| 17053 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17054 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17055 pathOffset += 25; | |
| 17056 | |
| 17057 var query = (req.url).query; | |
| 17058 var queryOffset = 0; | |
| 17059 var queryMap = {}; | |
| 17060 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17061 parseBool(n) { | |
| 17062 if (n == "true") return true; | |
| 17063 if (n == "false") return false; | |
| 17064 if (n == null) return null; | |
| 17065 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17066 } | |
| 17067 if (query.length > 0) { | |
| 17068 for (var part in query.split("&")) { | |
| 17069 var keyvalue = part.split("="); | |
| 17070 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17071 } | |
| 17072 } | |
| 17073 | |
| 17074 | |
| 17075 var h = { | |
| 17076 "content-type" : "application/json; charset=utf-8", | |
| 17077 }; | |
| 17078 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17079 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17080 }), true); | |
| 17081 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 17082 checkFloodlightActivityGroup(response); | |
| 17083 }))); | |
| 17084 }); | |
| 17085 | |
| 17086 }); | |
| 17087 | |
| 17088 | |
| 17089 unittest.group("resource-FloodlightConfigurationsResourceApi", () { | |
| 17090 unittest.test("method--get", () { | |
| 17091 | |
| 17092 var mock = new HttpServerMock(); | |
| 17093 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17094 var arg_profileId = "foo"; | |
| 17095 var arg_id = "foo"; | |
| 17096 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17097 var path = (req.url).path; | |
| 17098 var pathOffset = 0; | |
| 17099 var index; | |
| 17100 var subPart; | |
| 17101 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17102 pathOffset += 1; | |
| 17103 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17104 pathOffset += 18; | |
| 17105 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17106 pathOffset += 13; | |
| 17107 index = path.indexOf("/floodlightConfigurations/", pathOffset); | |
| 17108 unittest.expect(index >= 0, unittest.isTrue); | |
| 17109 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17110 pathOffset = index; | |
| 17111 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17112 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightConfigurations/")); | |
| 17113 pathOffset += 26; | |
| 17114 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17115 pathOffset = path.length; | |
| 17116 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17117 | |
| 17118 var query = (req.url).query; | |
| 17119 var queryOffset = 0; | |
| 17120 var queryMap = {}; | |
| 17121 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17122 parseBool(n) { | |
| 17123 if (n == "true") return true; | |
| 17124 if (n == "false") return false; | |
| 17125 if (n == null) return null; | |
| 17126 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17127 } | |
| 17128 if (query.length > 0) { | |
| 17129 for (var part in query.split("&")) { | |
| 17130 var keyvalue = part.split("="); | |
| 17131 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17132 } | |
| 17133 } | |
| 17134 | |
| 17135 | |
| 17136 var h = { | |
| 17137 "content-type" : "application/json; charset=utf-8", | |
| 17138 }; | |
| 17139 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17140 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17141 }), true); | |
| 17142 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightC
onfiguration response) { | |
| 17143 checkFloodlightConfiguration(response); | |
| 17144 }))); | |
| 17145 }); | |
| 17146 | |
| 17147 unittest.test("method--list", () { | |
| 17148 | |
| 17149 var mock = new HttpServerMock(); | |
| 17150 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17151 var arg_profileId = "foo"; | |
| 17152 var arg_ids = buildUnnamed3264(); | |
| 17153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17154 var path = (req.url).path; | |
| 17155 var pathOffset = 0; | |
| 17156 var index; | |
| 17157 var subPart; | |
| 17158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17159 pathOffset += 1; | |
| 17160 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17161 pathOffset += 18; | |
| 17162 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17163 pathOffset += 13; | |
| 17164 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17165 unittest.expect(index >= 0, unittest.isTrue); | |
| 17166 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17167 pathOffset = index; | |
| 17168 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17169 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17170 pathOffset += 25; | |
| 17171 | |
| 17172 var query = (req.url).query; | |
| 17173 var queryOffset = 0; | |
| 17174 var queryMap = {}; | |
| 17175 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17176 parseBool(n) { | |
| 17177 if (n == "true") return true; | |
| 17178 if (n == "false") return false; | |
| 17179 if (n == null) return null; | |
| 17180 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17181 } | |
| 17182 if (query.length > 0) { | |
| 17183 for (var part in query.split("&")) { | |
| 17184 var keyvalue = part.split("="); | |
| 17185 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17186 } | |
| 17187 } | |
| 17188 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17189 | |
| 17190 | |
| 17191 var h = { | |
| 17192 "content-type" : "application/json; charset=utf-8", | |
| 17193 }; | |
| 17194 var resp = convert.JSON.encode(buildFloodlightConfigurationsListResponse
()); | |
| 17195 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17196 }), true); | |
| 17197 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.Floo
dlightConfigurationsListResponse response) { | |
| 17198 checkFloodlightConfigurationsListResponse(response); | |
| 17199 }))); | |
| 17200 }); | |
| 17201 | |
| 17202 unittest.test("method--patch", () { | |
| 17203 | |
| 17204 var mock = new HttpServerMock(); | |
| 17205 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17206 var arg_request = buildFloodlightConfiguration(); | |
| 17207 var arg_profileId = "foo"; | |
| 17208 var arg_id = "foo"; | |
| 17209 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17210 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17211 checkFloodlightConfiguration(obj); | |
| 17212 | |
| 17213 var path = (req.url).path; | |
| 17214 var pathOffset = 0; | |
| 17215 var index; | |
| 17216 var subPart; | |
| 17217 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17218 pathOffset += 1; | |
| 17219 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17220 pathOffset += 18; | |
| 17221 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17222 pathOffset += 13; | |
| 17223 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17224 unittest.expect(index >= 0, unittest.isTrue); | |
| 17225 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17226 pathOffset = index; | |
| 17227 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17228 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17229 pathOffset += 25; | |
| 17230 | |
| 17231 var query = (req.url).query; | |
| 17232 var queryOffset = 0; | |
| 17233 var queryMap = {}; | |
| 17234 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17235 parseBool(n) { | |
| 17236 if (n == "true") return true; | |
| 17237 if (n == "false") return false; | |
| 17238 if (n == null) return null; | |
| 17239 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17240 } | |
| 17241 if (query.length > 0) { | |
| 17242 for (var part in query.split("&")) { | |
| 17243 var keyvalue = part.split("="); | |
| 17244 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17245 } | |
| 17246 } | |
| 17247 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17248 | |
| 17249 | |
| 17250 var h = { | |
| 17251 "content-type" : "application/json; charset=utf-8", | |
| 17252 }; | |
| 17253 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17254 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17255 }), true); | |
| 17256 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightConfiguration response) { | |
| 17257 checkFloodlightConfiguration(response); | |
| 17258 }))); | |
| 17259 }); | |
| 17260 | |
| 17261 unittest.test("method--update", () { | |
| 17262 | |
| 17263 var mock = new HttpServerMock(); | |
| 17264 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17265 var arg_request = buildFloodlightConfiguration(); | |
| 17266 var arg_profileId = "foo"; | |
| 17267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17268 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17269 checkFloodlightConfiguration(obj); | |
| 17270 | |
| 17271 var path = (req.url).path; | |
| 17272 var pathOffset = 0; | |
| 17273 var index; | |
| 17274 var subPart; | |
| 17275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17276 pathOffset += 1; | |
| 17277 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17278 pathOffset += 18; | |
| 17279 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17280 pathOffset += 13; | |
| 17281 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17282 unittest.expect(index >= 0, unittest.isTrue); | |
| 17283 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17284 pathOffset = index; | |
| 17285 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17286 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17287 pathOffset += 25; | |
| 17288 | |
| 17289 var query = (req.url).query; | |
| 17290 var queryOffset = 0; | |
| 17291 var queryMap = {}; | |
| 17292 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17293 parseBool(n) { | |
| 17294 if (n == "true") return true; | |
| 17295 if (n == "false") return false; | |
| 17296 if (n == null) return null; | |
| 17297 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17298 } | |
| 17299 if (query.length > 0) { | |
| 17300 for (var part in query.split("&")) { | |
| 17301 var keyvalue = part.split("="); | |
| 17302 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17303 } | |
| 17304 } | |
| 17305 | |
| 17306 | |
| 17307 var h = { | |
| 17308 "content-type" : "application/json; charset=utf-8", | |
| 17309 }; | |
| 17310 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17311 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17312 }), true); | |
| 17313 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightConfiguration response) { | |
| 17314 checkFloodlightConfiguration(response); | |
| 17315 }))); | |
| 17316 }); | |
| 17317 | |
| 17318 }); | |
| 17319 | |
| 17320 | |
| 17321 unittest.group("resource-InventoryItemsResourceApi", () { | |
| 17322 unittest.test("method--get", () { | |
| 17323 | |
| 17324 var mock = new HttpServerMock(); | |
| 17325 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17326 var arg_profileId = "foo"; | |
| 17327 var arg_projectId = "foo"; | |
| 17328 var arg_id = "foo"; | |
| 17329 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17330 var path = (req.url).path; | |
| 17331 var pathOffset = 0; | |
| 17332 var index; | |
| 17333 var subPart; | |
| 17334 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17335 pathOffset += 1; | |
| 17336 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17337 pathOffset += 18; | |
| 17338 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17339 pathOffset += 13; | |
| 17340 index = path.indexOf("/projects/", pathOffset); | |
| 17341 unittest.expect(index >= 0, unittest.isTrue); | |
| 17342 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17343 pathOffset = index; | |
| 17344 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17345 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17346 pathOffset += 10; | |
| 17347 index = path.indexOf("/inventoryItems/", pathOffset); | |
| 17348 unittest.expect(index >= 0, unittest.isTrue); | |
| 17349 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17350 pathOffset = index; | |
| 17351 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17352 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/inventoryItems/")); | |
| 17353 pathOffset += 16; | |
| 17354 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17355 pathOffset = path.length; | |
| 17356 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17357 | |
| 17358 var query = (req.url).query; | |
| 17359 var queryOffset = 0; | |
| 17360 var queryMap = {}; | |
| 17361 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17362 parseBool(n) { | |
| 17363 if (n == "true") return true; | |
| 17364 if (n == "false") return false; | |
| 17365 if (n == null) return null; | |
| 17366 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17367 } | |
| 17368 if (query.length > 0) { | |
| 17369 for (var part in query.split("&")) { | |
| 17370 var keyvalue = part.split("="); | |
| 17371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17372 } | |
| 17373 } | |
| 17374 | |
| 17375 | |
| 17376 var h = { | |
| 17377 "content-type" : "application/json; charset=utf-8", | |
| 17378 }; | |
| 17379 var resp = convert.JSON.encode(buildInventoryItem()); | |
| 17380 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17381 }), true); | |
| 17382 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.InventoryItem response) { | |
| 17383 checkInventoryItem(response); | |
| 17384 }))); | |
| 17385 }); | |
| 17386 | |
| 17387 unittest.test("method--list", () { | |
| 17388 | |
| 17389 var mock = new HttpServerMock(); | |
| 17390 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17391 var arg_profileId = "foo"; | |
| 17392 var arg_projectId = "foo"; | |
| 17393 var arg_ids = buildUnnamed3265(); | |
| 17394 var arg_inPlan = true; | |
| 17395 var arg_maxResults = 42; | |
| 17396 var arg_orderId = buildUnnamed3266(); | |
| 17397 var arg_pageToken = "foo"; | |
| 17398 var arg_siteId = buildUnnamed3267(); | |
| 17399 var arg_sortField = "foo"; | |
| 17400 var arg_sortOrder = "foo"; | |
| 17401 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17402 var path = (req.url).path; | |
| 17403 var pathOffset = 0; | |
| 17404 var index; | |
| 17405 var subPart; | |
| 17406 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17407 pathOffset += 1; | |
| 17408 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17409 pathOffset += 18; | |
| 17410 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17411 pathOffset += 13; | |
| 17412 index = path.indexOf("/projects/", pathOffset); | |
| 17413 unittest.expect(index >= 0, unittest.isTrue); | |
| 17414 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17415 pathOffset = index; | |
| 17416 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17417 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17418 pathOffset += 10; | |
| 17419 index = path.indexOf("/inventoryItems", pathOffset); | |
| 17420 unittest.expect(index >= 0, unittest.isTrue); | |
| 17421 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17422 pathOffset = index; | |
| 17423 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17424 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/inventoryItems")); | |
| 17425 pathOffset += 15; | |
| 17426 | |
| 17427 var query = (req.url).query; | |
| 17428 var queryOffset = 0; | |
| 17429 var queryMap = {}; | |
| 17430 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17431 parseBool(n) { | |
| 17432 if (n == "true") return true; | |
| 17433 if (n == "false") return false; | |
| 17434 if (n == null) return null; | |
| 17435 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17436 } | |
| 17437 if (query.length > 0) { | |
| 17438 for (var part in query.split("&")) { | |
| 17439 var keyvalue = part.split("="); | |
| 17440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17441 } | |
| 17442 } | |
| 17443 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17444 unittest.expect(queryMap["inPlan"].first, unittest.equals("$arg_inPlan")
); | |
| 17445 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 17446 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 17447 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 17448 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 17449 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 17450 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 17451 | |
| 17452 | |
| 17453 var h = { | |
| 17454 "content-type" : "application/json; charset=utf-8", | |
| 17455 }; | |
| 17456 var resp = convert.JSON.encode(buildInventoryItemsListResponse()); | |
| 17457 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17458 }), true); | |
| 17459 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).then(unittest
.expectAsync(((api.InventoryItemsListResponse response) { | |
| 17460 checkInventoryItemsListResponse(response); | |
| 17461 }))); | |
| 17462 }); | |
| 17463 | |
| 17464 }); | |
| 17465 | |
| 17466 | |
| 17467 unittest.group("resource-LandingPagesResourceApi", () { | |
| 17468 unittest.test("method--delete", () { | |
| 17469 | |
| 17470 var mock = new HttpServerMock(); | |
| 17471 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17472 var arg_profileId = "foo"; | |
| 17473 var arg_campaignId = "foo"; | |
| 17474 var arg_id = "foo"; | |
| 17475 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17476 var path = (req.url).path; | |
| 17477 var pathOffset = 0; | |
| 17478 var index; | |
| 17479 var subPart; | |
| 17480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17481 pathOffset += 1; | |
| 17482 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17483 pathOffset += 18; | |
| 17484 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17485 pathOffset += 13; | |
| 17486 index = path.indexOf("/campaigns/", pathOffset); | |
| 17487 unittest.expect(index >= 0, unittest.isTrue); | |
| 17488 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17489 pathOffset = index; | |
| 17490 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17491 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17492 pathOffset += 11; | |
| 17493 index = path.indexOf("/landingPages/", pathOffset); | |
| 17494 unittest.expect(index >= 0, unittest.isTrue); | |
| 17495 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17496 pathOffset = index; | |
| 17497 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17498 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17499 pathOffset += 14; | |
| 17500 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17501 pathOffset = path.length; | |
| 17502 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17503 | |
| 17504 var query = (req.url).query; | |
| 17505 var queryOffset = 0; | |
| 17506 var queryMap = {}; | |
| 17507 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17508 parseBool(n) { | |
| 17509 if (n == "true") return true; | |
| 17510 if (n == "false") return false; | |
| 17511 if (n == null) return null; | |
| 17512 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17513 } | |
| 17514 if (query.length > 0) { | |
| 17515 for (var part in query.split("&")) { | |
| 17516 var keyvalue = part.split("="); | |
| 17517 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17518 } | |
| 17519 } | |
| 17520 | |
| 17521 | |
| 17522 var h = { | |
| 17523 "content-type" : "application/json; charset=utf-8", | |
| 17524 }; | |
| 17525 var resp = ""; | |
| 17526 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17527 }), true); | |
| 17528 res.delete(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsyn
c((_) {})); | |
| 17529 }); | |
| 17530 | |
| 17531 unittest.test("method--get", () { | |
| 17532 | |
| 17533 var mock = new HttpServerMock(); | |
| 17534 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17535 var arg_profileId = "foo"; | |
| 17536 var arg_campaignId = "foo"; | |
| 17537 var arg_id = "foo"; | |
| 17538 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17539 var path = (req.url).path; | |
| 17540 var pathOffset = 0; | |
| 17541 var index; | |
| 17542 var subPart; | |
| 17543 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17544 pathOffset += 1; | |
| 17545 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17546 pathOffset += 18; | |
| 17547 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17548 pathOffset += 13; | |
| 17549 index = path.indexOf("/campaigns/", pathOffset); | |
| 17550 unittest.expect(index >= 0, unittest.isTrue); | |
| 17551 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17552 pathOffset = index; | |
| 17553 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17554 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17555 pathOffset += 11; | |
| 17556 index = path.indexOf("/landingPages/", pathOffset); | |
| 17557 unittest.expect(index >= 0, unittest.isTrue); | |
| 17558 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17559 pathOffset = index; | |
| 17560 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17561 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17562 pathOffset += 14; | |
| 17563 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17564 pathOffset = path.length; | |
| 17565 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17566 | |
| 17567 var query = (req.url).query; | |
| 17568 var queryOffset = 0; | |
| 17569 var queryMap = {}; | |
| 17570 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17571 parseBool(n) { | |
| 17572 if (n == "true") return true; | |
| 17573 if (n == "false") return false; | |
| 17574 if (n == null) return null; | |
| 17575 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17576 } | |
| 17577 if (query.length > 0) { | |
| 17578 for (var part in query.split("&")) { | |
| 17579 var keyvalue = part.split("="); | |
| 17580 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17581 } | |
| 17582 } | |
| 17583 | |
| 17584 | |
| 17585 var h = { | |
| 17586 "content-type" : "application/json; charset=utf-8", | |
| 17587 }; | |
| 17588 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17589 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17590 }), true); | |
| 17591 res.get(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsync((
(api.LandingPage response) { | |
| 17592 checkLandingPage(response); | |
| 17593 }))); | |
| 17594 }); | |
| 17595 | |
| 17596 unittest.test("method--insert", () { | |
| 17597 | |
| 17598 var mock = new HttpServerMock(); | |
| 17599 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17600 var arg_request = buildLandingPage(); | |
| 17601 var arg_profileId = "foo"; | |
| 17602 var arg_campaignId = "foo"; | |
| 17603 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17604 var obj = new api.LandingPage.fromJson(json); | |
| 17605 checkLandingPage(obj); | |
| 17606 | |
| 17607 var path = (req.url).path; | |
| 17608 var pathOffset = 0; | |
| 17609 var index; | |
| 17610 var subPart; | |
| 17611 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17612 pathOffset += 1; | |
| 17613 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17614 pathOffset += 18; | |
| 17615 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17616 pathOffset += 13; | |
| 17617 index = path.indexOf("/campaigns/", pathOffset); | |
| 17618 unittest.expect(index >= 0, unittest.isTrue); | |
| 17619 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17620 pathOffset = index; | |
| 17621 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17622 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17623 pathOffset += 11; | |
| 17624 index = path.indexOf("/landingPages", pathOffset); | |
| 17625 unittest.expect(index >= 0, unittest.isTrue); | |
| 17626 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17627 pathOffset = index; | |
| 17628 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17629 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17630 pathOffset += 13; | |
| 17631 | |
| 17632 var query = (req.url).query; | |
| 17633 var queryOffset = 0; | |
| 17634 var queryMap = {}; | |
| 17635 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17636 parseBool(n) { | |
| 17637 if (n == "true") return true; | |
| 17638 if (n == "false") return false; | |
| 17639 if (n == null) return null; | |
| 17640 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17641 } | |
| 17642 if (query.length > 0) { | |
| 17643 for (var part in query.split("&")) { | |
| 17644 var keyvalue = part.split("="); | |
| 17645 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17646 } | |
| 17647 } | |
| 17648 | |
| 17649 | |
| 17650 var h = { | |
| 17651 "content-type" : "application/json; charset=utf-8", | |
| 17652 }; | |
| 17653 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17654 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17655 }), true); | |
| 17656 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17657 checkLandingPage(response); | |
| 17658 }))); | |
| 17659 }); | |
| 17660 | |
| 17661 unittest.test("method--list", () { | |
| 17662 | |
| 17663 var mock = new HttpServerMock(); | |
| 17664 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17665 var arg_profileId = "foo"; | |
| 17666 var arg_campaignId = "foo"; | |
| 17667 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17668 var path = (req.url).path; | |
| 17669 var pathOffset = 0; | |
| 17670 var index; | |
| 17671 var subPart; | |
| 17672 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17673 pathOffset += 1; | |
| 17674 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17675 pathOffset += 18; | |
| 17676 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17677 pathOffset += 13; | |
| 17678 index = path.indexOf("/campaigns/", pathOffset); | |
| 17679 unittest.expect(index >= 0, unittest.isTrue); | |
| 17680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17681 pathOffset = index; | |
| 17682 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17683 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17684 pathOffset += 11; | |
| 17685 index = path.indexOf("/landingPages", pathOffset); | |
| 17686 unittest.expect(index >= 0, unittest.isTrue); | |
| 17687 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17688 pathOffset = index; | |
| 17689 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17690 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17691 pathOffset += 13; | |
| 17692 | |
| 17693 var query = (req.url).query; | |
| 17694 var queryOffset = 0; | |
| 17695 var queryMap = {}; | |
| 17696 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17697 parseBool(n) { | |
| 17698 if (n == "true") return true; | |
| 17699 if (n == "false") return false; | |
| 17700 if (n == null) return null; | |
| 17701 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17702 } | |
| 17703 if (query.length > 0) { | |
| 17704 for (var part in query.split("&")) { | |
| 17705 var keyvalue = part.split("="); | |
| 17706 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17707 } | |
| 17708 } | |
| 17709 | |
| 17710 | |
| 17711 var h = { | |
| 17712 "content-type" : "application/json; charset=utf-8", | |
| 17713 }; | |
| 17714 var resp = convert.JSON.encode(buildLandingPagesListResponse()); | |
| 17715 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17716 }), true); | |
| 17717 res.list(arg_profileId, arg_campaignId).then(unittest.expectAsync(((api.La
ndingPagesListResponse response) { | |
| 17718 checkLandingPagesListResponse(response); | |
| 17719 }))); | |
| 17720 }); | |
| 17721 | |
| 17722 unittest.test("method--patch", () { | |
| 17723 | |
| 17724 var mock = new HttpServerMock(); | |
| 17725 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17726 var arg_request = buildLandingPage(); | |
| 17727 var arg_profileId = "foo"; | |
| 17728 var arg_campaignId = "foo"; | |
| 17729 var arg_id = "foo"; | |
| 17730 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17731 var obj = new api.LandingPage.fromJson(json); | |
| 17732 checkLandingPage(obj); | |
| 17733 | |
| 17734 var path = (req.url).path; | |
| 17735 var pathOffset = 0; | |
| 17736 var index; | |
| 17737 var subPart; | |
| 17738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17739 pathOffset += 1; | |
| 17740 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17741 pathOffset += 18; | |
| 17742 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17743 pathOffset += 13; | |
| 17744 index = path.indexOf("/campaigns/", pathOffset); | |
| 17745 unittest.expect(index >= 0, unittest.isTrue); | |
| 17746 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17747 pathOffset = index; | |
| 17748 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17749 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17750 pathOffset += 11; | |
| 17751 index = path.indexOf("/landingPages", pathOffset); | |
| 17752 unittest.expect(index >= 0, unittest.isTrue); | |
| 17753 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17754 pathOffset = index; | |
| 17755 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17756 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17757 pathOffset += 13; | |
| 17758 | |
| 17759 var query = (req.url).query; | |
| 17760 var queryOffset = 0; | |
| 17761 var queryMap = {}; | |
| 17762 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17763 parseBool(n) { | |
| 17764 if (n == "true") return true; | |
| 17765 if (n == "false") return false; | |
| 17766 if (n == null) return null; | |
| 17767 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17768 } | |
| 17769 if (query.length > 0) { | |
| 17770 for (var part in query.split("&")) { | |
| 17771 var keyvalue = part.split("="); | |
| 17772 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17773 } | |
| 17774 } | |
| 17775 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17776 | |
| 17777 | |
| 17778 var h = { | |
| 17779 "content-type" : "application/json; charset=utf-8", | |
| 17780 }; | |
| 17781 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17782 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17783 }), true); | |
| 17784 res.patch(arg_request, arg_profileId, arg_campaignId, arg_id).then(unittes
t.expectAsync(((api.LandingPage response) { | |
| 17785 checkLandingPage(response); | |
| 17786 }))); | |
| 17787 }); | |
| 17788 | |
| 17789 unittest.test("method--update", () { | |
| 17790 | |
| 17791 var mock = new HttpServerMock(); | |
| 17792 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17793 var arg_request = buildLandingPage(); | |
| 17794 var arg_profileId = "foo"; | |
| 17795 var arg_campaignId = "foo"; | |
| 17796 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17797 var obj = new api.LandingPage.fromJson(json); | |
| 17798 checkLandingPage(obj); | |
| 17799 | |
| 17800 var path = (req.url).path; | |
| 17801 var pathOffset = 0; | |
| 17802 var index; | |
| 17803 var subPart; | |
| 17804 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17805 pathOffset += 1; | |
| 17806 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17807 pathOffset += 18; | |
| 17808 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17809 pathOffset += 13; | |
| 17810 index = path.indexOf("/campaigns/", pathOffset); | |
| 17811 unittest.expect(index >= 0, unittest.isTrue); | |
| 17812 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17813 pathOffset = index; | |
| 17814 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17815 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17816 pathOffset += 11; | |
| 17817 index = path.indexOf("/landingPages", pathOffset); | |
| 17818 unittest.expect(index >= 0, unittest.isTrue); | |
| 17819 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17820 pathOffset = index; | |
| 17821 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17822 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17823 pathOffset += 13; | |
| 17824 | |
| 17825 var query = (req.url).query; | |
| 17826 var queryOffset = 0; | |
| 17827 var queryMap = {}; | |
| 17828 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17829 parseBool(n) { | |
| 17830 if (n == "true") return true; | |
| 17831 if (n == "false") return false; | |
| 17832 if (n == null) return null; | |
| 17833 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17834 } | |
| 17835 if (query.length > 0) { | |
| 17836 for (var part in query.split("&")) { | |
| 17837 var keyvalue = part.split("="); | |
| 17838 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17839 } | |
| 17840 } | |
| 17841 | |
| 17842 | |
| 17843 var h = { | |
| 17844 "content-type" : "application/json; charset=utf-8", | |
| 17845 }; | |
| 17846 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17847 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17848 }), true); | |
| 17849 res.update(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17850 checkLandingPage(response); | |
| 17851 }))); | |
| 17852 }); | |
| 17853 | |
| 17854 }); | |
| 17855 | |
| 17856 | |
| 17857 unittest.group("resource-MetrosResourceApi", () { | |
| 17858 unittest.test("method--list", () { | |
| 17859 | |
| 17860 var mock = new HttpServerMock(); | |
| 17861 api.MetrosResourceApi res = new api.DfareportingApi(mock).metros; | |
| 17862 var arg_profileId = "foo"; | |
| 17863 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17864 var path = (req.url).path; | |
| 17865 var pathOffset = 0; | |
| 17866 var index; | |
| 17867 var subPart; | |
| 17868 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17869 pathOffset += 1; | |
| 17870 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17871 pathOffset += 18; | |
| 17872 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17873 pathOffset += 13; | |
| 17874 index = path.indexOf("/metros", pathOffset); | |
| 17875 unittest.expect(index >= 0, unittest.isTrue); | |
| 17876 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17877 pathOffset = index; | |
| 17878 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17879 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/metros")); | |
| 17880 pathOffset += 7; | |
| 17881 | |
| 17882 var query = (req.url).query; | |
| 17883 var queryOffset = 0; | |
| 17884 var queryMap = {}; | |
| 17885 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17886 parseBool(n) { | |
| 17887 if (n == "true") return true; | |
| 17888 if (n == "false") return false; | |
| 17889 if (n == null) return null; | |
| 17890 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17891 } | |
| 17892 if (query.length > 0) { | |
| 17893 for (var part in query.split("&")) { | |
| 17894 var keyvalue = part.split("="); | |
| 17895 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17896 } | |
| 17897 } | |
| 17898 | |
| 17899 | |
| 17900 var h = { | |
| 17901 "content-type" : "application/json; charset=utf-8", | |
| 17902 }; | |
| 17903 var resp = convert.JSON.encode(buildMetrosListResponse()); | |
| 17904 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17905 }), true); | |
| 17906 res.list(arg_profileId).then(unittest.expectAsync(((api.MetrosListResponse
response) { | |
| 17907 checkMetrosListResponse(response); | |
| 17908 }))); | |
| 17909 }); | |
| 17910 | |
| 17911 }); | |
| 17912 | |
| 17913 | |
| 17914 unittest.group("resource-MobileCarriersResourceApi", () { | |
| 17915 unittest.test("method--get", () { | |
| 17916 | |
| 17917 var mock = new HttpServerMock(); | |
| 17918 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17919 var arg_profileId = "foo"; | |
| 17920 var arg_id = "foo"; | |
| 17921 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17922 var path = (req.url).path; | |
| 17923 var pathOffset = 0; | |
| 17924 var index; | |
| 17925 var subPart; | |
| 17926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17927 pathOffset += 1; | |
| 17928 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17929 pathOffset += 18; | |
| 17930 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17931 pathOffset += 13; | |
| 17932 index = path.indexOf("/mobileCarriers/", pathOffset); | |
| 17933 unittest.expect(index >= 0, unittest.isTrue); | |
| 17934 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17935 pathOffset = index; | |
| 17936 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17937 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/mobileCarriers/")); | |
| 17938 pathOffset += 16; | |
| 17939 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17940 pathOffset = path.length; | |
| 17941 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17942 | |
| 17943 var query = (req.url).query; | |
| 17944 var queryOffset = 0; | |
| 17945 var queryMap = {}; | |
| 17946 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17947 parseBool(n) { | |
| 17948 if (n == "true") return true; | |
| 17949 if (n == "false") return false; | |
| 17950 if (n == null) return null; | |
| 17951 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17952 } | |
| 17953 if (query.length > 0) { | |
| 17954 for (var part in query.split("&")) { | |
| 17955 var keyvalue = part.split("="); | |
| 17956 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17957 } | |
| 17958 } | |
| 17959 | |
| 17960 | |
| 17961 var h = { | |
| 17962 "content-type" : "application/json; charset=utf-8", | |
| 17963 }; | |
| 17964 var resp = convert.JSON.encode(buildMobileCarrier()); | |
| 17965 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17966 }), true); | |
| 17967 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.MobileCarri
er response) { | |
| 17968 checkMobileCarrier(response); | |
| 17969 }))); | |
| 17970 }); | |
| 17971 | |
| 17972 unittest.test("method--list", () { | |
| 17973 | |
| 17974 var mock = new HttpServerMock(); | |
| 17975 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17976 var arg_profileId = "foo"; | |
| 17977 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17978 var path = (req.url).path; | |
| 17979 var pathOffset = 0; | |
| 17980 var index; | |
| 17981 var subPart; | |
| 17982 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17983 pathOffset += 1; | |
| 17984 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 17985 pathOffset += 18; | |
| 17986 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17987 pathOffset += 13; | |
| 17988 index = path.indexOf("/mobileCarriers", pathOffset); | |
| 17989 unittest.expect(index >= 0, unittest.isTrue); | |
| 17990 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17991 pathOffset = index; | |
| 17992 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17993 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/mobileCarriers")); | |
| 17994 pathOffset += 15; | |
| 17995 | |
| 17996 var query = (req.url).query; | |
| 17997 var queryOffset = 0; | |
| 17998 var queryMap = {}; | |
| 17999 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18000 parseBool(n) { | |
| 18001 if (n == "true") return true; | |
| 18002 if (n == "false") return false; | |
| 18003 if (n == null) return null; | |
| 18004 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18005 } | |
| 18006 if (query.length > 0) { | |
| 18007 for (var part in query.split("&")) { | |
| 18008 var keyvalue = part.split("="); | |
| 18009 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18010 } | |
| 18011 } | |
| 18012 | |
| 18013 | |
| 18014 var h = { | |
| 18015 "content-type" : "application/json; charset=utf-8", | |
| 18016 }; | |
| 18017 var resp = convert.JSON.encode(buildMobileCarriersListResponse()); | |
| 18018 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18019 }), true); | |
| 18020 res.list(arg_profileId).then(unittest.expectAsync(((api.MobileCarriersList
Response response) { | |
| 18021 checkMobileCarriersListResponse(response); | |
| 18022 }))); | |
| 18023 }); | |
| 18024 | |
| 18025 }); | |
| 18026 | |
| 18027 | |
| 18028 unittest.group("resource-OperatingSystemVersionsResourceApi", () { | |
| 18029 unittest.test("method--get", () { | |
| 18030 | |
| 18031 var mock = new HttpServerMock(); | |
| 18032 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18033 var arg_profileId = "foo"; | |
| 18034 var arg_id = "foo"; | |
| 18035 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18036 var path = (req.url).path; | |
| 18037 var pathOffset = 0; | |
| 18038 var index; | |
| 18039 var subPart; | |
| 18040 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18041 pathOffset += 1; | |
| 18042 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18043 pathOffset += 18; | |
| 18044 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18045 pathOffset += 13; | |
| 18046 index = path.indexOf("/operatingSystemVersions/", pathOffset); | |
| 18047 unittest.expect(index >= 0, unittest.isTrue); | |
| 18048 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18049 pathOffset = index; | |
| 18050 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18051 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/operatingSystemVersions/")); | |
| 18052 pathOffset += 25; | |
| 18053 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18054 pathOffset = path.length; | |
| 18055 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18056 | |
| 18057 var query = (req.url).query; | |
| 18058 var queryOffset = 0; | |
| 18059 var queryMap = {}; | |
| 18060 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18061 parseBool(n) { | |
| 18062 if (n == "true") return true; | |
| 18063 if (n == "false") return false; | |
| 18064 if (n == null) return null; | |
| 18065 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18066 } | |
| 18067 if (query.length > 0) { | |
| 18068 for (var part in query.split("&")) { | |
| 18069 var keyvalue = part.split("="); | |
| 18070 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18071 } | |
| 18072 } | |
| 18073 | |
| 18074 | |
| 18075 var h = { | |
| 18076 "content-type" : "application/json; charset=utf-8", | |
| 18077 }; | |
| 18078 var resp = convert.JSON.encode(buildOperatingSystemVersion()); | |
| 18079 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18080 }), true); | |
| 18081 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.OperatingSy
stemVersion response) { | |
| 18082 checkOperatingSystemVersion(response); | |
| 18083 }))); | |
| 18084 }); | |
| 18085 | |
| 18086 unittest.test("method--list", () { | |
| 18087 | |
| 18088 var mock = new HttpServerMock(); | |
| 18089 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18090 var arg_profileId = "foo"; | |
| 18091 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18092 var path = (req.url).path; | |
| 18093 var pathOffset = 0; | |
| 18094 var index; | |
| 18095 var subPart; | |
| 18096 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18097 pathOffset += 1; | |
| 18098 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18099 pathOffset += 18; | |
| 18100 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18101 pathOffset += 13; | |
| 18102 index = path.indexOf("/operatingSystemVersions", pathOffset); | |
| 18103 unittest.expect(index >= 0, unittest.isTrue); | |
| 18104 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18105 pathOffset = index; | |
| 18106 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18107 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/operatingSystemVersions")); | |
| 18108 pathOffset += 24; | |
| 18109 | |
| 18110 var query = (req.url).query; | |
| 18111 var queryOffset = 0; | |
| 18112 var queryMap = {}; | |
| 18113 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18114 parseBool(n) { | |
| 18115 if (n == "true") return true; | |
| 18116 if (n == "false") return false; | |
| 18117 if (n == null) return null; | |
| 18118 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18119 } | |
| 18120 if (query.length > 0) { | |
| 18121 for (var part in query.split("&")) { | |
| 18122 var keyvalue = part.split("="); | |
| 18123 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18124 } | |
| 18125 } | |
| 18126 | |
| 18127 | |
| 18128 var h = { | |
| 18129 "content-type" : "application/json; charset=utf-8", | |
| 18130 }; | |
| 18131 var resp = convert.JSON.encode(buildOperatingSystemVersionsListResponse(
)); | |
| 18132 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18133 }), true); | |
| 18134 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemVer
sionsListResponse response) { | |
| 18135 checkOperatingSystemVersionsListResponse(response); | |
| 18136 }))); | |
| 18137 }); | |
| 18138 | |
| 18139 }); | |
| 18140 | |
| 18141 | |
| 18142 unittest.group("resource-OperatingSystemsResourceApi", () { | |
| 18143 unittest.test("method--get", () { | |
| 18144 | |
| 18145 var mock = new HttpServerMock(); | |
| 18146 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18147 var arg_profileId = "foo"; | |
| 18148 var arg_dartId = "foo"; | |
| 18149 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18150 var path = (req.url).path; | |
| 18151 var pathOffset = 0; | |
| 18152 var index; | |
| 18153 var subPart; | |
| 18154 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18155 pathOffset += 1; | |
| 18156 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18157 pathOffset += 18; | |
| 18158 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18159 pathOffset += 13; | |
| 18160 index = path.indexOf("/operatingSystems/", pathOffset); | |
| 18161 unittest.expect(index >= 0, unittest.isTrue); | |
| 18162 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18163 pathOffset = index; | |
| 18164 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18165 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/operatingSystems/")); | |
| 18166 pathOffset += 18; | |
| 18167 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18168 pathOffset = path.length; | |
| 18169 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 18170 | |
| 18171 var query = (req.url).query; | |
| 18172 var queryOffset = 0; | |
| 18173 var queryMap = {}; | |
| 18174 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18175 parseBool(n) { | |
| 18176 if (n == "true") return true; | |
| 18177 if (n == "false") return false; | |
| 18178 if (n == null) return null; | |
| 18179 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18180 } | |
| 18181 if (query.length > 0) { | |
| 18182 for (var part in query.split("&")) { | |
| 18183 var keyvalue = part.split("="); | |
| 18184 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18185 } | |
| 18186 } | |
| 18187 | |
| 18188 | |
| 18189 var h = { | |
| 18190 "content-type" : "application/json; charset=utf-8", | |
| 18191 }; | |
| 18192 var resp = convert.JSON.encode(buildOperatingSystem()); | |
| 18193 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18194 }), true); | |
| 18195 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Operati
ngSystem response) { | |
| 18196 checkOperatingSystem(response); | |
| 18197 }))); | |
| 18198 }); | |
| 18199 | |
| 18200 unittest.test("method--list", () { | |
| 18201 | |
| 18202 var mock = new HttpServerMock(); | |
| 18203 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18204 var arg_profileId = "foo"; | |
| 18205 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18206 var path = (req.url).path; | |
| 18207 var pathOffset = 0; | |
| 18208 var index; | |
| 18209 var subPart; | |
| 18210 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18211 pathOffset += 1; | |
| 18212 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18213 pathOffset += 18; | |
| 18214 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18215 pathOffset += 13; | |
| 18216 index = path.indexOf("/operatingSystems", pathOffset); | |
| 18217 unittest.expect(index >= 0, unittest.isTrue); | |
| 18218 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18219 pathOffset = index; | |
| 18220 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18221 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/operatingSystems")); | |
| 18222 pathOffset += 17; | |
| 18223 | |
| 18224 var query = (req.url).query; | |
| 18225 var queryOffset = 0; | |
| 18226 var queryMap = {}; | |
| 18227 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18228 parseBool(n) { | |
| 18229 if (n == "true") return true; | |
| 18230 if (n == "false") return false; | |
| 18231 if (n == null) return null; | |
| 18232 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18233 } | |
| 18234 if (query.length > 0) { | |
| 18235 for (var part in query.split("&")) { | |
| 18236 var keyvalue = part.split("="); | |
| 18237 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18238 } | |
| 18239 } | |
| 18240 | |
| 18241 | |
| 18242 var h = { | |
| 18243 "content-type" : "application/json; charset=utf-8", | |
| 18244 }; | |
| 18245 var resp = convert.JSON.encode(buildOperatingSystemsListResponse()); | |
| 18246 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18247 }), true); | |
| 18248 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemsLi
stResponse response) { | |
| 18249 checkOperatingSystemsListResponse(response); | |
| 18250 }))); | |
| 18251 }); | |
| 18252 | |
| 18253 }); | |
| 18254 | |
| 18255 | |
| 18256 unittest.group("resource-OrderDocumentsResourceApi", () { | |
| 18257 unittest.test("method--get", () { | |
| 18258 | |
| 18259 var mock = new HttpServerMock(); | |
| 18260 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18261 var arg_profileId = "foo"; | |
| 18262 var arg_projectId = "foo"; | |
| 18263 var arg_id = "foo"; | |
| 18264 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18265 var path = (req.url).path; | |
| 18266 var pathOffset = 0; | |
| 18267 var index; | |
| 18268 var subPart; | |
| 18269 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18270 pathOffset += 1; | |
| 18271 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18272 pathOffset += 18; | |
| 18273 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18274 pathOffset += 13; | |
| 18275 index = path.indexOf("/projects/", pathOffset); | |
| 18276 unittest.expect(index >= 0, unittest.isTrue); | |
| 18277 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18278 pathOffset = index; | |
| 18279 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18280 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18281 pathOffset += 10; | |
| 18282 index = path.indexOf("/orderDocuments/", pathOffset); | |
| 18283 unittest.expect(index >= 0, unittest.isTrue); | |
| 18284 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18285 pathOffset = index; | |
| 18286 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18287 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/orderDocuments/")); | |
| 18288 pathOffset += 16; | |
| 18289 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18290 pathOffset = path.length; | |
| 18291 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18292 | |
| 18293 var query = (req.url).query; | |
| 18294 var queryOffset = 0; | |
| 18295 var queryMap = {}; | |
| 18296 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18297 parseBool(n) { | |
| 18298 if (n == "true") return true; | |
| 18299 if (n == "false") return false; | |
| 18300 if (n == null) return null; | |
| 18301 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18302 } | |
| 18303 if (query.length > 0) { | |
| 18304 for (var part in query.split("&")) { | |
| 18305 var keyvalue = part.split("="); | |
| 18306 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18307 } | |
| 18308 } | |
| 18309 | |
| 18310 | |
| 18311 var h = { | |
| 18312 "content-type" : "application/json; charset=utf-8", | |
| 18313 }; | |
| 18314 var resp = convert.JSON.encode(buildOrderDocument()); | |
| 18315 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18316 }), true); | |
| 18317 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.OrderDocument response) { | |
| 18318 checkOrderDocument(response); | |
| 18319 }))); | |
| 18320 }); | |
| 18321 | |
| 18322 unittest.test("method--list", () { | |
| 18323 | |
| 18324 var mock = new HttpServerMock(); | |
| 18325 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18326 var arg_profileId = "foo"; | |
| 18327 var arg_projectId = "foo"; | |
| 18328 var arg_approved = true; | |
| 18329 var arg_ids = buildUnnamed3268(); | |
| 18330 var arg_maxResults = 42; | |
| 18331 var arg_orderId = buildUnnamed3269(); | |
| 18332 var arg_pageToken = "foo"; | |
| 18333 var arg_searchString = "foo"; | |
| 18334 var arg_siteId = buildUnnamed3270(); | |
| 18335 var arg_sortField = "foo"; | |
| 18336 var arg_sortOrder = "foo"; | |
| 18337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18338 var path = (req.url).path; | |
| 18339 var pathOffset = 0; | |
| 18340 var index; | |
| 18341 var subPart; | |
| 18342 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18343 pathOffset += 1; | |
| 18344 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18345 pathOffset += 18; | |
| 18346 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18347 pathOffset += 13; | |
| 18348 index = path.indexOf("/projects/", pathOffset); | |
| 18349 unittest.expect(index >= 0, unittest.isTrue); | |
| 18350 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18351 pathOffset = index; | |
| 18352 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18353 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18354 pathOffset += 10; | |
| 18355 index = path.indexOf("/orderDocuments", pathOffset); | |
| 18356 unittest.expect(index >= 0, unittest.isTrue); | |
| 18357 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18358 pathOffset = index; | |
| 18359 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18360 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/orderDocuments")); | |
| 18361 pathOffset += 15; | |
| 18362 | |
| 18363 var query = (req.url).query; | |
| 18364 var queryOffset = 0; | |
| 18365 var queryMap = {}; | |
| 18366 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18367 parseBool(n) { | |
| 18368 if (n == "true") return true; | |
| 18369 if (n == "false") return false; | |
| 18370 if (n == null) return null; | |
| 18371 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18372 } | |
| 18373 if (query.length > 0) { | |
| 18374 for (var part in query.split("&")) { | |
| 18375 var keyvalue = part.split("="); | |
| 18376 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18377 } | |
| 18378 } | |
| 18379 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 18380 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18381 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18382 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 18383 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18384 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18385 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18386 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18387 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18388 | |
| 18389 | |
| 18390 var h = { | |
| 18391 "content-type" : "application/json; charset=utf-8", | |
| 18392 }; | |
| 18393 var resp = convert.JSON.encode(buildOrderDocumentsListResponse()); | |
| 18394 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18395 }), true); | |
| 18396 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) { | |
| 18397 checkOrderDocumentsListResponse(response); | |
| 18398 }))); | |
| 18399 }); | |
| 18400 | |
| 18401 }); | |
| 18402 | |
| 18403 | |
| 18404 unittest.group("resource-OrdersResourceApi", () { | |
| 18405 unittest.test("method--get", () { | |
| 18406 | |
| 18407 var mock = new HttpServerMock(); | |
| 18408 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18409 var arg_profileId = "foo"; | |
| 18410 var arg_projectId = "foo"; | |
| 18411 var arg_id = "foo"; | |
| 18412 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18413 var path = (req.url).path; | |
| 18414 var pathOffset = 0; | |
| 18415 var index; | |
| 18416 var subPart; | |
| 18417 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18418 pathOffset += 1; | |
| 18419 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18420 pathOffset += 18; | |
| 18421 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18422 pathOffset += 13; | |
| 18423 index = path.indexOf("/projects/", pathOffset); | |
| 18424 unittest.expect(index >= 0, unittest.isTrue); | |
| 18425 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18426 pathOffset = index; | |
| 18427 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18428 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18429 pathOffset += 10; | |
| 18430 index = path.indexOf("/orders/", pathOffset); | |
| 18431 unittest.expect(index >= 0, unittest.isTrue); | |
| 18432 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18433 pathOffset = index; | |
| 18434 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18435 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/orders/")); | |
| 18436 pathOffset += 8; | |
| 18437 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18438 pathOffset = path.length; | |
| 18439 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18440 | |
| 18441 var query = (req.url).query; | |
| 18442 var queryOffset = 0; | |
| 18443 var queryMap = {}; | |
| 18444 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18445 parseBool(n) { | |
| 18446 if (n == "true") return true; | |
| 18447 if (n == "false") return false; | |
| 18448 if (n == null) return null; | |
| 18449 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18450 } | |
| 18451 if (query.length > 0) { | |
| 18452 for (var part in query.split("&")) { | |
| 18453 var keyvalue = part.split("="); | |
| 18454 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18455 } | |
| 18456 } | |
| 18457 | |
| 18458 | |
| 18459 var h = { | |
| 18460 "content-type" : "application/json; charset=utf-8", | |
| 18461 }; | |
| 18462 var resp = convert.JSON.encode(buildOrder()); | |
| 18463 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18464 }), true); | |
| 18465 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.Order response) { | |
| 18466 checkOrder(response); | |
| 18467 }))); | |
| 18468 }); | |
| 18469 | |
| 18470 unittest.test("method--list", () { | |
| 18471 | |
| 18472 var mock = new HttpServerMock(); | |
| 18473 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18474 var arg_profileId = "foo"; | |
| 18475 var arg_projectId = "foo"; | |
| 18476 var arg_ids = buildUnnamed3271(); | |
| 18477 var arg_maxResults = 42; | |
| 18478 var arg_pageToken = "foo"; | |
| 18479 var arg_searchString = "foo"; | |
| 18480 var arg_siteId = buildUnnamed3272(); | |
| 18481 var arg_sortField = "foo"; | |
| 18482 var arg_sortOrder = "foo"; | |
| 18483 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18484 var path = (req.url).path; | |
| 18485 var pathOffset = 0; | |
| 18486 var index; | |
| 18487 var subPart; | |
| 18488 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18489 pathOffset += 1; | |
| 18490 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18491 pathOffset += 18; | |
| 18492 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18493 pathOffset += 13; | |
| 18494 index = path.indexOf("/projects/", pathOffset); | |
| 18495 unittest.expect(index >= 0, unittest.isTrue); | |
| 18496 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18497 pathOffset = index; | |
| 18498 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18499 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18500 pathOffset += 10; | |
| 18501 index = path.indexOf("/orders", pathOffset); | |
| 18502 unittest.expect(index >= 0, unittest.isTrue); | |
| 18503 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18504 pathOffset = index; | |
| 18505 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18506 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/orders")); | |
| 18507 pathOffset += 7; | |
| 18508 | |
| 18509 var query = (req.url).query; | |
| 18510 var queryOffset = 0; | |
| 18511 var queryMap = {}; | |
| 18512 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18513 parseBool(n) { | |
| 18514 if (n == "true") return true; | |
| 18515 if (n == "false") return false; | |
| 18516 if (n == null) return null; | |
| 18517 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18518 } | |
| 18519 if (query.length > 0) { | |
| 18520 for (var part in query.split("&")) { | |
| 18521 var keyvalue = part.split("="); | |
| 18522 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18523 } | |
| 18524 } | |
| 18525 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18526 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18527 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18528 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18529 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18530 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18531 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18532 | |
| 18533 | |
| 18534 var h = { | |
| 18535 "content-type" : "application/json; charset=utf-8", | |
| 18536 }; | |
| 18537 var resp = convert.JSON.encode(buildOrdersListResponse()); | |
| 18538 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18539 }), true); | |
| 18540 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) { | |
| 18541 checkOrdersListResponse(response); | |
| 18542 }))); | |
| 18543 }); | |
| 18544 | |
| 18545 }); | |
| 18546 | |
| 18547 | |
| 18548 unittest.group("resource-PlacementGroupsResourceApi", () { | |
| 18549 unittest.test("method--get", () { | |
| 18550 | |
| 18551 var mock = new HttpServerMock(); | |
| 18552 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18553 var arg_profileId = "foo"; | |
| 18554 var arg_id = "foo"; | |
| 18555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18556 var path = (req.url).path; | |
| 18557 var pathOffset = 0; | |
| 18558 var index; | |
| 18559 var subPart; | |
| 18560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18561 pathOffset += 1; | |
| 18562 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18563 pathOffset += 18; | |
| 18564 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18565 pathOffset += 13; | |
| 18566 index = path.indexOf("/placementGroups/", pathOffset); | |
| 18567 unittest.expect(index >= 0, unittest.isTrue); | |
| 18568 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18569 pathOffset = index; | |
| 18570 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18571 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/placementGroups/")); | |
| 18572 pathOffset += 17; | |
| 18573 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18574 pathOffset = path.length; | |
| 18575 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18576 | |
| 18577 var query = (req.url).query; | |
| 18578 var queryOffset = 0; | |
| 18579 var queryMap = {}; | |
| 18580 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18581 parseBool(n) { | |
| 18582 if (n == "true") return true; | |
| 18583 if (n == "false") return false; | |
| 18584 if (n == null) return null; | |
| 18585 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18586 } | |
| 18587 if (query.length > 0) { | |
| 18588 for (var part in query.split("&")) { | |
| 18589 var keyvalue = part.split("="); | |
| 18590 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18591 } | |
| 18592 } | |
| 18593 | |
| 18594 | |
| 18595 var h = { | |
| 18596 "content-type" : "application/json; charset=utf-8", | |
| 18597 }; | |
| 18598 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18599 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18600 }), true); | |
| 18601 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementGr
oup response) { | |
| 18602 checkPlacementGroup(response); | |
| 18603 }))); | |
| 18604 }); | |
| 18605 | |
| 18606 unittest.test("method--insert", () { | |
| 18607 | |
| 18608 var mock = new HttpServerMock(); | |
| 18609 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18610 var arg_request = buildPlacementGroup(); | |
| 18611 var arg_profileId = "foo"; | |
| 18612 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18613 var obj = new api.PlacementGroup.fromJson(json); | |
| 18614 checkPlacementGroup(obj); | |
| 18615 | |
| 18616 var path = (req.url).path; | |
| 18617 var pathOffset = 0; | |
| 18618 var index; | |
| 18619 var subPart; | |
| 18620 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18621 pathOffset += 1; | |
| 18622 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18623 pathOffset += 18; | |
| 18624 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18625 pathOffset += 13; | |
| 18626 index = path.indexOf("/placementGroups", pathOffset); | |
| 18627 unittest.expect(index >= 0, unittest.isTrue); | |
| 18628 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18629 pathOffset = index; | |
| 18630 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18631 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18632 pathOffset += 16; | |
| 18633 | |
| 18634 var query = (req.url).query; | |
| 18635 var queryOffset = 0; | |
| 18636 var queryMap = {}; | |
| 18637 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18638 parseBool(n) { | |
| 18639 if (n == "true") return true; | |
| 18640 if (n == "false") return false; | |
| 18641 if (n == null) return null; | |
| 18642 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18643 } | |
| 18644 if (query.length > 0) { | |
| 18645 for (var part in query.split("&")) { | |
| 18646 var keyvalue = part.split("="); | |
| 18647 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18648 } | |
| 18649 } | |
| 18650 | |
| 18651 | |
| 18652 var h = { | |
| 18653 "content-type" : "application/json; charset=utf-8", | |
| 18654 }; | |
| 18655 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18656 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18657 }), true); | |
| 18658 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18659 checkPlacementGroup(response); | |
| 18660 }))); | |
| 18661 }); | |
| 18662 | |
| 18663 unittest.test("method--list", () { | |
| 18664 | |
| 18665 var mock = new HttpServerMock(); | |
| 18666 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18667 var arg_profileId = "foo"; | |
| 18668 var arg_advertiserIds = buildUnnamed3273(); | |
| 18669 var arg_archived = true; | |
| 18670 var arg_campaignIds = buildUnnamed3274(); | |
| 18671 var arg_contentCategoryIds = buildUnnamed3275(); | |
| 18672 var arg_directorySiteIds = buildUnnamed3276(); | |
| 18673 var arg_ids = buildUnnamed3277(); | |
| 18674 var arg_maxEndDate = "foo"; | |
| 18675 var arg_maxResults = 42; | |
| 18676 var arg_maxStartDate = "foo"; | |
| 18677 var arg_minEndDate = "foo"; | |
| 18678 var arg_minStartDate = "foo"; | |
| 18679 var arg_pageToken = "foo"; | |
| 18680 var arg_placementGroupType = "foo"; | |
| 18681 var arg_placementStrategyIds = buildUnnamed3278(); | |
| 18682 var arg_pricingTypes = buildUnnamed3279(); | |
| 18683 var arg_searchString = "foo"; | |
| 18684 var arg_siteIds = buildUnnamed3280(); | |
| 18685 var arg_sortField = "foo"; | |
| 18686 var arg_sortOrder = "foo"; | |
| 18687 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18688 var path = (req.url).path; | |
| 18689 var pathOffset = 0; | |
| 18690 var index; | |
| 18691 var subPart; | |
| 18692 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18693 pathOffset += 1; | |
| 18694 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18695 pathOffset += 18; | |
| 18696 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18697 pathOffset += 13; | |
| 18698 index = path.indexOf("/placementGroups", pathOffset); | |
| 18699 unittest.expect(index >= 0, unittest.isTrue); | |
| 18700 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18701 pathOffset = index; | |
| 18702 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18703 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18704 pathOffset += 16; | |
| 18705 | |
| 18706 var query = (req.url).query; | |
| 18707 var queryOffset = 0; | |
| 18708 var queryMap = {}; | |
| 18709 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18710 parseBool(n) { | |
| 18711 if (n == "true") return true; | |
| 18712 if (n == "false") return false; | |
| 18713 if (n == null) return null; | |
| 18714 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18715 } | |
| 18716 if (query.length > 0) { | |
| 18717 for (var part in query.split("&")) { | |
| 18718 var keyvalue = part.split("="); | |
| 18719 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18720 } | |
| 18721 } | |
| 18722 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 18723 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 18724 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 18725 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 18726 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 18727 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18728 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 18729 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18730 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 18731 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 18732 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 18733 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18734 unittest.expect(queryMap["placementGroupType"].first, unittest.equals(ar
g_placementGroupType)); | |
| 18735 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 18736 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 18737 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18738 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 18739 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18740 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18741 | |
| 18742 | |
| 18743 var h = { | |
| 18744 "content-type" : "application/json; charset=utf-8", | |
| 18745 }; | |
| 18746 var resp = convert.JSON.encode(buildPlacementGroupsListResponse()); | |
| 18747 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18748 }), true); | |
| 18749 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) { | |
| 18750 checkPlacementGroupsListResponse(response); | |
| 18751 }))); | |
| 18752 }); | |
| 18753 | |
| 18754 unittest.test("method--patch", () { | |
| 18755 | |
| 18756 var mock = new HttpServerMock(); | |
| 18757 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18758 var arg_request = buildPlacementGroup(); | |
| 18759 var arg_profileId = "foo"; | |
| 18760 var arg_id = "foo"; | |
| 18761 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18762 var obj = new api.PlacementGroup.fromJson(json); | |
| 18763 checkPlacementGroup(obj); | |
| 18764 | |
| 18765 var path = (req.url).path; | |
| 18766 var pathOffset = 0; | |
| 18767 var index; | |
| 18768 var subPart; | |
| 18769 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18770 pathOffset += 1; | |
| 18771 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18772 pathOffset += 18; | |
| 18773 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18774 pathOffset += 13; | |
| 18775 index = path.indexOf("/placementGroups", pathOffset); | |
| 18776 unittest.expect(index >= 0, unittest.isTrue); | |
| 18777 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18778 pathOffset = index; | |
| 18779 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18780 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18781 pathOffset += 16; | |
| 18782 | |
| 18783 var query = (req.url).query; | |
| 18784 var queryOffset = 0; | |
| 18785 var queryMap = {}; | |
| 18786 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18787 parseBool(n) { | |
| 18788 if (n == "true") return true; | |
| 18789 if (n == "false") return false; | |
| 18790 if (n == null) return null; | |
| 18791 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18792 } | |
| 18793 if (query.length > 0) { | |
| 18794 for (var part in query.split("&")) { | |
| 18795 var keyvalue = part.split("="); | |
| 18796 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18797 } | |
| 18798 } | |
| 18799 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 18800 | |
| 18801 | |
| 18802 var h = { | |
| 18803 "content-type" : "application/json; charset=utf-8", | |
| 18804 }; | |
| 18805 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18806 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18807 }), true); | |
| 18808 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementGroup response) { | |
| 18809 checkPlacementGroup(response); | |
| 18810 }))); | |
| 18811 }); | |
| 18812 | |
| 18813 unittest.test("method--update", () { | |
| 18814 | |
| 18815 var mock = new HttpServerMock(); | |
| 18816 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18817 var arg_request = buildPlacementGroup(); | |
| 18818 var arg_profileId = "foo"; | |
| 18819 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18820 var obj = new api.PlacementGroup.fromJson(json); | |
| 18821 checkPlacementGroup(obj); | |
| 18822 | |
| 18823 var path = (req.url).path; | |
| 18824 var pathOffset = 0; | |
| 18825 var index; | |
| 18826 var subPart; | |
| 18827 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18828 pathOffset += 1; | |
| 18829 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18830 pathOffset += 18; | |
| 18831 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18832 pathOffset += 13; | |
| 18833 index = path.indexOf("/placementGroups", pathOffset); | |
| 18834 unittest.expect(index >= 0, unittest.isTrue); | |
| 18835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18836 pathOffset = index; | |
| 18837 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18838 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18839 pathOffset += 16; | |
| 18840 | |
| 18841 var query = (req.url).query; | |
| 18842 var queryOffset = 0; | |
| 18843 var queryMap = {}; | |
| 18844 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18845 parseBool(n) { | |
| 18846 if (n == "true") return true; | |
| 18847 if (n == "false") return false; | |
| 18848 if (n == null) return null; | |
| 18849 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18850 } | |
| 18851 if (query.length > 0) { | |
| 18852 for (var part in query.split("&")) { | |
| 18853 var keyvalue = part.split("="); | |
| 18854 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18855 } | |
| 18856 } | |
| 18857 | |
| 18858 | |
| 18859 var h = { | |
| 18860 "content-type" : "application/json; charset=utf-8", | |
| 18861 }; | |
| 18862 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18863 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18864 }), true); | |
| 18865 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18866 checkPlacementGroup(response); | |
| 18867 }))); | |
| 18868 }); | |
| 18869 | |
| 18870 }); | |
| 18871 | |
| 18872 | |
| 18873 unittest.group("resource-PlacementStrategiesResourceApi", () { | |
| 18874 unittest.test("method--delete", () { | |
| 18875 | |
| 18876 var mock = new HttpServerMock(); | |
| 18877 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18878 var arg_profileId = "foo"; | |
| 18879 var arg_id = "foo"; | |
| 18880 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18881 var path = (req.url).path; | |
| 18882 var pathOffset = 0; | |
| 18883 var index; | |
| 18884 var subPart; | |
| 18885 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18886 pathOffset += 1; | |
| 18887 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18888 pathOffset += 18; | |
| 18889 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18890 pathOffset += 13; | |
| 18891 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18892 unittest.expect(index >= 0, unittest.isTrue); | |
| 18893 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18894 pathOffset = index; | |
| 18895 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18896 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18897 pathOffset += 21; | |
| 18898 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18899 pathOffset = path.length; | |
| 18900 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18901 | |
| 18902 var query = (req.url).query; | |
| 18903 var queryOffset = 0; | |
| 18904 var queryMap = {}; | |
| 18905 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18906 parseBool(n) { | |
| 18907 if (n == "true") return true; | |
| 18908 if (n == "false") return false; | |
| 18909 if (n == null) return null; | |
| 18910 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18911 } | |
| 18912 if (query.length > 0) { | |
| 18913 for (var part in query.split("&")) { | |
| 18914 var keyvalue = part.split("="); | |
| 18915 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18916 } | |
| 18917 } | |
| 18918 | |
| 18919 | |
| 18920 var h = { | |
| 18921 "content-type" : "application/json; charset=utf-8", | |
| 18922 }; | |
| 18923 var resp = ""; | |
| 18924 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18925 }), true); | |
| 18926 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 18927 }); | |
| 18928 | |
| 18929 unittest.test("method--get", () { | |
| 18930 | |
| 18931 var mock = new HttpServerMock(); | |
| 18932 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18933 var arg_profileId = "foo"; | |
| 18934 var arg_id = "foo"; | |
| 18935 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18936 var path = (req.url).path; | |
| 18937 var pathOffset = 0; | |
| 18938 var index; | |
| 18939 var subPart; | |
| 18940 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18941 pathOffset += 1; | |
| 18942 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 18943 pathOffset += 18; | |
| 18944 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18945 pathOffset += 13; | |
| 18946 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18947 unittest.expect(index >= 0, unittest.isTrue); | |
| 18948 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18949 pathOffset = index; | |
| 18950 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18951 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18952 pathOffset += 21; | |
| 18953 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18954 pathOffset = path.length; | |
| 18955 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18956 | |
| 18957 var query = (req.url).query; | |
| 18958 var queryOffset = 0; | |
| 18959 var queryMap = {}; | |
| 18960 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18961 parseBool(n) { | |
| 18962 if (n == "true") return true; | |
| 18963 if (n == "false") return false; | |
| 18964 if (n == null) return null; | |
| 18965 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18966 } | |
| 18967 if (query.length > 0) { | |
| 18968 for (var part in query.split("&")) { | |
| 18969 var keyvalue = part.split("="); | |
| 18970 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18971 } | |
| 18972 } | |
| 18973 | |
| 18974 | |
| 18975 var h = { | |
| 18976 "content-type" : "application/json; charset=utf-8", | |
| 18977 }; | |
| 18978 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 18979 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18980 }), true); | |
| 18981 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementSt
rategy response) { | |
| 18982 checkPlacementStrategy(response); | |
| 18983 }))); | |
| 18984 }); | |
| 18985 | |
| 18986 unittest.test("method--insert", () { | |
| 18987 | |
| 18988 var mock = new HttpServerMock(); | |
| 18989 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18990 var arg_request = buildPlacementStrategy(); | |
| 18991 var arg_profileId = "foo"; | |
| 18992 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18993 var obj = new api.PlacementStrategy.fromJson(json); | |
| 18994 checkPlacementStrategy(obj); | |
| 18995 | |
| 18996 var path = (req.url).path; | |
| 18997 var pathOffset = 0; | |
| 18998 var index; | |
| 18999 var subPart; | |
| 19000 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19001 pathOffset += 1; | |
| 19002 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19003 pathOffset += 18; | |
| 19004 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19005 pathOffset += 13; | |
| 19006 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19007 unittest.expect(index >= 0, unittest.isTrue); | |
| 19008 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19009 pathOffset = index; | |
| 19010 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19011 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19012 pathOffset += 20; | |
| 19013 | |
| 19014 var query = (req.url).query; | |
| 19015 var queryOffset = 0; | |
| 19016 var queryMap = {}; | |
| 19017 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19018 parseBool(n) { | |
| 19019 if (n == "true") return true; | |
| 19020 if (n == "false") return false; | |
| 19021 if (n == null) return null; | |
| 19022 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19023 } | |
| 19024 if (query.length > 0) { | |
| 19025 for (var part in query.split("&")) { | |
| 19026 var keyvalue = part.split("="); | |
| 19027 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19028 } | |
| 19029 } | |
| 19030 | |
| 19031 | |
| 19032 var h = { | |
| 19033 "content-type" : "application/json; charset=utf-8", | |
| 19034 }; | |
| 19035 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19036 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19037 }), true); | |
| 19038 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19039 checkPlacementStrategy(response); | |
| 19040 }))); | |
| 19041 }); | |
| 19042 | |
| 19043 unittest.test("method--list", () { | |
| 19044 | |
| 19045 var mock = new HttpServerMock(); | |
| 19046 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19047 var arg_profileId = "foo"; | |
| 19048 var arg_ids = buildUnnamed3281(); | |
| 19049 var arg_maxResults = 42; | |
| 19050 var arg_pageToken = "foo"; | |
| 19051 var arg_searchString = "foo"; | |
| 19052 var arg_sortField = "foo"; | |
| 19053 var arg_sortOrder = "foo"; | |
| 19054 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19055 var path = (req.url).path; | |
| 19056 var pathOffset = 0; | |
| 19057 var index; | |
| 19058 var subPart; | |
| 19059 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19060 pathOffset += 1; | |
| 19061 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19062 pathOffset += 18; | |
| 19063 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19064 pathOffset += 13; | |
| 19065 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19066 unittest.expect(index >= 0, unittest.isTrue); | |
| 19067 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19068 pathOffset = index; | |
| 19069 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19070 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19071 pathOffset += 20; | |
| 19072 | |
| 19073 var query = (req.url).query; | |
| 19074 var queryOffset = 0; | |
| 19075 var queryMap = {}; | |
| 19076 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19077 parseBool(n) { | |
| 19078 if (n == "true") return true; | |
| 19079 if (n == "false") return false; | |
| 19080 if (n == null) return null; | |
| 19081 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19082 } | |
| 19083 if (query.length > 0) { | |
| 19084 for (var part in query.split("&")) { | |
| 19085 var keyvalue = part.split("="); | |
| 19086 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19087 } | |
| 19088 } | |
| 19089 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19090 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19091 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19092 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19093 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19094 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19095 | |
| 19096 | |
| 19097 var h = { | |
| 19098 "content-type" : "application/json; charset=utf-8", | |
| 19099 }; | |
| 19100 var resp = convert.JSON.encode(buildPlacementStrategiesListResponse()); | |
| 19101 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19102 }), true); | |
| 19103 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) { | |
| 19104 checkPlacementStrategiesListResponse(response); | |
| 19105 }))); | |
| 19106 }); | |
| 19107 | |
| 19108 unittest.test("method--patch", () { | |
| 19109 | |
| 19110 var mock = new HttpServerMock(); | |
| 19111 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19112 var arg_request = buildPlacementStrategy(); | |
| 19113 var arg_profileId = "foo"; | |
| 19114 var arg_id = "foo"; | |
| 19115 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19116 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19117 checkPlacementStrategy(obj); | |
| 19118 | |
| 19119 var path = (req.url).path; | |
| 19120 var pathOffset = 0; | |
| 19121 var index; | |
| 19122 var subPart; | |
| 19123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19124 pathOffset += 1; | |
| 19125 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19126 pathOffset += 18; | |
| 19127 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19128 pathOffset += 13; | |
| 19129 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19130 unittest.expect(index >= 0, unittest.isTrue); | |
| 19131 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19132 pathOffset = index; | |
| 19133 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19134 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19135 pathOffset += 20; | |
| 19136 | |
| 19137 var query = (req.url).query; | |
| 19138 var queryOffset = 0; | |
| 19139 var queryMap = {}; | |
| 19140 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19141 parseBool(n) { | |
| 19142 if (n == "true") return true; | |
| 19143 if (n == "false") return false; | |
| 19144 if (n == null) return null; | |
| 19145 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19146 } | |
| 19147 if (query.length > 0) { | |
| 19148 for (var part in query.split("&")) { | |
| 19149 var keyvalue = part.split("="); | |
| 19150 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19151 } | |
| 19152 } | |
| 19153 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19154 | |
| 19155 | |
| 19156 var h = { | |
| 19157 "content-type" : "application/json; charset=utf-8", | |
| 19158 }; | |
| 19159 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19160 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19161 }), true); | |
| 19162 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementStrategy response) { | |
| 19163 checkPlacementStrategy(response); | |
| 19164 }))); | |
| 19165 }); | |
| 19166 | |
| 19167 unittest.test("method--update", () { | |
| 19168 | |
| 19169 var mock = new HttpServerMock(); | |
| 19170 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19171 var arg_request = buildPlacementStrategy(); | |
| 19172 var arg_profileId = "foo"; | |
| 19173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19174 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19175 checkPlacementStrategy(obj); | |
| 19176 | |
| 19177 var path = (req.url).path; | |
| 19178 var pathOffset = 0; | |
| 19179 var index; | |
| 19180 var subPart; | |
| 19181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19182 pathOffset += 1; | |
| 19183 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19184 pathOffset += 18; | |
| 19185 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19186 pathOffset += 13; | |
| 19187 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19188 unittest.expect(index >= 0, unittest.isTrue); | |
| 19189 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19190 pathOffset = index; | |
| 19191 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19192 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19193 pathOffset += 20; | |
| 19194 | |
| 19195 var query = (req.url).query; | |
| 19196 var queryOffset = 0; | |
| 19197 var queryMap = {}; | |
| 19198 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19199 parseBool(n) { | |
| 19200 if (n == "true") return true; | |
| 19201 if (n == "false") return false; | |
| 19202 if (n == null) return null; | |
| 19203 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19204 } | |
| 19205 if (query.length > 0) { | |
| 19206 for (var part in query.split("&")) { | |
| 19207 var keyvalue = part.split("="); | |
| 19208 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19209 } | |
| 19210 } | |
| 19211 | |
| 19212 | |
| 19213 var h = { | |
| 19214 "content-type" : "application/json; charset=utf-8", | |
| 19215 }; | |
| 19216 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19217 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19218 }), true); | |
| 19219 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19220 checkPlacementStrategy(response); | |
| 19221 }))); | |
| 19222 }); | |
| 19223 | |
| 19224 }); | |
| 19225 | |
| 19226 | |
| 19227 unittest.group("resource-PlacementsResourceApi", () { | |
| 19228 unittest.test("method--generatetags", () { | |
| 19229 | |
| 19230 var mock = new HttpServerMock(); | |
| 19231 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19232 var arg_profileId = "foo"; | |
| 19233 var arg_campaignId = "foo"; | |
| 19234 var arg_placementIds = buildUnnamed3282(); | |
| 19235 var arg_tagFormats = buildUnnamed3283(); | |
| 19236 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19237 var path = (req.url).path; | |
| 19238 var pathOffset = 0; | |
| 19239 var index; | |
| 19240 var subPart; | |
| 19241 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19242 pathOffset += 1; | |
| 19243 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19244 pathOffset += 18; | |
| 19245 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19246 pathOffset += 13; | |
| 19247 index = path.indexOf("/placements/generatetags", pathOffset); | |
| 19248 unittest.expect(index >= 0, unittest.isTrue); | |
| 19249 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19250 pathOffset = index; | |
| 19251 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19252 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/placements/generatetags")); | |
| 19253 pathOffset += 24; | |
| 19254 | |
| 19255 var query = (req.url).query; | |
| 19256 var queryOffset = 0; | |
| 19257 var queryMap = {}; | |
| 19258 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19259 parseBool(n) { | |
| 19260 if (n == "true") return true; | |
| 19261 if (n == "false") return false; | |
| 19262 if (n == null) return null; | |
| 19263 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19264 } | |
| 19265 if (query.length > 0) { | |
| 19266 for (var part in query.split("&")) { | |
| 19267 var keyvalue = part.split("="); | |
| 19268 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19269 } | |
| 19270 } | |
| 19271 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 19272 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 19273 unittest.expect(queryMap["tagFormats"], unittest.equals(arg_tagFormats))
; | |
| 19274 | |
| 19275 | |
| 19276 var h = { | |
| 19277 "content-type" : "application/json; charset=utf-8", | |
| 19278 }; | |
| 19279 var resp = convert.JSON.encode(buildPlacementsGenerateTagsResponse()); | |
| 19280 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19281 }), true); | |
| 19282 res.generatetags(arg_profileId, campaignId: arg_campaignId, placementIds:
arg_placementIds, tagFormats: arg_tagFormats).then(unittest.expectAsync(((api.Pl
acementsGenerateTagsResponse response) { | |
| 19283 checkPlacementsGenerateTagsResponse(response); | |
| 19284 }))); | |
| 19285 }); | |
| 19286 | |
| 19287 unittest.test("method--get", () { | |
| 19288 | |
| 19289 var mock = new HttpServerMock(); | |
| 19290 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19291 var arg_profileId = "foo"; | |
| 19292 var arg_id = "foo"; | |
| 19293 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19294 var path = (req.url).path; | |
| 19295 var pathOffset = 0; | |
| 19296 var index; | |
| 19297 var subPart; | |
| 19298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19299 pathOffset += 1; | |
| 19300 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19301 pathOffset += 18; | |
| 19302 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19303 pathOffset += 13; | |
| 19304 index = path.indexOf("/placements/", pathOffset); | |
| 19305 unittest.expect(index >= 0, unittest.isTrue); | |
| 19306 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19307 pathOffset = index; | |
| 19308 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19309 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/placements/")); | |
| 19310 pathOffset += 12; | |
| 19311 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19312 pathOffset = path.length; | |
| 19313 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19314 | |
| 19315 var query = (req.url).query; | |
| 19316 var queryOffset = 0; | |
| 19317 var queryMap = {}; | |
| 19318 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19319 parseBool(n) { | |
| 19320 if (n == "true") return true; | |
| 19321 if (n == "false") return false; | |
| 19322 if (n == null) return null; | |
| 19323 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19324 } | |
| 19325 if (query.length > 0) { | |
| 19326 for (var part in query.split("&")) { | |
| 19327 var keyvalue = part.split("="); | |
| 19328 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19329 } | |
| 19330 } | |
| 19331 | |
| 19332 | |
| 19333 var h = { | |
| 19334 "content-type" : "application/json; charset=utf-8", | |
| 19335 }; | |
| 19336 var resp = convert.JSON.encode(buildPlacement()); | |
| 19337 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19338 }), true); | |
| 19339 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Placement r
esponse) { | |
| 19340 checkPlacement(response); | |
| 19341 }))); | |
| 19342 }); | |
| 19343 | |
| 19344 unittest.test("method--insert", () { | |
| 19345 | |
| 19346 var mock = new HttpServerMock(); | |
| 19347 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19348 var arg_request = buildPlacement(); | |
| 19349 var arg_profileId = "foo"; | |
| 19350 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19351 var obj = new api.Placement.fromJson(json); | |
| 19352 checkPlacement(obj); | |
| 19353 | |
| 19354 var path = (req.url).path; | |
| 19355 var pathOffset = 0; | |
| 19356 var index; | |
| 19357 var subPart; | |
| 19358 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19359 pathOffset += 1; | |
| 19360 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19361 pathOffset += 18; | |
| 19362 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19363 pathOffset += 13; | |
| 19364 index = path.indexOf("/placements", pathOffset); | |
| 19365 unittest.expect(index >= 0, unittest.isTrue); | |
| 19366 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19367 pathOffset = index; | |
| 19368 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19369 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19370 pathOffset += 11; | |
| 19371 | |
| 19372 var query = (req.url).query; | |
| 19373 var queryOffset = 0; | |
| 19374 var queryMap = {}; | |
| 19375 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19376 parseBool(n) { | |
| 19377 if (n == "true") return true; | |
| 19378 if (n == "false") return false; | |
| 19379 if (n == null) return null; | |
| 19380 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19381 } | |
| 19382 if (query.length > 0) { | |
| 19383 for (var part in query.split("&")) { | |
| 19384 var keyvalue = part.split("="); | |
| 19385 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19386 } | |
| 19387 } | |
| 19388 | |
| 19389 | |
| 19390 var h = { | |
| 19391 "content-type" : "application/json; charset=utf-8", | |
| 19392 }; | |
| 19393 var resp = convert.JSON.encode(buildPlacement()); | |
| 19394 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19395 }), true); | |
| 19396 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19397 checkPlacement(response); | |
| 19398 }))); | |
| 19399 }); | |
| 19400 | |
| 19401 unittest.test("method--list", () { | |
| 19402 | |
| 19403 var mock = new HttpServerMock(); | |
| 19404 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19405 var arg_profileId = "foo"; | |
| 19406 var arg_advertiserIds = buildUnnamed3284(); | |
| 19407 var arg_archived = true; | |
| 19408 var arg_campaignIds = buildUnnamed3285(); | |
| 19409 var arg_compatibilities = buildUnnamed3286(); | |
| 19410 var arg_contentCategoryIds = buildUnnamed3287(); | |
| 19411 var arg_directorySiteIds = buildUnnamed3288(); | |
| 19412 var arg_groupIds = buildUnnamed3289(); | |
| 19413 var arg_ids = buildUnnamed3290(); | |
| 19414 var arg_maxEndDate = "foo"; | |
| 19415 var arg_maxResults = 42; | |
| 19416 var arg_maxStartDate = "foo"; | |
| 19417 var arg_minEndDate = "foo"; | |
| 19418 var arg_minStartDate = "foo"; | |
| 19419 var arg_pageToken = "foo"; | |
| 19420 var arg_paymentSource = "foo"; | |
| 19421 var arg_placementStrategyIds = buildUnnamed3291(); | |
| 19422 var arg_pricingTypes = buildUnnamed3292(); | |
| 19423 var arg_searchString = "foo"; | |
| 19424 var arg_siteIds = buildUnnamed3293(); | |
| 19425 var arg_sizeIds = buildUnnamed3294(); | |
| 19426 var arg_sortField = "foo"; | |
| 19427 var arg_sortOrder = "foo"; | |
| 19428 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19429 var path = (req.url).path; | |
| 19430 var pathOffset = 0; | |
| 19431 var index; | |
| 19432 var subPart; | |
| 19433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19434 pathOffset += 1; | |
| 19435 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19436 pathOffset += 18; | |
| 19437 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19438 pathOffset += 13; | |
| 19439 index = path.indexOf("/placements", pathOffset); | |
| 19440 unittest.expect(index >= 0, unittest.isTrue); | |
| 19441 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19442 pathOffset = index; | |
| 19443 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19444 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19445 pathOffset += 11; | |
| 19446 | |
| 19447 var query = (req.url).query; | |
| 19448 var queryOffset = 0; | |
| 19449 var queryMap = {}; | |
| 19450 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19451 parseBool(n) { | |
| 19452 if (n == "true") return true; | |
| 19453 if (n == "false") return false; | |
| 19454 if (n == null) return null; | |
| 19455 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19456 } | |
| 19457 if (query.length > 0) { | |
| 19458 for (var part in query.split("&")) { | |
| 19459 var keyvalue = part.split("="); | |
| 19460 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19461 } | |
| 19462 } | |
| 19463 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19464 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 19465 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 19466 unittest.expect(queryMap["compatibilities"], unittest.equals(arg_compati
bilities)); | |
| 19467 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 19468 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 19469 unittest.expect(queryMap["groupIds"], unittest.equals(arg_groupIds)); | |
| 19470 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19471 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 19472 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19473 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 19474 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 19475 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 19476 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19477 unittest.expect(queryMap["paymentSource"].first, unittest.equals(arg_pay
mentSource)); | |
| 19478 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 19479 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 19480 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19481 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 19482 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 19483 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19484 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19485 | |
| 19486 | |
| 19487 var h = { | |
| 19488 "content-type" : "application/json; charset=utf-8", | |
| 19489 }; | |
| 19490 var resp = convert.JSON.encode(buildPlacementsListResponse()); | |
| 19491 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19492 }), true); | |
| 19493 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) { | |
| 19494 checkPlacementsListResponse(response); | |
| 19495 }))); | |
| 19496 }); | |
| 19497 | |
| 19498 unittest.test("method--patch", () { | |
| 19499 | |
| 19500 var mock = new HttpServerMock(); | |
| 19501 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19502 var arg_request = buildPlacement(); | |
| 19503 var arg_profileId = "foo"; | |
| 19504 var arg_id = "foo"; | |
| 19505 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19506 var obj = new api.Placement.fromJson(json); | |
| 19507 checkPlacement(obj); | |
| 19508 | |
| 19509 var path = (req.url).path; | |
| 19510 var pathOffset = 0; | |
| 19511 var index; | |
| 19512 var subPart; | |
| 19513 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19514 pathOffset += 1; | |
| 19515 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19516 pathOffset += 18; | |
| 19517 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19518 pathOffset += 13; | |
| 19519 index = path.indexOf("/placements", pathOffset); | |
| 19520 unittest.expect(index >= 0, unittest.isTrue); | |
| 19521 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19522 pathOffset = index; | |
| 19523 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19524 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19525 pathOffset += 11; | |
| 19526 | |
| 19527 var query = (req.url).query; | |
| 19528 var queryOffset = 0; | |
| 19529 var queryMap = {}; | |
| 19530 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19531 parseBool(n) { | |
| 19532 if (n == "true") return true; | |
| 19533 if (n == "false") return false; | |
| 19534 if (n == null) return null; | |
| 19535 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19536 } | |
| 19537 if (query.length > 0) { | |
| 19538 for (var part in query.split("&")) { | |
| 19539 var keyvalue = part.split("="); | |
| 19540 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19541 } | |
| 19542 } | |
| 19543 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19544 | |
| 19545 | |
| 19546 var h = { | |
| 19547 "content-type" : "application/json; charset=utf-8", | |
| 19548 }; | |
| 19549 var resp = convert.JSON.encode(buildPlacement()); | |
| 19550 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19551 }), true); | |
| 19552 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Placement response) { | |
| 19553 checkPlacement(response); | |
| 19554 }))); | |
| 19555 }); | |
| 19556 | |
| 19557 unittest.test("method--update", () { | |
| 19558 | |
| 19559 var mock = new HttpServerMock(); | |
| 19560 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19561 var arg_request = buildPlacement(); | |
| 19562 var arg_profileId = "foo"; | |
| 19563 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19564 var obj = new api.Placement.fromJson(json); | |
| 19565 checkPlacement(obj); | |
| 19566 | |
| 19567 var path = (req.url).path; | |
| 19568 var pathOffset = 0; | |
| 19569 var index; | |
| 19570 var subPart; | |
| 19571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19572 pathOffset += 1; | |
| 19573 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19574 pathOffset += 18; | |
| 19575 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19576 pathOffset += 13; | |
| 19577 index = path.indexOf("/placements", pathOffset); | |
| 19578 unittest.expect(index >= 0, unittest.isTrue); | |
| 19579 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19580 pathOffset = index; | |
| 19581 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19582 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19583 pathOffset += 11; | |
| 19584 | |
| 19585 var query = (req.url).query; | |
| 19586 var queryOffset = 0; | |
| 19587 var queryMap = {}; | |
| 19588 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19589 parseBool(n) { | |
| 19590 if (n == "true") return true; | |
| 19591 if (n == "false") return false; | |
| 19592 if (n == null) return null; | |
| 19593 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19594 } | |
| 19595 if (query.length > 0) { | |
| 19596 for (var part in query.split("&")) { | |
| 19597 var keyvalue = part.split("="); | |
| 19598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19599 } | |
| 19600 } | |
| 19601 | |
| 19602 | |
| 19603 var h = { | |
| 19604 "content-type" : "application/json; charset=utf-8", | |
| 19605 }; | |
| 19606 var resp = convert.JSON.encode(buildPlacement()); | |
| 19607 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19608 }), true); | |
| 19609 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19610 checkPlacement(response); | |
| 19611 }))); | |
| 19612 }); | |
| 19613 | |
| 19614 }); | |
| 19615 | |
| 19616 | |
| 19617 unittest.group("resource-PlatformTypesResourceApi", () { | |
| 19618 unittest.test("method--get", () { | |
| 19619 | |
| 19620 var mock = new HttpServerMock(); | |
| 19621 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19622 var arg_profileId = "foo"; | |
| 19623 var arg_id = "foo"; | |
| 19624 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19625 var path = (req.url).path; | |
| 19626 var pathOffset = 0; | |
| 19627 var index; | |
| 19628 var subPart; | |
| 19629 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19630 pathOffset += 1; | |
| 19631 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19632 pathOffset += 18; | |
| 19633 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19634 pathOffset += 13; | |
| 19635 index = path.indexOf("/platformTypes/", pathOffset); | |
| 19636 unittest.expect(index >= 0, unittest.isTrue); | |
| 19637 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19638 pathOffset = index; | |
| 19639 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19640 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/platformTypes/")); | |
| 19641 pathOffset += 15; | |
| 19642 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19643 pathOffset = path.length; | |
| 19644 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19645 | |
| 19646 var query = (req.url).query; | |
| 19647 var queryOffset = 0; | |
| 19648 var queryMap = {}; | |
| 19649 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19650 parseBool(n) { | |
| 19651 if (n == "true") return true; | |
| 19652 if (n == "false") return false; | |
| 19653 if (n == null) return null; | |
| 19654 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19655 } | |
| 19656 if (query.length > 0) { | |
| 19657 for (var part in query.split("&")) { | |
| 19658 var keyvalue = part.split("="); | |
| 19659 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19660 } | |
| 19661 } | |
| 19662 | |
| 19663 | |
| 19664 var h = { | |
| 19665 "content-type" : "application/json; charset=utf-8", | |
| 19666 }; | |
| 19667 var resp = convert.JSON.encode(buildPlatformType()); | |
| 19668 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19669 }), true); | |
| 19670 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlatformTyp
e response) { | |
| 19671 checkPlatformType(response); | |
| 19672 }))); | |
| 19673 }); | |
| 19674 | |
| 19675 unittest.test("method--list", () { | |
| 19676 | |
| 19677 var mock = new HttpServerMock(); | |
| 19678 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19679 var arg_profileId = "foo"; | |
| 19680 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19681 var path = (req.url).path; | |
| 19682 var pathOffset = 0; | |
| 19683 var index; | |
| 19684 var subPart; | |
| 19685 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19686 pathOffset += 1; | |
| 19687 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19688 pathOffset += 18; | |
| 19689 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19690 pathOffset += 13; | |
| 19691 index = path.indexOf("/platformTypes", pathOffset); | |
| 19692 unittest.expect(index >= 0, unittest.isTrue); | |
| 19693 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19694 pathOffset = index; | |
| 19695 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19696 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/platformTypes")); | |
| 19697 pathOffset += 14; | |
| 19698 | |
| 19699 var query = (req.url).query; | |
| 19700 var queryOffset = 0; | |
| 19701 var queryMap = {}; | |
| 19702 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19703 parseBool(n) { | |
| 19704 if (n == "true") return true; | |
| 19705 if (n == "false") return false; | |
| 19706 if (n == null) return null; | |
| 19707 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19708 } | |
| 19709 if (query.length > 0) { | |
| 19710 for (var part in query.split("&")) { | |
| 19711 var keyvalue = part.split("="); | |
| 19712 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19713 } | |
| 19714 } | |
| 19715 | |
| 19716 | |
| 19717 var h = { | |
| 19718 "content-type" : "application/json; charset=utf-8", | |
| 19719 }; | |
| 19720 var resp = convert.JSON.encode(buildPlatformTypesListResponse()); | |
| 19721 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19722 }), true); | |
| 19723 res.list(arg_profileId).then(unittest.expectAsync(((api.PlatformTypesListR
esponse response) { | |
| 19724 checkPlatformTypesListResponse(response); | |
| 19725 }))); | |
| 19726 }); | |
| 19727 | |
| 19728 }); | |
| 19729 | |
| 19730 | |
| 19731 unittest.group("resource-PostalCodesResourceApi", () { | |
| 19732 unittest.test("method--get", () { | |
| 19733 | |
| 19734 var mock = new HttpServerMock(); | |
| 19735 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19736 var arg_profileId = "foo"; | |
| 19737 var arg_code = "foo"; | |
| 19738 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19739 var path = (req.url).path; | |
| 19740 var pathOffset = 0; | |
| 19741 var index; | |
| 19742 var subPart; | |
| 19743 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19744 pathOffset += 1; | |
| 19745 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19746 pathOffset += 18; | |
| 19747 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19748 pathOffset += 13; | |
| 19749 index = path.indexOf("/postalCodes/", pathOffset); | |
| 19750 unittest.expect(index >= 0, unittest.isTrue); | |
| 19751 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19752 pathOffset = index; | |
| 19753 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19754 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/postalCodes/")); | |
| 19755 pathOffset += 13; | |
| 19756 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19757 pathOffset = path.length; | |
| 19758 unittest.expect(subPart, unittest.equals("$arg_code")); | |
| 19759 | |
| 19760 var query = (req.url).query; | |
| 19761 var queryOffset = 0; | |
| 19762 var queryMap = {}; | |
| 19763 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19764 parseBool(n) { | |
| 19765 if (n == "true") return true; | |
| 19766 if (n == "false") return false; | |
| 19767 if (n == null) return null; | |
| 19768 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19769 } | |
| 19770 if (query.length > 0) { | |
| 19771 for (var part in query.split("&")) { | |
| 19772 var keyvalue = part.split("="); | |
| 19773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19774 } | |
| 19775 } | |
| 19776 | |
| 19777 | |
| 19778 var h = { | |
| 19779 "content-type" : "application/json; charset=utf-8", | |
| 19780 }; | |
| 19781 var resp = convert.JSON.encode(buildPostalCode()); | |
| 19782 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19783 }), true); | |
| 19784 res.get(arg_profileId, arg_code).then(unittest.expectAsync(((api.PostalCod
e response) { | |
| 19785 checkPostalCode(response); | |
| 19786 }))); | |
| 19787 }); | |
| 19788 | |
| 19789 unittest.test("method--list", () { | |
| 19790 | |
| 19791 var mock = new HttpServerMock(); | |
| 19792 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19793 var arg_profileId = "foo"; | |
| 19794 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19795 var path = (req.url).path; | |
| 19796 var pathOffset = 0; | |
| 19797 var index; | |
| 19798 var subPart; | |
| 19799 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19800 pathOffset += 1; | |
| 19801 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19802 pathOffset += 18; | |
| 19803 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19804 pathOffset += 13; | |
| 19805 index = path.indexOf("/postalCodes", pathOffset); | |
| 19806 unittest.expect(index >= 0, unittest.isTrue); | |
| 19807 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19808 pathOffset = index; | |
| 19809 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19810 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/postalCodes")); | |
| 19811 pathOffset += 12; | |
| 19812 | |
| 19813 var query = (req.url).query; | |
| 19814 var queryOffset = 0; | |
| 19815 var queryMap = {}; | |
| 19816 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19817 parseBool(n) { | |
| 19818 if (n == "true") return true; | |
| 19819 if (n == "false") return false; | |
| 19820 if (n == null) return null; | |
| 19821 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19822 } | |
| 19823 if (query.length > 0) { | |
| 19824 for (var part in query.split("&")) { | |
| 19825 var keyvalue = part.split("="); | |
| 19826 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19827 } | |
| 19828 } | |
| 19829 | |
| 19830 | |
| 19831 var h = { | |
| 19832 "content-type" : "application/json; charset=utf-8", | |
| 19833 }; | |
| 19834 var resp = convert.JSON.encode(buildPostalCodesListResponse()); | |
| 19835 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19836 }), true); | |
| 19837 res.list(arg_profileId).then(unittest.expectAsync(((api.PostalCodesListRes
ponse response) { | |
| 19838 checkPostalCodesListResponse(response); | |
| 19839 }))); | |
| 19840 }); | |
| 19841 | |
| 19842 }); | |
| 19843 | |
| 19844 | |
| 19845 unittest.group("resource-ProjectsResourceApi", () { | |
| 19846 unittest.test("method--get", () { | |
| 19847 | |
| 19848 var mock = new HttpServerMock(); | |
| 19849 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19850 var arg_profileId = "foo"; | |
| 19851 var arg_id = "foo"; | |
| 19852 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19853 var path = (req.url).path; | |
| 19854 var pathOffset = 0; | |
| 19855 var index; | |
| 19856 var subPart; | |
| 19857 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19858 pathOffset += 1; | |
| 19859 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19860 pathOffset += 18; | |
| 19861 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19862 pathOffset += 13; | |
| 19863 index = path.indexOf("/projects/", pathOffset); | |
| 19864 unittest.expect(index >= 0, unittest.isTrue); | |
| 19865 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19866 pathOffset = index; | |
| 19867 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19868 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 19869 pathOffset += 10; | |
| 19870 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19871 pathOffset = path.length; | |
| 19872 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19873 | |
| 19874 var query = (req.url).query; | |
| 19875 var queryOffset = 0; | |
| 19876 var queryMap = {}; | |
| 19877 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19878 parseBool(n) { | |
| 19879 if (n == "true") return true; | |
| 19880 if (n == "false") return false; | |
| 19881 if (n == null) return null; | |
| 19882 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19883 } | |
| 19884 if (query.length > 0) { | |
| 19885 for (var part in query.split("&")) { | |
| 19886 var keyvalue = part.split("="); | |
| 19887 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19888 } | |
| 19889 } | |
| 19890 | |
| 19891 | |
| 19892 var h = { | |
| 19893 "content-type" : "application/json; charset=utf-8", | |
| 19894 }; | |
| 19895 var resp = convert.JSON.encode(buildProject()); | |
| 19896 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19897 }), true); | |
| 19898 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Project res
ponse) { | |
| 19899 checkProject(response); | |
| 19900 }))); | |
| 19901 }); | |
| 19902 | |
| 19903 unittest.test("method--list", () { | |
| 19904 | |
| 19905 var mock = new HttpServerMock(); | |
| 19906 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19907 var arg_profileId = "foo"; | |
| 19908 var arg_advertiserIds = buildUnnamed3295(); | |
| 19909 var arg_ids = buildUnnamed3296(); | |
| 19910 var arg_maxResults = 42; | |
| 19911 var arg_pageToken = "foo"; | |
| 19912 var arg_searchString = "foo"; | |
| 19913 var arg_sortField = "foo"; | |
| 19914 var arg_sortOrder = "foo"; | |
| 19915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19916 var path = (req.url).path; | |
| 19917 var pathOffset = 0; | |
| 19918 var index; | |
| 19919 var subPart; | |
| 19920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19921 pathOffset += 1; | |
| 19922 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19923 pathOffset += 18; | |
| 19924 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19925 pathOffset += 13; | |
| 19926 index = path.indexOf("/projects", pathOffset); | |
| 19927 unittest.expect(index >= 0, unittest.isTrue); | |
| 19928 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19929 pathOffset = index; | |
| 19930 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19931 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/projects")); | |
| 19932 pathOffset += 9; | |
| 19933 | |
| 19934 var query = (req.url).query; | |
| 19935 var queryOffset = 0; | |
| 19936 var queryMap = {}; | |
| 19937 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19938 parseBool(n) { | |
| 19939 if (n == "true") return true; | |
| 19940 if (n == "false") return false; | |
| 19941 if (n == null) return null; | |
| 19942 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19943 } | |
| 19944 if (query.length > 0) { | |
| 19945 for (var part in query.split("&")) { | |
| 19946 var keyvalue = part.split("="); | |
| 19947 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19948 } | |
| 19949 } | |
| 19950 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19951 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19952 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19953 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19954 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19955 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19956 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19957 | |
| 19958 | |
| 19959 var h = { | |
| 19960 "content-type" : "application/json; charset=utf-8", | |
| 19961 }; | |
| 19962 var resp = convert.JSON.encode(buildProjectsListResponse()); | |
| 19963 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19964 }), true); | |
| 19965 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) { | |
| 19966 checkProjectsListResponse(response); | |
| 19967 }))); | |
| 19968 }); | |
| 19969 | |
| 19970 }); | |
| 19971 | |
| 19972 | |
| 19973 unittest.group("resource-RegionsResourceApi", () { | |
| 19974 unittest.test("method--list", () { | |
| 19975 | |
| 19976 var mock = new HttpServerMock(); | |
| 19977 api.RegionsResourceApi res = new api.DfareportingApi(mock).regions; | |
| 19978 var arg_profileId = "foo"; | |
| 19979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19980 var path = (req.url).path; | |
| 19981 var pathOffset = 0; | |
| 19982 var index; | |
| 19983 var subPart; | |
| 19984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19985 pathOffset += 1; | |
| 19986 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 19987 pathOffset += 18; | |
| 19988 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19989 pathOffset += 13; | |
| 19990 index = path.indexOf("/regions", pathOffset); | |
| 19991 unittest.expect(index >= 0, unittest.isTrue); | |
| 19992 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19993 pathOffset = index; | |
| 19994 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19995 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/regions")); | |
| 19996 pathOffset += 8; | |
| 19997 | |
| 19998 var query = (req.url).query; | |
| 19999 var queryOffset = 0; | |
| 20000 var queryMap = {}; | |
| 20001 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20002 parseBool(n) { | |
| 20003 if (n == "true") return true; | |
| 20004 if (n == "false") return false; | |
| 20005 if (n == null) return null; | |
| 20006 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20007 } | |
| 20008 if (query.length > 0) { | |
| 20009 for (var part in query.split("&")) { | |
| 20010 var keyvalue = part.split("="); | |
| 20011 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20012 } | |
| 20013 } | |
| 20014 | |
| 20015 | |
| 20016 var h = { | |
| 20017 "content-type" : "application/json; charset=utf-8", | |
| 20018 }; | |
| 20019 var resp = convert.JSON.encode(buildRegionsListResponse()); | |
| 20020 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20021 }), true); | |
| 20022 res.list(arg_profileId).then(unittest.expectAsync(((api.RegionsListRespons
e response) { | |
| 20023 checkRegionsListResponse(response); | |
| 20024 }))); | |
| 20025 }); | |
| 20026 | |
| 20027 }); | |
| 20028 | |
| 20029 | |
| 20030 unittest.group("resource-RemarketingListSharesResourceApi", () { | |
| 20031 unittest.test("method--get", () { | |
| 20032 | |
| 20033 var mock = new HttpServerMock(); | |
| 20034 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20035 var arg_profileId = "foo"; | |
| 20036 var arg_remarketingListId = "foo"; | |
| 20037 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20038 var path = (req.url).path; | |
| 20039 var pathOffset = 0; | |
| 20040 var index; | |
| 20041 var subPart; | |
| 20042 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20043 pathOffset += 1; | |
| 20044 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20045 pathOffset += 18; | |
| 20046 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20047 pathOffset += 13; | |
| 20048 index = path.indexOf("/remarketingListShares/", pathOffset); | |
| 20049 unittest.expect(index >= 0, unittest.isTrue); | |
| 20050 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20051 pathOffset = index; | |
| 20052 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20053 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/remarketingListShares/")); | |
| 20054 pathOffset += 23; | |
| 20055 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20056 pathOffset = path.length; | |
| 20057 unittest.expect(subPart, unittest.equals("$arg_remarketingListId")); | |
| 20058 | |
| 20059 var query = (req.url).query; | |
| 20060 var queryOffset = 0; | |
| 20061 var queryMap = {}; | |
| 20062 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20063 parseBool(n) { | |
| 20064 if (n == "true") return true; | |
| 20065 if (n == "false") return false; | |
| 20066 if (n == null) return null; | |
| 20067 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20068 } | |
| 20069 if (query.length > 0) { | |
| 20070 for (var part in query.split("&")) { | |
| 20071 var keyvalue = part.split("="); | |
| 20072 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20073 } | |
| 20074 } | |
| 20075 | |
| 20076 | |
| 20077 var h = { | |
| 20078 "content-type" : "application/json; charset=utf-8", | |
| 20079 }; | |
| 20080 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20081 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20082 }), true); | |
| 20083 res.get(arg_profileId, arg_remarketingListId).then(unittest.expectAsync(((
api.RemarketingListShare response) { | |
| 20084 checkRemarketingListShare(response); | |
| 20085 }))); | |
| 20086 }); | |
| 20087 | |
| 20088 unittest.test("method--patch", () { | |
| 20089 | |
| 20090 var mock = new HttpServerMock(); | |
| 20091 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20092 var arg_request = buildRemarketingListShare(); | |
| 20093 var arg_profileId = "foo"; | |
| 20094 var arg_remarketingListId = "foo"; | |
| 20095 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20096 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20097 checkRemarketingListShare(obj); | |
| 20098 | |
| 20099 var path = (req.url).path; | |
| 20100 var pathOffset = 0; | |
| 20101 var index; | |
| 20102 var subPart; | |
| 20103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20104 pathOffset += 1; | |
| 20105 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20106 pathOffset += 18; | |
| 20107 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20108 pathOffset += 13; | |
| 20109 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20110 unittest.expect(index >= 0, unittest.isTrue); | |
| 20111 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20112 pathOffset = index; | |
| 20113 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20114 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20115 pathOffset += 22; | |
| 20116 | |
| 20117 var query = (req.url).query; | |
| 20118 var queryOffset = 0; | |
| 20119 var queryMap = {}; | |
| 20120 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20121 parseBool(n) { | |
| 20122 if (n == "true") return true; | |
| 20123 if (n == "false") return false; | |
| 20124 if (n == null) return null; | |
| 20125 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20126 } | |
| 20127 if (query.length > 0) { | |
| 20128 for (var part in query.split("&")) { | |
| 20129 var keyvalue = part.split("="); | |
| 20130 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20131 } | |
| 20132 } | |
| 20133 unittest.expect(queryMap["remarketingListId"].first, unittest.equals(arg
_remarketingListId)); | |
| 20134 | |
| 20135 | |
| 20136 var h = { | |
| 20137 "content-type" : "application/json; charset=utf-8", | |
| 20138 }; | |
| 20139 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20140 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20141 }), true); | |
| 20142 res.patch(arg_request, arg_profileId, arg_remarketingListId).then(unittest
.expectAsync(((api.RemarketingListShare response) { | |
| 20143 checkRemarketingListShare(response); | |
| 20144 }))); | |
| 20145 }); | |
| 20146 | |
| 20147 unittest.test("method--update", () { | |
| 20148 | |
| 20149 var mock = new HttpServerMock(); | |
| 20150 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20151 var arg_request = buildRemarketingListShare(); | |
| 20152 var arg_profileId = "foo"; | |
| 20153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20154 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20155 checkRemarketingListShare(obj); | |
| 20156 | |
| 20157 var path = (req.url).path; | |
| 20158 var pathOffset = 0; | |
| 20159 var index; | |
| 20160 var subPart; | |
| 20161 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20162 pathOffset += 1; | |
| 20163 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20164 pathOffset += 18; | |
| 20165 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20166 pathOffset += 13; | |
| 20167 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20168 unittest.expect(index >= 0, unittest.isTrue); | |
| 20169 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20170 pathOffset = index; | |
| 20171 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20172 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20173 pathOffset += 22; | |
| 20174 | |
| 20175 var query = (req.url).query; | |
| 20176 var queryOffset = 0; | |
| 20177 var queryMap = {}; | |
| 20178 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20179 parseBool(n) { | |
| 20180 if (n == "true") return true; | |
| 20181 if (n == "false") return false; | |
| 20182 if (n == null) return null; | |
| 20183 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20184 } | |
| 20185 if (query.length > 0) { | |
| 20186 for (var part in query.split("&")) { | |
| 20187 var keyvalue = part.split("="); | |
| 20188 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20189 } | |
| 20190 } | |
| 20191 | |
| 20192 | |
| 20193 var h = { | |
| 20194 "content-type" : "application/json; charset=utf-8", | |
| 20195 }; | |
| 20196 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20197 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20198 }), true); | |
| 20199 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingListShare response) { | |
| 20200 checkRemarketingListShare(response); | |
| 20201 }))); | |
| 20202 }); | |
| 20203 | |
| 20204 }); | |
| 20205 | |
| 20206 | |
| 20207 unittest.group("resource-RemarketingListsResourceApi", () { | |
| 20208 unittest.test("method--get", () { | |
| 20209 | |
| 20210 var mock = new HttpServerMock(); | |
| 20211 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20212 var arg_profileId = "foo"; | |
| 20213 var arg_id = "foo"; | |
| 20214 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20215 var path = (req.url).path; | |
| 20216 var pathOffset = 0; | |
| 20217 var index; | |
| 20218 var subPart; | |
| 20219 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20220 pathOffset += 1; | |
| 20221 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20222 pathOffset += 18; | |
| 20223 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20224 pathOffset += 13; | |
| 20225 index = path.indexOf("/remarketingLists/", pathOffset); | |
| 20226 unittest.expect(index >= 0, unittest.isTrue); | |
| 20227 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20228 pathOffset = index; | |
| 20229 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20230 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/remarketingLists/")); | |
| 20231 pathOffset += 18; | |
| 20232 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20233 pathOffset = path.length; | |
| 20234 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20235 | |
| 20236 var query = (req.url).query; | |
| 20237 var queryOffset = 0; | |
| 20238 var queryMap = {}; | |
| 20239 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20240 parseBool(n) { | |
| 20241 if (n == "true") return true; | |
| 20242 if (n == "false") return false; | |
| 20243 if (n == null) return null; | |
| 20244 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20245 } | |
| 20246 if (query.length > 0) { | |
| 20247 for (var part in query.split("&")) { | |
| 20248 var keyvalue = part.split("="); | |
| 20249 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20250 } | |
| 20251 } | |
| 20252 | |
| 20253 | |
| 20254 var h = { | |
| 20255 "content-type" : "application/json; charset=utf-8", | |
| 20256 }; | |
| 20257 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20258 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20259 }), true); | |
| 20260 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Remarketing
List response) { | |
| 20261 checkRemarketingList(response); | |
| 20262 }))); | |
| 20263 }); | |
| 20264 | |
| 20265 unittest.test("method--insert", () { | |
| 20266 | |
| 20267 var mock = new HttpServerMock(); | |
| 20268 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20269 var arg_request = buildRemarketingList(); | |
| 20270 var arg_profileId = "foo"; | |
| 20271 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20272 var obj = new api.RemarketingList.fromJson(json); | |
| 20273 checkRemarketingList(obj); | |
| 20274 | |
| 20275 var path = (req.url).path; | |
| 20276 var pathOffset = 0; | |
| 20277 var index; | |
| 20278 var subPart; | |
| 20279 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20280 pathOffset += 1; | |
| 20281 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20282 pathOffset += 18; | |
| 20283 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20284 pathOffset += 13; | |
| 20285 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20286 unittest.expect(index >= 0, unittest.isTrue); | |
| 20287 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20288 pathOffset = index; | |
| 20289 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20290 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20291 pathOffset += 17; | |
| 20292 | |
| 20293 var query = (req.url).query; | |
| 20294 var queryOffset = 0; | |
| 20295 var queryMap = {}; | |
| 20296 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20297 parseBool(n) { | |
| 20298 if (n == "true") return true; | |
| 20299 if (n == "false") return false; | |
| 20300 if (n == null) return null; | |
| 20301 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20302 } | |
| 20303 if (query.length > 0) { | |
| 20304 for (var part in query.split("&")) { | |
| 20305 var keyvalue = part.split("="); | |
| 20306 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20307 } | |
| 20308 } | |
| 20309 | |
| 20310 | |
| 20311 var h = { | |
| 20312 "content-type" : "application/json; charset=utf-8", | |
| 20313 }; | |
| 20314 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20315 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20316 }), true); | |
| 20317 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20318 checkRemarketingList(response); | |
| 20319 }))); | |
| 20320 }); | |
| 20321 | |
| 20322 unittest.test("method--list", () { | |
| 20323 | |
| 20324 var mock = new HttpServerMock(); | |
| 20325 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20326 var arg_profileId = "foo"; | |
| 20327 var arg_advertiserId = "foo"; | |
| 20328 var arg_active = true; | |
| 20329 var arg_floodlightActivityId = "foo"; | |
| 20330 var arg_maxResults = 42; | |
| 20331 var arg_name = "foo"; | |
| 20332 var arg_pageToken = "foo"; | |
| 20333 var arg_sortField = "foo"; | |
| 20334 var arg_sortOrder = "foo"; | |
| 20335 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20336 var path = (req.url).path; | |
| 20337 var pathOffset = 0; | |
| 20338 var index; | |
| 20339 var subPart; | |
| 20340 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20341 pathOffset += 1; | |
| 20342 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20343 pathOffset += 18; | |
| 20344 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20345 pathOffset += 13; | |
| 20346 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20347 unittest.expect(index >= 0, unittest.isTrue); | |
| 20348 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20349 pathOffset = index; | |
| 20350 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20351 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20352 pathOffset += 17; | |
| 20353 | |
| 20354 var query = (req.url).query; | |
| 20355 var queryOffset = 0; | |
| 20356 var queryMap = {}; | |
| 20357 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20358 parseBool(n) { | |
| 20359 if (n == "true") return true; | |
| 20360 if (n == "false") return false; | |
| 20361 if (n == null) return null; | |
| 20362 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20363 } | |
| 20364 if (query.length > 0) { | |
| 20365 for (var part in query.split("&")) { | |
| 20366 var keyvalue = part.split("="); | |
| 20367 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20368 } | |
| 20369 } | |
| 20370 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 20371 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 20372 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 20373 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20374 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 20375 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20376 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20377 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20378 | |
| 20379 | |
| 20380 var h = { | |
| 20381 "content-type" : "application/json; charset=utf-8", | |
| 20382 }; | |
| 20383 var resp = convert.JSON.encode(buildRemarketingListsListResponse()); | |
| 20384 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20385 }), true); | |
| 20386 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) { | |
| 20387 checkRemarketingListsListResponse(response); | |
| 20388 }))); | |
| 20389 }); | |
| 20390 | |
| 20391 unittest.test("method--patch", () { | |
| 20392 | |
| 20393 var mock = new HttpServerMock(); | |
| 20394 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20395 var arg_request = buildRemarketingList(); | |
| 20396 var arg_profileId = "foo"; | |
| 20397 var arg_id = "foo"; | |
| 20398 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20399 var obj = new api.RemarketingList.fromJson(json); | |
| 20400 checkRemarketingList(obj); | |
| 20401 | |
| 20402 var path = (req.url).path; | |
| 20403 var pathOffset = 0; | |
| 20404 var index; | |
| 20405 var subPart; | |
| 20406 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20407 pathOffset += 1; | |
| 20408 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20409 pathOffset += 18; | |
| 20410 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20411 pathOffset += 13; | |
| 20412 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20413 unittest.expect(index >= 0, unittest.isTrue); | |
| 20414 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20415 pathOffset = index; | |
| 20416 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20417 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20418 pathOffset += 17; | |
| 20419 | |
| 20420 var query = (req.url).query; | |
| 20421 var queryOffset = 0; | |
| 20422 var queryMap = {}; | |
| 20423 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20424 parseBool(n) { | |
| 20425 if (n == "true") return true; | |
| 20426 if (n == "false") return false; | |
| 20427 if (n == null) return null; | |
| 20428 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20429 } | |
| 20430 if (query.length > 0) { | |
| 20431 for (var part in query.split("&")) { | |
| 20432 var keyvalue = part.split("="); | |
| 20433 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20434 } | |
| 20435 } | |
| 20436 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 20437 | |
| 20438 | |
| 20439 var h = { | |
| 20440 "content-type" : "application/json; charset=utf-8", | |
| 20441 }; | |
| 20442 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20443 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20444 }), true); | |
| 20445 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.RemarketingList response) { | |
| 20446 checkRemarketingList(response); | |
| 20447 }))); | |
| 20448 }); | |
| 20449 | |
| 20450 unittest.test("method--update", () { | |
| 20451 | |
| 20452 var mock = new HttpServerMock(); | |
| 20453 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20454 var arg_request = buildRemarketingList(); | |
| 20455 var arg_profileId = "foo"; | |
| 20456 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20457 var obj = new api.RemarketingList.fromJson(json); | |
| 20458 checkRemarketingList(obj); | |
| 20459 | |
| 20460 var path = (req.url).path; | |
| 20461 var pathOffset = 0; | |
| 20462 var index; | |
| 20463 var subPart; | |
| 20464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20465 pathOffset += 1; | |
| 20466 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20467 pathOffset += 18; | |
| 20468 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20469 pathOffset += 13; | |
| 20470 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20471 unittest.expect(index >= 0, unittest.isTrue); | |
| 20472 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20473 pathOffset = index; | |
| 20474 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20475 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20476 pathOffset += 17; | |
| 20477 | |
| 20478 var query = (req.url).query; | |
| 20479 var queryOffset = 0; | |
| 20480 var queryMap = {}; | |
| 20481 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20482 parseBool(n) { | |
| 20483 if (n == "true") return true; | |
| 20484 if (n == "false") return false; | |
| 20485 if (n == null) return null; | |
| 20486 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20487 } | |
| 20488 if (query.length > 0) { | |
| 20489 for (var part in query.split("&")) { | |
| 20490 var keyvalue = part.split("="); | |
| 20491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20492 } | |
| 20493 } | |
| 20494 | |
| 20495 | |
| 20496 var h = { | |
| 20497 "content-type" : "application/json; charset=utf-8", | |
| 20498 }; | |
| 20499 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20500 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20501 }), true); | |
| 20502 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20503 checkRemarketingList(response); | |
| 20504 }))); | |
| 20505 }); | |
| 20506 | |
| 20507 }); | |
| 20508 | |
| 20509 | |
| 20510 unittest.group("resource-ReportsResourceApi", () { | |
| 20511 unittest.test("method--delete", () { | |
| 20512 | |
| 20513 var mock = new HttpServerMock(); | |
| 20514 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20515 var arg_profileId = "foo"; | |
| 20516 var arg_reportId = "foo"; | |
| 20517 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20518 var path = (req.url).path; | |
| 20519 var pathOffset = 0; | |
| 20520 var index; | |
| 20521 var subPart; | |
| 20522 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20523 pathOffset += 1; | |
| 20524 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20525 pathOffset += 18; | |
| 20526 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20527 pathOffset += 13; | |
| 20528 index = path.indexOf("/reports/", pathOffset); | |
| 20529 unittest.expect(index >= 0, unittest.isTrue); | |
| 20530 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20531 pathOffset = index; | |
| 20532 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20533 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20534 pathOffset += 9; | |
| 20535 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20536 pathOffset = path.length; | |
| 20537 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20538 | |
| 20539 var query = (req.url).query; | |
| 20540 var queryOffset = 0; | |
| 20541 var queryMap = {}; | |
| 20542 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20543 parseBool(n) { | |
| 20544 if (n == "true") return true; | |
| 20545 if (n == "false") return false; | |
| 20546 if (n == null) return null; | |
| 20547 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20548 } | |
| 20549 if (query.length > 0) { | |
| 20550 for (var part in query.split("&")) { | |
| 20551 var keyvalue = part.split("="); | |
| 20552 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20553 } | |
| 20554 } | |
| 20555 | |
| 20556 | |
| 20557 var h = { | |
| 20558 "content-type" : "application/json; charset=utf-8", | |
| 20559 }; | |
| 20560 var resp = ""; | |
| 20561 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20562 }), true); | |
| 20563 res.delete(arg_profileId, arg_reportId).then(unittest.expectAsync((_) {}))
; | |
| 20564 }); | |
| 20565 | |
| 20566 unittest.test("method--get", () { | |
| 20567 | |
| 20568 var mock = new HttpServerMock(); | |
| 20569 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20570 var arg_profileId = "foo"; | |
| 20571 var arg_reportId = "foo"; | |
| 20572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20573 var path = (req.url).path; | |
| 20574 var pathOffset = 0; | |
| 20575 var index; | |
| 20576 var subPart; | |
| 20577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20578 pathOffset += 1; | |
| 20579 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20580 pathOffset += 18; | |
| 20581 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20582 pathOffset += 13; | |
| 20583 index = path.indexOf("/reports/", pathOffset); | |
| 20584 unittest.expect(index >= 0, unittest.isTrue); | |
| 20585 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20586 pathOffset = index; | |
| 20587 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20588 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20589 pathOffset += 9; | |
| 20590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20591 pathOffset = path.length; | |
| 20592 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20593 | |
| 20594 var query = (req.url).query; | |
| 20595 var queryOffset = 0; | |
| 20596 var queryMap = {}; | |
| 20597 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20598 parseBool(n) { | |
| 20599 if (n == "true") return true; | |
| 20600 if (n == "false") return false; | |
| 20601 if (n == null) return null; | |
| 20602 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20603 } | |
| 20604 if (query.length > 0) { | |
| 20605 for (var part in query.split("&")) { | |
| 20606 var keyvalue = part.split("="); | |
| 20607 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20608 } | |
| 20609 } | |
| 20610 | |
| 20611 | |
| 20612 var h = { | |
| 20613 "content-type" : "application/json; charset=utf-8", | |
| 20614 }; | |
| 20615 var resp = convert.JSON.encode(buildReport()); | |
| 20616 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20617 }), true); | |
| 20618 res.get(arg_profileId, arg_reportId).then(unittest.expectAsync(((api.Repor
t response) { | |
| 20619 checkReport(response); | |
| 20620 }))); | |
| 20621 }); | |
| 20622 | |
| 20623 unittest.test("method--insert", () { | |
| 20624 | |
| 20625 var mock = new HttpServerMock(); | |
| 20626 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20627 var arg_request = buildReport(); | |
| 20628 var arg_profileId = "foo"; | |
| 20629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20630 var obj = new api.Report.fromJson(json); | |
| 20631 checkReport(obj); | |
| 20632 | |
| 20633 var path = (req.url).path; | |
| 20634 var pathOffset = 0; | |
| 20635 var index; | |
| 20636 var subPart; | |
| 20637 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20638 pathOffset += 1; | |
| 20639 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20640 pathOffset += 18; | |
| 20641 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20642 pathOffset += 13; | |
| 20643 index = path.indexOf("/reports", pathOffset); | |
| 20644 unittest.expect(index >= 0, unittest.isTrue); | |
| 20645 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20646 pathOffset = index; | |
| 20647 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20648 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20649 pathOffset += 8; | |
| 20650 | |
| 20651 var query = (req.url).query; | |
| 20652 var queryOffset = 0; | |
| 20653 var queryMap = {}; | |
| 20654 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20655 parseBool(n) { | |
| 20656 if (n == "true") return true; | |
| 20657 if (n == "false") return false; | |
| 20658 if (n == null) return null; | |
| 20659 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20660 } | |
| 20661 if (query.length > 0) { | |
| 20662 for (var part in query.split("&")) { | |
| 20663 var keyvalue = part.split("="); | |
| 20664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20665 } | |
| 20666 } | |
| 20667 | |
| 20668 | |
| 20669 var h = { | |
| 20670 "content-type" : "application/json; charset=utf-8", | |
| 20671 }; | |
| 20672 var resp = convert.JSON.encode(buildReport()); | |
| 20673 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20674 }), true); | |
| 20675 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rep
ort response) { | |
| 20676 checkReport(response); | |
| 20677 }))); | |
| 20678 }); | |
| 20679 | |
| 20680 unittest.test("method--list", () { | |
| 20681 | |
| 20682 var mock = new HttpServerMock(); | |
| 20683 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20684 var arg_profileId = "foo"; | |
| 20685 var arg_maxResults = 42; | |
| 20686 var arg_pageToken = "foo"; | |
| 20687 var arg_scope = "foo"; | |
| 20688 var arg_sortField = "foo"; | |
| 20689 var arg_sortOrder = "foo"; | |
| 20690 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20691 var path = (req.url).path; | |
| 20692 var pathOffset = 0; | |
| 20693 var index; | |
| 20694 var subPart; | |
| 20695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20696 pathOffset += 1; | |
| 20697 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20698 pathOffset += 18; | |
| 20699 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20700 pathOffset += 13; | |
| 20701 index = path.indexOf("/reports", pathOffset); | |
| 20702 unittest.expect(index >= 0, unittest.isTrue); | |
| 20703 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20704 pathOffset = index; | |
| 20705 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20706 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20707 pathOffset += 8; | |
| 20708 | |
| 20709 var query = (req.url).query; | |
| 20710 var queryOffset = 0; | |
| 20711 var queryMap = {}; | |
| 20712 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20713 parseBool(n) { | |
| 20714 if (n == "true") return true; | |
| 20715 if (n == "false") return false; | |
| 20716 if (n == null) return null; | |
| 20717 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20718 } | |
| 20719 if (query.length > 0) { | |
| 20720 for (var part in query.split("&")) { | |
| 20721 var keyvalue = part.split("="); | |
| 20722 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20723 } | |
| 20724 } | |
| 20725 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20726 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20727 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 20728 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20729 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20730 | |
| 20731 | |
| 20732 var h = { | |
| 20733 "content-type" : "application/json; charset=utf-8", | |
| 20734 }; | |
| 20735 var resp = convert.JSON.encode(buildReportList()); | |
| 20736 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20737 }), true); | |
| 20738 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) { | |
| 20739 checkReportList(response); | |
| 20740 }))); | |
| 20741 }); | |
| 20742 | |
| 20743 unittest.test("method--patch", () { | |
| 20744 | |
| 20745 var mock = new HttpServerMock(); | |
| 20746 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20747 var arg_request = buildReport(); | |
| 20748 var arg_profileId = "foo"; | |
| 20749 var arg_reportId = "foo"; | |
| 20750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20751 var obj = new api.Report.fromJson(json); | |
| 20752 checkReport(obj); | |
| 20753 | |
| 20754 var path = (req.url).path; | |
| 20755 var pathOffset = 0; | |
| 20756 var index; | |
| 20757 var subPart; | |
| 20758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20759 pathOffset += 1; | |
| 20760 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20761 pathOffset += 18; | |
| 20762 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20763 pathOffset += 13; | |
| 20764 index = path.indexOf("/reports/", pathOffset); | |
| 20765 unittest.expect(index >= 0, unittest.isTrue); | |
| 20766 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20767 pathOffset = index; | |
| 20768 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20769 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20770 pathOffset += 9; | |
| 20771 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20772 pathOffset = path.length; | |
| 20773 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20774 | |
| 20775 var query = (req.url).query; | |
| 20776 var queryOffset = 0; | |
| 20777 var queryMap = {}; | |
| 20778 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20779 parseBool(n) { | |
| 20780 if (n == "true") return true; | |
| 20781 if (n == "false") return false; | |
| 20782 if (n == null) return null; | |
| 20783 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20784 } | |
| 20785 if (query.length > 0) { | |
| 20786 for (var part in query.split("&")) { | |
| 20787 var keyvalue = part.split("="); | |
| 20788 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20789 } | |
| 20790 } | |
| 20791 | |
| 20792 | |
| 20793 var h = { | |
| 20794 "content-type" : "application/json; charset=utf-8", | |
| 20795 }; | |
| 20796 var resp = convert.JSON.encode(buildReport()); | |
| 20797 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20798 }), true); | |
| 20799 res.patch(arg_request, arg_profileId, arg_reportId).then(unittest.expectAs
ync(((api.Report response) { | |
| 20800 checkReport(response); | |
| 20801 }))); | |
| 20802 }); | |
| 20803 | |
| 20804 unittest.test("method--run", () { | |
| 20805 | |
| 20806 var mock = new HttpServerMock(); | |
| 20807 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20808 var arg_profileId = "foo"; | |
| 20809 var arg_reportId = "foo"; | |
| 20810 var arg_synchronous = true; | |
| 20811 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20812 var path = (req.url).path; | |
| 20813 var pathOffset = 0; | |
| 20814 var index; | |
| 20815 var subPart; | |
| 20816 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20817 pathOffset += 1; | |
| 20818 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20819 pathOffset += 18; | |
| 20820 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20821 pathOffset += 13; | |
| 20822 index = path.indexOf("/reports/", pathOffset); | |
| 20823 unittest.expect(index >= 0, unittest.isTrue); | |
| 20824 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20825 pathOffset = index; | |
| 20826 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20827 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20828 pathOffset += 9; | |
| 20829 index = path.indexOf("/run", pathOffset); | |
| 20830 unittest.expect(index >= 0, unittest.isTrue); | |
| 20831 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20832 pathOffset = index; | |
| 20833 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20834 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/run")); | |
| 20835 pathOffset += 4; | |
| 20836 | |
| 20837 var query = (req.url).query; | |
| 20838 var queryOffset = 0; | |
| 20839 var queryMap = {}; | |
| 20840 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20841 parseBool(n) { | |
| 20842 if (n == "true") return true; | |
| 20843 if (n == "false") return false; | |
| 20844 if (n == null) return null; | |
| 20845 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20846 } | |
| 20847 if (query.length > 0) { | |
| 20848 for (var part in query.split("&")) { | |
| 20849 var keyvalue = part.split("="); | |
| 20850 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20851 } | |
| 20852 } | |
| 20853 unittest.expect(queryMap["synchronous"].first, unittest.equals("$arg_syn
chronous")); | |
| 20854 | |
| 20855 | |
| 20856 var h = { | |
| 20857 "content-type" : "application/json; charset=utf-8", | |
| 20858 }; | |
| 20859 var resp = convert.JSON.encode(buildFile()); | |
| 20860 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20861 }), true); | |
| 20862 res.run(arg_profileId, arg_reportId, synchronous: arg_synchronous).then(un
ittest.expectAsync(((api.File response) { | |
| 20863 checkFile(response); | |
| 20864 }))); | |
| 20865 }); | |
| 20866 | |
| 20867 unittest.test("method--update", () { | |
| 20868 | |
| 20869 var mock = new HttpServerMock(); | |
| 20870 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20871 var arg_request = buildReport(); | |
| 20872 var arg_profileId = "foo"; | |
| 20873 var arg_reportId = "foo"; | |
| 20874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20875 var obj = new api.Report.fromJson(json); | |
| 20876 checkReport(obj); | |
| 20877 | |
| 20878 var path = (req.url).path; | |
| 20879 var pathOffset = 0; | |
| 20880 var index; | |
| 20881 var subPart; | |
| 20882 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20883 pathOffset += 1; | |
| 20884 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20885 pathOffset += 18; | |
| 20886 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20887 pathOffset += 13; | |
| 20888 index = path.indexOf("/reports/", pathOffset); | |
| 20889 unittest.expect(index >= 0, unittest.isTrue); | |
| 20890 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20891 pathOffset = index; | |
| 20892 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20893 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20894 pathOffset += 9; | |
| 20895 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20896 pathOffset = path.length; | |
| 20897 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20898 | |
| 20899 var query = (req.url).query; | |
| 20900 var queryOffset = 0; | |
| 20901 var queryMap = {}; | |
| 20902 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20903 parseBool(n) { | |
| 20904 if (n == "true") return true; | |
| 20905 if (n == "false") return false; | |
| 20906 if (n == null) return null; | |
| 20907 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20908 } | |
| 20909 if (query.length > 0) { | |
| 20910 for (var part in query.split("&")) { | |
| 20911 var keyvalue = part.split("="); | |
| 20912 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20913 } | |
| 20914 } | |
| 20915 | |
| 20916 | |
| 20917 var h = { | |
| 20918 "content-type" : "application/json; charset=utf-8", | |
| 20919 }; | |
| 20920 var resp = convert.JSON.encode(buildReport()); | |
| 20921 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20922 }), true); | |
| 20923 res.update(arg_request, arg_profileId, arg_reportId).then(unittest.expectA
sync(((api.Report response) { | |
| 20924 checkReport(response); | |
| 20925 }))); | |
| 20926 }); | |
| 20927 | |
| 20928 }); | |
| 20929 | |
| 20930 | |
| 20931 unittest.group("resource-ReportsCompatibleFieldsResourceApi", () { | |
| 20932 unittest.test("method--query", () { | |
| 20933 | |
| 20934 var mock = new HttpServerMock(); | |
| 20935 api.ReportsCompatibleFieldsResourceApi res = new api.DfareportingApi(mock)
.reports.compatibleFields; | |
| 20936 var arg_request = buildReport(); | |
| 20937 var arg_profileId = "foo"; | |
| 20938 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20939 var obj = new api.Report.fromJson(json); | |
| 20940 checkReport(obj); | |
| 20941 | |
| 20942 var path = (req.url).path; | |
| 20943 var pathOffset = 0; | |
| 20944 var index; | |
| 20945 var subPart; | |
| 20946 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20947 pathOffset += 1; | |
| 20948 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 20949 pathOffset += 18; | |
| 20950 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20951 pathOffset += 13; | |
| 20952 index = path.indexOf("/reports/compatiblefields/query", pathOffset); | |
| 20953 unittest.expect(index >= 0, unittest.isTrue); | |
| 20954 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20955 pathOffset = index; | |
| 20956 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20957 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("/reports/compatiblefields/query")); | |
| 20958 pathOffset += 31; | |
| 20959 | |
| 20960 var query = (req.url).query; | |
| 20961 var queryOffset = 0; | |
| 20962 var queryMap = {}; | |
| 20963 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20964 parseBool(n) { | |
| 20965 if (n == "true") return true; | |
| 20966 if (n == "false") return false; | |
| 20967 if (n == null) return null; | |
| 20968 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20969 } | |
| 20970 if (query.length > 0) { | |
| 20971 for (var part in query.split("&")) { | |
| 20972 var keyvalue = part.split("="); | |
| 20973 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20974 } | |
| 20975 } | |
| 20976 | |
| 20977 | |
| 20978 var h = { | |
| 20979 "content-type" : "application/json; charset=utf-8", | |
| 20980 }; | |
| 20981 var resp = convert.JSON.encode(buildCompatibleFields()); | |
| 20982 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20983 }), true); | |
| 20984 res.query(arg_request, arg_profileId).then(unittest.expectAsync(((api.Comp
atibleFields response) { | |
| 20985 checkCompatibleFields(response); | |
| 20986 }))); | |
| 20987 }); | |
| 20988 | |
| 20989 }); | |
| 20990 | |
| 20991 | |
| 20992 unittest.group("resource-ReportsFilesResourceApi", () { | |
| 20993 unittest.test("method--get", () { | |
| 20994 // TODO: Implement tests for media upload; | |
| 20995 // TODO: Implement tests for media download; | |
| 20996 | |
| 20997 var mock = new HttpServerMock(); | |
| 20998 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 20999 var arg_profileId = "foo"; | |
| 21000 var arg_reportId = "foo"; | |
| 21001 var arg_fileId = "foo"; | |
| 21002 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21003 var path = (req.url).path; | |
| 21004 var pathOffset = 0; | |
| 21005 var index; | |
| 21006 var subPart; | |
| 21007 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21008 pathOffset += 1; | |
| 21009 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21010 pathOffset += 18; | |
| 21011 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21012 pathOffset += 13; | |
| 21013 index = path.indexOf("/reports/", pathOffset); | |
| 21014 unittest.expect(index >= 0, unittest.isTrue); | |
| 21015 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21016 pathOffset = index; | |
| 21017 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21018 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21019 pathOffset += 9; | |
| 21020 index = path.indexOf("/files/", pathOffset); | |
| 21021 unittest.expect(index >= 0, unittest.isTrue); | |
| 21022 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21023 pathOffset = index; | |
| 21024 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21025 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 21026 pathOffset += 7; | |
| 21027 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21028 pathOffset = path.length; | |
| 21029 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 21030 | |
| 21031 var query = (req.url).query; | |
| 21032 var queryOffset = 0; | |
| 21033 var queryMap = {}; | |
| 21034 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21035 parseBool(n) { | |
| 21036 if (n == "true") return true; | |
| 21037 if (n == "false") return false; | |
| 21038 if (n == null) return null; | |
| 21039 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21040 } | |
| 21041 if (query.length > 0) { | |
| 21042 for (var part in query.split("&")) { | |
| 21043 var keyvalue = part.split("="); | |
| 21044 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21045 } | |
| 21046 } | |
| 21047 | |
| 21048 | |
| 21049 var h = { | |
| 21050 "content-type" : "application/json; charset=utf-8", | |
| 21051 }; | |
| 21052 var resp = convert.JSON.encode(buildFile()); | |
| 21053 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21054 }), true); | |
| 21055 res.get(arg_profileId, arg_reportId, arg_fileId).then(unittest.expectAsync
(((api.File response) { | |
| 21056 checkFile(response); | |
| 21057 }))); | |
| 21058 }); | |
| 21059 | |
| 21060 unittest.test("method--list", () { | |
| 21061 | |
| 21062 var mock = new HttpServerMock(); | |
| 21063 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 21064 var arg_profileId = "foo"; | |
| 21065 var arg_reportId = "foo"; | |
| 21066 var arg_maxResults = 42; | |
| 21067 var arg_pageToken = "foo"; | |
| 21068 var arg_sortField = "foo"; | |
| 21069 var arg_sortOrder = "foo"; | |
| 21070 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21071 var path = (req.url).path; | |
| 21072 var pathOffset = 0; | |
| 21073 var index; | |
| 21074 var subPart; | |
| 21075 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21076 pathOffset += 1; | |
| 21077 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21078 pathOffset += 18; | |
| 21079 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21080 pathOffset += 13; | |
| 21081 index = path.indexOf("/reports/", pathOffset); | |
| 21082 unittest.expect(index >= 0, unittest.isTrue); | |
| 21083 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21084 pathOffset = index; | |
| 21085 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21086 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21087 pathOffset += 9; | |
| 21088 index = path.indexOf("/files", pathOffset); | |
| 21089 unittest.expect(index >= 0, unittest.isTrue); | |
| 21090 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21091 pathOffset = index; | |
| 21092 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21093 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 21094 pathOffset += 6; | |
| 21095 | |
| 21096 var query = (req.url).query; | |
| 21097 var queryOffset = 0; | |
| 21098 var queryMap = {}; | |
| 21099 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21100 parseBool(n) { | |
| 21101 if (n == "true") return true; | |
| 21102 if (n == "false") return false; | |
| 21103 if (n == null) return null; | |
| 21104 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21105 } | |
| 21106 if (query.length > 0) { | |
| 21107 for (var part in query.split("&")) { | |
| 21108 var keyvalue = part.split("="); | |
| 21109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21110 } | |
| 21111 } | |
| 21112 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21113 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21114 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21115 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21116 | |
| 21117 | |
| 21118 var h = { | |
| 21119 "content-type" : "application/json; charset=utf-8", | |
| 21120 }; | |
| 21121 var resp = convert.JSON.encode(buildFileList()); | |
| 21122 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21123 }), true); | |
| 21124 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) { | |
| 21125 checkFileList(response); | |
| 21126 }))); | |
| 21127 }); | |
| 21128 | |
| 21129 }); | |
| 21130 | |
| 21131 | |
| 21132 unittest.group("resource-SitesResourceApi", () { | |
| 21133 unittest.test("method--get", () { | |
| 21134 | |
| 21135 var mock = new HttpServerMock(); | |
| 21136 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21137 var arg_profileId = "foo"; | |
| 21138 var arg_id = "foo"; | |
| 21139 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21140 var path = (req.url).path; | |
| 21141 var pathOffset = 0; | |
| 21142 var index; | |
| 21143 var subPart; | |
| 21144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21145 pathOffset += 1; | |
| 21146 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21147 pathOffset += 18; | |
| 21148 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21149 pathOffset += 13; | |
| 21150 index = path.indexOf("/sites/", pathOffset); | |
| 21151 unittest.expect(index >= 0, unittest.isTrue); | |
| 21152 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21153 pathOffset = index; | |
| 21154 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21155 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sites/")); | |
| 21156 pathOffset += 7; | |
| 21157 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21158 pathOffset = path.length; | |
| 21159 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21160 | |
| 21161 var query = (req.url).query; | |
| 21162 var queryOffset = 0; | |
| 21163 var queryMap = {}; | |
| 21164 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21165 parseBool(n) { | |
| 21166 if (n == "true") return true; | |
| 21167 if (n == "false") return false; | |
| 21168 if (n == null) return null; | |
| 21169 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21170 } | |
| 21171 if (query.length > 0) { | |
| 21172 for (var part in query.split("&")) { | |
| 21173 var keyvalue = part.split("="); | |
| 21174 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21175 } | |
| 21176 } | |
| 21177 | |
| 21178 | |
| 21179 var h = { | |
| 21180 "content-type" : "application/json; charset=utf-8", | |
| 21181 }; | |
| 21182 var resp = convert.JSON.encode(buildSite()); | |
| 21183 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21184 }), true); | |
| 21185 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Site respon
se) { | |
| 21186 checkSite(response); | |
| 21187 }))); | |
| 21188 }); | |
| 21189 | |
| 21190 unittest.test("method--insert", () { | |
| 21191 | |
| 21192 var mock = new HttpServerMock(); | |
| 21193 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21194 var arg_request = buildSite(); | |
| 21195 var arg_profileId = "foo"; | |
| 21196 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21197 var obj = new api.Site.fromJson(json); | |
| 21198 checkSite(obj); | |
| 21199 | |
| 21200 var path = (req.url).path; | |
| 21201 var pathOffset = 0; | |
| 21202 var index; | |
| 21203 var subPart; | |
| 21204 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21205 pathOffset += 1; | |
| 21206 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21207 pathOffset += 18; | |
| 21208 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21209 pathOffset += 13; | |
| 21210 index = path.indexOf("/sites", pathOffset); | |
| 21211 unittest.expect(index >= 0, unittest.isTrue); | |
| 21212 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21213 pathOffset = index; | |
| 21214 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21215 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21216 pathOffset += 6; | |
| 21217 | |
| 21218 var query = (req.url).query; | |
| 21219 var queryOffset = 0; | |
| 21220 var queryMap = {}; | |
| 21221 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21222 parseBool(n) { | |
| 21223 if (n == "true") return true; | |
| 21224 if (n == "false") return false; | |
| 21225 if (n == null) return null; | |
| 21226 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21227 } | |
| 21228 if (query.length > 0) { | |
| 21229 for (var part in query.split("&")) { | |
| 21230 var keyvalue = part.split("="); | |
| 21231 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21232 } | |
| 21233 } | |
| 21234 | |
| 21235 | |
| 21236 var h = { | |
| 21237 "content-type" : "application/json; charset=utf-8", | |
| 21238 }; | |
| 21239 var resp = convert.JSON.encode(buildSite()); | |
| 21240 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21241 }), true); | |
| 21242 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21243 checkSite(response); | |
| 21244 }))); | |
| 21245 }); | |
| 21246 | |
| 21247 unittest.test("method--list", () { | |
| 21248 | |
| 21249 var mock = new HttpServerMock(); | |
| 21250 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21251 var arg_profileId = "foo"; | |
| 21252 var arg_acceptsInStreamVideoPlacements = true; | |
| 21253 var arg_acceptsInterstitialPlacements = true; | |
| 21254 var arg_acceptsPublisherPaidPlacements = true; | |
| 21255 var arg_adWordsSite = true; | |
| 21256 var arg_approved = true; | |
| 21257 var arg_campaignIds = buildUnnamed3297(); | |
| 21258 var arg_directorySiteIds = buildUnnamed3298(); | |
| 21259 var arg_ids = buildUnnamed3299(); | |
| 21260 var arg_maxResults = 42; | |
| 21261 var arg_pageToken = "foo"; | |
| 21262 var arg_searchString = "foo"; | |
| 21263 var arg_sortField = "foo"; | |
| 21264 var arg_sortOrder = "foo"; | |
| 21265 var arg_subaccountId = "foo"; | |
| 21266 var arg_unmappedSite = true; | |
| 21267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21268 var path = (req.url).path; | |
| 21269 var pathOffset = 0; | |
| 21270 var index; | |
| 21271 var subPart; | |
| 21272 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21273 pathOffset += 1; | |
| 21274 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21275 pathOffset += 18; | |
| 21276 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21277 pathOffset += 13; | |
| 21278 index = path.indexOf("/sites", pathOffset); | |
| 21279 unittest.expect(index >= 0, unittest.isTrue); | |
| 21280 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21281 pathOffset = index; | |
| 21282 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21283 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21284 pathOffset += 6; | |
| 21285 | |
| 21286 var query = (req.url).query; | |
| 21287 var queryOffset = 0; | |
| 21288 var queryMap = {}; | |
| 21289 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21290 parseBool(n) { | |
| 21291 if (n == "true") return true; | |
| 21292 if (n == "false") return false; | |
| 21293 if (n == null) return null; | |
| 21294 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21295 } | |
| 21296 if (query.length > 0) { | |
| 21297 for (var part in query.split("&")) { | |
| 21298 var keyvalue = part.split("="); | |
| 21299 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21300 } | |
| 21301 } | |
| 21302 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 21303 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 21304 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 21305 unittest.expect(queryMap["adWordsSite"].first, unittest.equals("$arg_adW
ordsSite")); | |
| 21306 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 21307 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 21308 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 21309 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21310 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21311 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21312 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21313 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21314 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21315 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 21316 unittest.expect(queryMap["unmappedSite"].first, unittest.equals("$arg_un
mappedSite")); | |
| 21317 | |
| 21318 | |
| 21319 var h = { | |
| 21320 "content-type" : "application/json; charset=utf-8", | |
| 21321 }; | |
| 21322 var resp = convert.JSON.encode(buildSitesListResponse()); | |
| 21323 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21324 }), true); | |
| 21325 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) { | |
| 21326 checkSitesListResponse(response); | |
| 21327 }))); | |
| 21328 }); | |
| 21329 | |
| 21330 unittest.test("method--patch", () { | |
| 21331 | |
| 21332 var mock = new HttpServerMock(); | |
| 21333 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21334 var arg_request = buildSite(); | |
| 21335 var arg_profileId = "foo"; | |
| 21336 var arg_id = "foo"; | |
| 21337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21338 var obj = new api.Site.fromJson(json); | |
| 21339 checkSite(obj); | |
| 21340 | |
| 21341 var path = (req.url).path; | |
| 21342 var pathOffset = 0; | |
| 21343 var index; | |
| 21344 var subPart; | |
| 21345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21346 pathOffset += 1; | |
| 21347 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21348 pathOffset += 18; | |
| 21349 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21350 pathOffset += 13; | |
| 21351 index = path.indexOf("/sites", pathOffset); | |
| 21352 unittest.expect(index >= 0, unittest.isTrue); | |
| 21353 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21354 pathOffset = index; | |
| 21355 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21356 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21357 pathOffset += 6; | |
| 21358 | |
| 21359 var query = (req.url).query; | |
| 21360 var queryOffset = 0; | |
| 21361 var queryMap = {}; | |
| 21362 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21363 parseBool(n) { | |
| 21364 if (n == "true") return true; | |
| 21365 if (n == "false") return false; | |
| 21366 if (n == null) return null; | |
| 21367 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21368 } | |
| 21369 if (query.length > 0) { | |
| 21370 for (var part in query.split("&")) { | |
| 21371 var keyvalue = part.split("="); | |
| 21372 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21373 } | |
| 21374 } | |
| 21375 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21376 | |
| 21377 | |
| 21378 var h = { | |
| 21379 "content-type" : "application/json; charset=utf-8", | |
| 21380 }; | |
| 21381 var resp = convert.JSON.encode(buildSite()); | |
| 21382 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21383 }), true); | |
| 21384 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Site response) { | |
| 21385 checkSite(response); | |
| 21386 }))); | |
| 21387 }); | |
| 21388 | |
| 21389 unittest.test("method--update", () { | |
| 21390 | |
| 21391 var mock = new HttpServerMock(); | |
| 21392 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21393 var arg_request = buildSite(); | |
| 21394 var arg_profileId = "foo"; | |
| 21395 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21396 var obj = new api.Site.fromJson(json); | |
| 21397 checkSite(obj); | |
| 21398 | |
| 21399 var path = (req.url).path; | |
| 21400 var pathOffset = 0; | |
| 21401 var index; | |
| 21402 var subPart; | |
| 21403 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21404 pathOffset += 1; | |
| 21405 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21406 pathOffset += 18; | |
| 21407 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21408 pathOffset += 13; | |
| 21409 index = path.indexOf("/sites", pathOffset); | |
| 21410 unittest.expect(index >= 0, unittest.isTrue); | |
| 21411 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21412 pathOffset = index; | |
| 21413 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21414 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21415 pathOffset += 6; | |
| 21416 | |
| 21417 var query = (req.url).query; | |
| 21418 var queryOffset = 0; | |
| 21419 var queryMap = {}; | |
| 21420 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21421 parseBool(n) { | |
| 21422 if (n == "true") return true; | |
| 21423 if (n == "false") return false; | |
| 21424 if (n == null) return null; | |
| 21425 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21426 } | |
| 21427 if (query.length > 0) { | |
| 21428 for (var part in query.split("&")) { | |
| 21429 var keyvalue = part.split("="); | |
| 21430 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21431 } | |
| 21432 } | |
| 21433 | |
| 21434 | |
| 21435 var h = { | |
| 21436 "content-type" : "application/json; charset=utf-8", | |
| 21437 }; | |
| 21438 var resp = convert.JSON.encode(buildSite()); | |
| 21439 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21440 }), true); | |
| 21441 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21442 checkSite(response); | |
| 21443 }))); | |
| 21444 }); | |
| 21445 | |
| 21446 }); | |
| 21447 | |
| 21448 | |
| 21449 unittest.group("resource-SizesResourceApi", () { | |
| 21450 unittest.test("method--get", () { | |
| 21451 | |
| 21452 var mock = new HttpServerMock(); | |
| 21453 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21454 var arg_profileId = "foo"; | |
| 21455 var arg_id = "foo"; | |
| 21456 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21457 var path = (req.url).path; | |
| 21458 var pathOffset = 0; | |
| 21459 var index; | |
| 21460 var subPart; | |
| 21461 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21462 pathOffset += 1; | |
| 21463 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21464 pathOffset += 18; | |
| 21465 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21466 pathOffset += 13; | |
| 21467 index = path.indexOf("/sizes/", pathOffset); | |
| 21468 unittest.expect(index >= 0, unittest.isTrue); | |
| 21469 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21470 pathOffset = index; | |
| 21471 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21472 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sizes/")); | |
| 21473 pathOffset += 7; | |
| 21474 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21475 pathOffset = path.length; | |
| 21476 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21477 | |
| 21478 var query = (req.url).query; | |
| 21479 var queryOffset = 0; | |
| 21480 var queryMap = {}; | |
| 21481 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21482 parseBool(n) { | |
| 21483 if (n == "true") return true; | |
| 21484 if (n == "false") return false; | |
| 21485 if (n == null) return null; | |
| 21486 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21487 } | |
| 21488 if (query.length > 0) { | |
| 21489 for (var part in query.split("&")) { | |
| 21490 var keyvalue = part.split("="); | |
| 21491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21492 } | |
| 21493 } | |
| 21494 | |
| 21495 | |
| 21496 var h = { | |
| 21497 "content-type" : "application/json; charset=utf-8", | |
| 21498 }; | |
| 21499 var resp = convert.JSON.encode(buildSize()); | |
| 21500 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21501 }), true); | |
| 21502 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Size respon
se) { | |
| 21503 checkSize(response); | |
| 21504 }))); | |
| 21505 }); | |
| 21506 | |
| 21507 unittest.test("method--insert", () { | |
| 21508 | |
| 21509 var mock = new HttpServerMock(); | |
| 21510 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21511 var arg_request = buildSize(); | |
| 21512 var arg_profileId = "foo"; | |
| 21513 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21514 var obj = new api.Size.fromJson(json); | |
| 21515 checkSize(obj); | |
| 21516 | |
| 21517 var path = (req.url).path; | |
| 21518 var pathOffset = 0; | |
| 21519 var index; | |
| 21520 var subPart; | |
| 21521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21522 pathOffset += 1; | |
| 21523 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21524 pathOffset += 18; | |
| 21525 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21526 pathOffset += 13; | |
| 21527 index = path.indexOf("/sizes", pathOffset); | |
| 21528 unittest.expect(index >= 0, unittest.isTrue); | |
| 21529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21530 pathOffset = index; | |
| 21531 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21532 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21533 pathOffset += 6; | |
| 21534 | |
| 21535 var query = (req.url).query; | |
| 21536 var queryOffset = 0; | |
| 21537 var queryMap = {}; | |
| 21538 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21539 parseBool(n) { | |
| 21540 if (n == "true") return true; | |
| 21541 if (n == "false") return false; | |
| 21542 if (n == null) return null; | |
| 21543 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21544 } | |
| 21545 if (query.length > 0) { | |
| 21546 for (var part in query.split("&")) { | |
| 21547 var keyvalue = part.split("="); | |
| 21548 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21549 } | |
| 21550 } | |
| 21551 | |
| 21552 | |
| 21553 var h = { | |
| 21554 "content-type" : "application/json; charset=utf-8", | |
| 21555 }; | |
| 21556 var resp = convert.JSON.encode(buildSize()); | |
| 21557 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21558 }), true); | |
| 21559 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Siz
e response) { | |
| 21560 checkSize(response); | |
| 21561 }))); | |
| 21562 }); | |
| 21563 | |
| 21564 unittest.test("method--list", () { | |
| 21565 | |
| 21566 var mock = new HttpServerMock(); | |
| 21567 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21568 var arg_profileId = "foo"; | |
| 21569 var arg_height = 42; | |
| 21570 var arg_iabStandard = true; | |
| 21571 var arg_ids = buildUnnamed3300(); | |
| 21572 var arg_width = 42; | |
| 21573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21574 var path = (req.url).path; | |
| 21575 var pathOffset = 0; | |
| 21576 var index; | |
| 21577 var subPart; | |
| 21578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21579 pathOffset += 1; | |
| 21580 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21581 pathOffset += 18; | |
| 21582 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21583 pathOffset += 13; | |
| 21584 index = path.indexOf("/sizes", pathOffset); | |
| 21585 unittest.expect(index >= 0, unittest.isTrue); | |
| 21586 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21587 pathOffset = index; | |
| 21588 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21589 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21590 pathOffset += 6; | |
| 21591 | |
| 21592 var query = (req.url).query; | |
| 21593 var queryOffset = 0; | |
| 21594 var queryMap = {}; | |
| 21595 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21596 parseBool(n) { | |
| 21597 if (n == "true") return true; | |
| 21598 if (n == "false") return false; | |
| 21599 if (n == null) return null; | |
| 21600 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21601 } | |
| 21602 if (query.length > 0) { | |
| 21603 for (var part in query.split("&")) { | |
| 21604 var keyvalue = part.split("="); | |
| 21605 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21606 } | |
| 21607 } | |
| 21608 unittest.expect(core.int.parse(queryMap["height"].first), unittest.equal
s(arg_height)); | |
| 21609 unittest.expect(queryMap["iabStandard"].first, unittest.equals("$arg_iab
Standard")); | |
| 21610 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21611 unittest.expect(core.int.parse(queryMap["width"].first), unittest.equals
(arg_width)); | |
| 21612 | |
| 21613 | |
| 21614 var h = { | |
| 21615 "content-type" : "application/json; charset=utf-8", | |
| 21616 }; | |
| 21617 var resp = convert.JSON.encode(buildSizesListResponse()); | |
| 21618 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21619 }), true); | |
| 21620 res.list(arg_profileId, height: arg_height, iabStandard: arg_iabStandard,
ids: arg_ids, width: arg_width).then(unittest.expectAsync(((api.SizesListRespons
e response) { | |
| 21621 checkSizesListResponse(response); | |
| 21622 }))); | |
| 21623 }); | |
| 21624 | |
| 21625 }); | |
| 21626 | |
| 21627 | |
| 21628 unittest.group("resource-SubaccountsResourceApi", () { | |
| 21629 unittest.test("method--get", () { | |
| 21630 | |
| 21631 var mock = new HttpServerMock(); | |
| 21632 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21633 var arg_profileId = "foo"; | |
| 21634 var arg_id = "foo"; | |
| 21635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21636 var path = (req.url).path; | |
| 21637 var pathOffset = 0; | |
| 21638 var index; | |
| 21639 var subPart; | |
| 21640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21641 pathOffset += 1; | |
| 21642 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21643 pathOffset += 18; | |
| 21644 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21645 pathOffset += 13; | |
| 21646 index = path.indexOf("/subaccounts/", pathOffset); | |
| 21647 unittest.expect(index >= 0, unittest.isTrue); | |
| 21648 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21649 pathOffset = index; | |
| 21650 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21651 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/subaccounts/")); | |
| 21652 pathOffset += 13; | |
| 21653 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21654 pathOffset = path.length; | |
| 21655 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21656 | |
| 21657 var query = (req.url).query; | |
| 21658 var queryOffset = 0; | |
| 21659 var queryMap = {}; | |
| 21660 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21661 parseBool(n) { | |
| 21662 if (n == "true") return true; | |
| 21663 if (n == "false") return false; | |
| 21664 if (n == null) return null; | |
| 21665 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21666 } | |
| 21667 if (query.length > 0) { | |
| 21668 for (var part in query.split("&")) { | |
| 21669 var keyvalue = part.split("="); | |
| 21670 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21671 } | |
| 21672 } | |
| 21673 | |
| 21674 | |
| 21675 var h = { | |
| 21676 "content-type" : "application/json; charset=utf-8", | |
| 21677 }; | |
| 21678 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21679 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21680 }), true); | |
| 21681 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Subaccount
response) { | |
| 21682 checkSubaccount(response); | |
| 21683 }))); | |
| 21684 }); | |
| 21685 | |
| 21686 unittest.test("method--insert", () { | |
| 21687 | |
| 21688 var mock = new HttpServerMock(); | |
| 21689 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21690 var arg_request = buildSubaccount(); | |
| 21691 var arg_profileId = "foo"; | |
| 21692 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21693 var obj = new api.Subaccount.fromJson(json); | |
| 21694 checkSubaccount(obj); | |
| 21695 | |
| 21696 var path = (req.url).path; | |
| 21697 var pathOffset = 0; | |
| 21698 var index; | |
| 21699 var subPart; | |
| 21700 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21701 pathOffset += 1; | |
| 21702 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21703 pathOffset += 18; | |
| 21704 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21705 pathOffset += 13; | |
| 21706 index = path.indexOf("/subaccounts", pathOffset); | |
| 21707 unittest.expect(index >= 0, unittest.isTrue); | |
| 21708 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21709 pathOffset = index; | |
| 21710 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21711 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21712 pathOffset += 12; | |
| 21713 | |
| 21714 var query = (req.url).query; | |
| 21715 var queryOffset = 0; | |
| 21716 var queryMap = {}; | |
| 21717 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21718 parseBool(n) { | |
| 21719 if (n == "true") return true; | |
| 21720 if (n == "false") return false; | |
| 21721 if (n == null) return null; | |
| 21722 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21723 } | |
| 21724 if (query.length > 0) { | |
| 21725 for (var part in query.split("&")) { | |
| 21726 var keyvalue = part.split("="); | |
| 21727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21728 } | |
| 21729 } | |
| 21730 | |
| 21731 | |
| 21732 var h = { | |
| 21733 "content-type" : "application/json; charset=utf-8", | |
| 21734 }; | |
| 21735 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21736 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21737 }), true); | |
| 21738 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21739 checkSubaccount(response); | |
| 21740 }))); | |
| 21741 }); | |
| 21742 | |
| 21743 unittest.test("method--list", () { | |
| 21744 | |
| 21745 var mock = new HttpServerMock(); | |
| 21746 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21747 var arg_profileId = "foo"; | |
| 21748 var arg_ids = buildUnnamed3301(); | |
| 21749 var arg_maxResults = 42; | |
| 21750 var arg_pageToken = "foo"; | |
| 21751 var arg_searchString = "foo"; | |
| 21752 var arg_sortField = "foo"; | |
| 21753 var arg_sortOrder = "foo"; | |
| 21754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21755 var path = (req.url).path; | |
| 21756 var pathOffset = 0; | |
| 21757 var index; | |
| 21758 var subPart; | |
| 21759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21760 pathOffset += 1; | |
| 21761 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21762 pathOffset += 18; | |
| 21763 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21764 pathOffset += 13; | |
| 21765 index = path.indexOf("/subaccounts", pathOffset); | |
| 21766 unittest.expect(index >= 0, unittest.isTrue); | |
| 21767 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21768 pathOffset = index; | |
| 21769 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21770 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21771 pathOffset += 12; | |
| 21772 | |
| 21773 var query = (req.url).query; | |
| 21774 var queryOffset = 0; | |
| 21775 var queryMap = {}; | |
| 21776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21777 parseBool(n) { | |
| 21778 if (n == "true") return true; | |
| 21779 if (n == "false") return false; | |
| 21780 if (n == null) return null; | |
| 21781 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21782 } | |
| 21783 if (query.length > 0) { | |
| 21784 for (var part in query.split("&")) { | |
| 21785 var keyvalue = part.split("="); | |
| 21786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21787 } | |
| 21788 } | |
| 21789 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21790 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21791 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21792 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21793 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21794 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21795 | |
| 21796 | |
| 21797 var h = { | |
| 21798 "content-type" : "application/json; charset=utf-8", | |
| 21799 }; | |
| 21800 var resp = convert.JSON.encode(buildSubaccountsListResponse()); | |
| 21801 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21802 }), true); | |
| 21803 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) { | |
| 21804 checkSubaccountsListResponse(response); | |
| 21805 }))); | |
| 21806 }); | |
| 21807 | |
| 21808 unittest.test("method--patch", () { | |
| 21809 | |
| 21810 var mock = new HttpServerMock(); | |
| 21811 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21812 var arg_request = buildSubaccount(); | |
| 21813 var arg_profileId = "foo"; | |
| 21814 var arg_id = "foo"; | |
| 21815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21816 var obj = new api.Subaccount.fromJson(json); | |
| 21817 checkSubaccount(obj); | |
| 21818 | |
| 21819 var path = (req.url).path; | |
| 21820 var pathOffset = 0; | |
| 21821 var index; | |
| 21822 var subPart; | |
| 21823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21824 pathOffset += 1; | |
| 21825 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21826 pathOffset += 18; | |
| 21827 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21828 pathOffset += 13; | |
| 21829 index = path.indexOf("/subaccounts", pathOffset); | |
| 21830 unittest.expect(index >= 0, unittest.isTrue); | |
| 21831 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21832 pathOffset = index; | |
| 21833 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21834 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21835 pathOffset += 12; | |
| 21836 | |
| 21837 var query = (req.url).query; | |
| 21838 var queryOffset = 0; | |
| 21839 var queryMap = {}; | |
| 21840 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21841 parseBool(n) { | |
| 21842 if (n == "true") return true; | |
| 21843 if (n == "false") return false; | |
| 21844 if (n == null) return null; | |
| 21845 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21846 } | |
| 21847 if (query.length > 0) { | |
| 21848 for (var part in query.split("&")) { | |
| 21849 var keyvalue = part.split("="); | |
| 21850 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21851 } | |
| 21852 } | |
| 21853 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21854 | |
| 21855 | |
| 21856 var h = { | |
| 21857 "content-type" : "application/json; charset=utf-8", | |
| 21858 }; | |
| 21859 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21860 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21861 }), true); | |
| 21862 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Subaccount response) { | |
| 21863 checkSubaccount(response); | |
| 21864 }))); | |
| 21865 }); | |
| 21866 | |
| 21867 unittest.test("method--update", () { | |
| 21868 | |
| 21869 var mock = new HttpServerMock(); | |
| 21870 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21871 var arg_request = buildSubaccount(); | |
| 21872 var arg_profileId = "foo"; | |
| 21873 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21874 var obj = new api.Subaccount.fromJson(json); | |
| 21875 checkSubaccount(obj); | |
| 21876 | |
| 21877 var path = (req.url).path; | |
| 21878 var pathOffset = 0; | |
| 21879 var index; | |
| 21880 var subPart; | |
| 21881 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21882 pathOffset += 1; | |
| 21883 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21884 pathOffset += 18; | |
| 21885 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21886 pathOffset += 13; | |
| 21887 index = path.indexOf("/subaccounts", pathOffset); | |
| 21888 unittest.expect(index >= 0, unittest.isTrue); | |
| 21889 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21890 pathOffset = index; | |
| 21891 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21892 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21893 pathOffset += 12; | |
| 21894 | |
| 21895 var query = (req.url).query; | |
| 21896 var queryOffset = 0; | |
| 21897 var queryMap = {}; | |
| 21898 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21899 parseBool(n) { | |
| 21900 if (n == "true") return true; | |
| 21901 if (n == "false") return false; | |
| 21902 if (n == null) return null; | |
| 21903 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21904 } | |
| 21905 if (query.length > 0) { | |
| 21906 for (var part in query.split("&")) { | |
| 21907 var keyvalue = part.split("="); | |
| 21908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21909 } | |
| 21910 } | |
| 21911 | |
| 21912 | |
| 21913 var h = { | |
| 21914 "content-type" : "application/json; charset=utf-8", | |
| 21915 }; | |
| 21916 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21917 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21918 }), true); | |
| 21919 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21920 checkSubaccount(response); | |
| 21921 }))); | |
| 21922 }); | |
| 21923 | |
| 21924 }); | |
| 21925 | |
| 21926 | |
| 21927 unittest.group("resource-TargetableRemarketingListsResourceApi", () { | |
| 21928 unittest.test("method--get", () { | |
| 21929 | |
| 21930 var mock = new HttpServerMock(); | |
| 21931 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21932 var arg_profileId = "foo"; | |
| 21933 var arg_id = "foo"; | |
| 21934 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21935 var path = (req.url).path; | |
| 21936 var pathOffset = 0; | |
| 21937 var index; | |
| 21938 var subPart; | |
| 21939 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21940 pathOffset += 1; | |
| 21941 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 21942 pathOffset += 18; | |
| 21943 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21944 pathOffset += 13; | |
| 21945 index = path.indexOf("/targetableRemarketingLists/", pathOffset); | |
| 21946 unittest.expect(index >= 0, unittest.isTrue); | |
| 21947 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21948 pathOffset = index; | |
| 21949 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21950 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("/targetableRemarketingLists/")); | |
| 21951 pathOffset += 28; | |
| 21952 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21953 pathOffset = path.length; | |
| 21954 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21955 | |
| 21956 var query = (req.url).query; | |
| 21957 var queryOffset = 0; | |
| 21958 var queryMap = {}; | |
| 21959 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21960 parseBool(n) { | |
| 21961 if (n == "true") return true; | |
| 21962 if (n == "false") return false; | |
| 21963 if (n == null) return null; | |
| 21964 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21965 } | |
| 21966 if (query.length > 0) { | |
| 21967 for (var part in query.split("&")) { | |
| 21968 var keyvalue = part.split("="); | |
| 21969 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21970 } | |
| 21971 } | |
| 21972 | |
| 21973 | |
| 21974 var h = { | |
| 21975 "content-type" : "application/json; charset=utf-8", | |
| 21976 }; | |
| 21977 var resp = convert.JSON.encode(buildTargetableRemarketingList()); | |
| 21978 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21979 }), true); | |
| 21980 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.TargetableR
emarketingList response) { | |
| 21981 checkTargetableRemarketingList(response); | |
| 21982 }))); | |
| 21983 }); | |
| 21984 | |
| 21985 unittest.test("method--list", () { | |
| 21986 | |
| 21987 var mock = new HttpServerMock(); | |
| 21988 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21989 var arg_profileId = "foo"; | |
| 21990 var arg_advertiserId = "foo"; | |
| 21991 var arg_active = true; | |
| 21992 var arg_maxResults = 42; | |
| 21993 var arg_name = "foo"; | |
| 21994 var arg_pageToken = "foo"; | |
| 21995 var arg_sortField = "foo"; | |
| 21996 var arg_sortOrder = "foo"; | |
| 21997 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21998 var path = (req.url).path; | |
| 21999 var pathOffset = 0; | |
| 22000 var index; | |
| 22001 var subPart; | |
| 22002 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22003 pathOffset += 1; | |
| 22004 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22005 pathOffset += 18; | |
| 22006 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22007 pathOffset += 13; | |
| 22008 index = path.indexOf("/targetableRemarketingLists", pathOffset); | |
| 22009 unittest.expect(index >= 0, unittest.isTrue); | |
| 22010 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22011 pathOffset = index; | |
| 22012 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22013 unittest.expect(path.substring(pathOffset, pathOffset + 27), unittest.eq
uals("/targetableRemarketingLists")); | |
| 22014 pathOffset += 27; | |
| 22015 | |
| 22016 var query = (req.url).query; | |
| 22017 var queryOffset = 0; | |
| 22018 var queryMap = {}; | |
| 22019 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22020 parseBool(n) { | |
| 22021 if (n == "true") return true; | |
| 22022 if (n == "false") return false; | |
| 22023 if (n == null) return null; | |
| 22024 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22025 } | |
| 22026 if (query.length > 0) { | |
| 22027 for (var part in query.split("&")) { | |
| 22028 var keyvalue = part.split("="); | |
| 22029 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22030 } | |
| 22031 } | |
| 22032 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 22033 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 22034 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22035 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 22036 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22037 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22038 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22039 | |
| 22040 | |
| 22041 var h = { | |
| 22042 "content-type" : "application/json; charset=utf-8", | |
| 22043 }; | |
| 22044 var resp = convert.JSON.encode(buildTargetableRemarketingListsListRespon
se()); | |
| 22045 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22046 }), true); | |
| 22047 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) { | |
| 22048 checkTargetableRemarketingListsListResponse(response); | |
| 22049 }))); | |
| 22050 }); | |
| 22051 | |
| 22052 }); | |
| 22053 | |
| 22054 | |
| 22055 unittest.group("resource-UserProfilesResourceApi", () { | |
| 22056 unittest.test("method--get", () { | |
| 22057 | |
| 22058 var mock = new HttpServerMock(); | |
| 22059 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22060 var arg_profileId = "foo"; | |
| 22061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22062 var path = (req.url).path; | |
| 22063 var pathOffset = 0; | |
| 22064 var index; | |
| 22065 var subPart; | |
| 22066 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22067 pathOffset += 1; | |
| 22068 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22069 pathOffset += 18; | |
| 22070 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22071 pathOffset += 13; | |
| 22072 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22073 pathOffset = path.length; | |
| 22074 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22075 | |
| 22076 var query = (req.url).query; | |
| 22077 var queryOffset = 0; | |
| 22078 var queryMap = {}; | |
| 22079 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22080 parseBool(n) { | |
| 22081 if (n == "true") return true; | |
| 22082 if (n == "false") return false; | |
| 22083 if (n == null) return null; | |
| 22084 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22085 } | |
| 22086 if (query.length > 0) { | |
| 22087 for (var part in query.split("&")) { | |
| 22088 var keyvalue = part.split("="); | |
| 22089 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22090 } | |
| 22091 } | |
| 22092 | |
| 22093 | |
| 22094 var h = { | |
| 22095 "content-type" : "application/json; charset=utf-8", | |
| 22096 }; | |
| 22097 var resp = convert.JSON.encode(buildUserProfile()); | |
| 22098 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22099 }), true); | |
| 22100 res.get(arg_profileId).then(unittest.expectAsync(((api.UserProfile respons
e) { | |
| 22101 checkUserProfile(response); | |
| 22102 }))); | |
| 22103 }); | |
| 22104 | |
| 22105 unittest.test("method--list", () { | |
| 22106 | |
| 22107 var mock = new HttpServerMock(); | |
| 22108 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22109 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22110 var path = (req.url).path; | |
| 22111 var pathOffset = 0; | |
| 22112 var index; | |
| 22113 var subPart; | |
| 22114 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22115 pathOffset += 1; | |
| 22116 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22117 pathOffset += 18; | |
| 22118 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("userprofiles")); | |
| 22119 pathOffset += 12; | |
| 22120 | |
| 22121 var query = (req.url).query; | |
| 22122 var queryOffset = 0; | |
| 22123 var queryMap = {}; | |
| 22124 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22125 parseBool(n) { | |
| 22126 if (n == "true") return true; | |
| 22127 if (n == "false") return false; | |
| 22128 if (n == null) return null; | |
| 22129 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22130 } | |
| 22131 if (query.length > 0) { | |
| 22132 for (var part in query.split("&")) { | |
| 22133 var keyvalue = part.split("="); | |
| 22134 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22135 } | |
| 22136 } | |
| 22137 | |
| 22138 | |
| 22139 var h = { | |
| 22140 "content-type" : "application/json; charset=utf-8", | |
| 22141 }; | |
| 22142 var resp = convert.JSON.encode(buildUserProfileList()); | |
| 22143 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22144 }), true); | |
| 22145 res.list().then(unittest.expectAsync(((api.UserProfileList response) { | |
| 22146 checkUserProfileList(response); | |
| 22147 }))); | |
| 22148 }); | |
| 22149 | |
| 22150 }); | |
| 22151 | |
| 22152 | |
| 22153 unittest.group("resource-UserRolePermissionGroupsResourceApi", () { | |
| 22154 unittest.test("method--get", () { | |
| 22155 | |
| 22156 var mock = new HttpServerMock(); | |
| 22157 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22158 var arg_profileId = "foo"; | |
| 22159 var arg_id = "foo"; | |
| 22160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22161 var path = (req.url).path; | |
| 22162 var pathOffset = 0; | |
| 22163 var index; | |
| 22164 var subPart; | |
| 22165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22166 pathOffset += 1; | |
| 22167 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22168 pathOffset += 18; | |
| 22169 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22170 pathOffset += 13; | |
| 22171 index = path.indexOf("/userRolePermissionGroups/", pathOffset); | |
| 22172 unittest.expect(index >= 0, unittest.isTrue); | |
| 22173 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22174 pathOffset = index; | |
| 22175 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22176 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/userRolePermissionGroups/")); | |
| 22177 pathOffset += 26; | |
| 22178 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22179 pathOffset = path.length; | |
| 22180 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22181 | |
| 22182 var query = (req.url).query; | |
| 22183 var queryOffset = 0; | |
| 22184 var queryMap = {}; | |
| 22185 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22186 parseBool(n) { | |
| 22187 if (n == "true") return true; | |
| 22188 if (n == "false") return false; | |
| 22189 if (n == null) return null; | |
| 22190 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22191 } | |
| 22192 if (query.length > 0) { | |
| 22193 for (var part in query.split("&")) { | |
| 22194 var keyvalue = part.split("="); | |
| 22195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22196 } | |
| 22197 } | |
| 22198 | |
| 22199 | |
| 22200 var h = { | |
| 22201 "content-type" : "application/json; charset=utf-8", | |
| 22202 }; | |
| 22203 var resp = convert.JSON.encode(buildUserRolePermissionGroup()); | |
| 22204 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22205 }), true); | |
| 22206 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
missionGroup response) { | |
| 22207 checkUserRolePermissionGroup(response); | |
| 22208 }))); | |
| 22209 }); | |
| 22210 | |
| 22211 unittest.test("method--list", () { | |
| 22212 | |
| 22213 var mock = new HttpServerMock(); | |
| 22214 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22215 var arg_profileId = "foo"; | |
| 22216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22217 var path = (req.url).path; | |
| 22218 var pathOffset = 0; | |
| 22219 var index; | |
| 22220 var subPart; | |
| 22221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22222 pathOffset += 1; | |
| 22223 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22224 pathOffset += 18; | |
| 22225 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22226 pathOffset += 13; | |
| 22227 index = path.indexOf("/userRolePermissionGroups", pathOffset); | |
| 22228 unittest.expect(index >= 0, unittest.isTrue); | |
| 22229 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22230 pathOffset = index; | |
| 22231 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22232 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/userRolePermissionGroups")); | |
| 22233 pathOffset += 25; | |
| 22234 | |
| 22235 var query = (req.url).query; | |
| 22236 var queryOffset = 0; | |
| 22237 var queryMap = {}; | |
| 22238 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22239 parseBool(n) { | |
| 22240 if (n == "true") return true; | |
| 22241 if (n == "false") return false; | |
| 22242 if (n == null) return null; | |
| 22243 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22244 } | |
| 22245 if (query.length > 0) { | |
| 22246 for (var part in query.split("&")) { | |
| 22247 var keyvalue = part.split("="); | |
| 22248 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22249 } | |
| 22250 } | |
| 22251 | |
| 22252 | |
| 22253 var h = { | |
| 22254 "content-type" : "application/json; charset=utf-8", | |
| 22255 }; | |
| 22256 var resp = convert.JSON.encode(buildUserRolePermissionGroupsListResponse
()); | |
| 22257 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22258 }), true); | |
| 22259 res.list(arg_profileId).then(unittest.expectAsync(((api.UserRolePermission
GroupsListResponse response) { | |
| 22260 checkUserRolePermissionGroupsListResponse(response); | |
| 22261 }))); | |
| 22262 }); | |
| 22263 | |
| 22264 }); | |
| 22265 | |
| 22266 | |
| 22267 unittest.group("resource-UserRolePermissionsResourceApi", () { | |
| 22268 unittest.test("method--get", () { | |
| 22269 | |
| 22270 var mock = new HttpServerMock(); | |
| 22271 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22272 var arg_profileId = "foo"; | |
| 22273 var arg_id = "foo"; | |
| 22274 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22275 var path = (req.url).path; | |
| 22276 var pathOffset = 0; | |
| 22277 var index; | |
| 22278 var subPart; | |
| 22279 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22280 pathOffset += 1; | |
| 22281 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22282 pathOffset += 18; | |
| 22283 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22284 pathOffset += 13; | |
| 22285 index = path.indexOf("/userRolePermissions/", pathOffset); | |
| 22286 unittest.expect(index >= 0, unittest.isTrue); | |
| 22287 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22288 pathOffset = index; | |
| 22289 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22290 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/userRolePermissions/")); | |
| 22291 pathOffset += 21; | |
| 22292 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22293 pathOffset = path.length; | |
| 22294 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22295 | |
| 22296 var query = (req.url).query; | |
| 22297 var queryOffset = 0; | |
| 22298 var queryMap = {}; | |
| 22299 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22300 parseBool(n) { | |
| 22301 if (n == "true") return true; | |
| 22302 if (n == "false") return false; | |
| 22303 if (n == null) return null; | |
| 22304 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22305 } | |
| 22306 if (query.length > 0) { | |
| 22307 for (var part in query.split("&")) { | |
| 22308 var keyvalue = part.split("="); | |
| 22309 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22310 } | |
| 22311 } | |
| 22312 | |
| 22313 | |
| 22314 var h = { | |
| 22315 "content-type" : "application/json; charset=utf-8", | |
| 22316 }; | |
| 22317 var resp = convert.JSON.encode(buildUserRolePermission()); | |
| 22318 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22319 }), true); | |
| 22320 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
mission response) { | |
| 22321 checkUserRolePermission(response); | |
| 22322 }))); | |
| 22323 }); | |
| 22324 | |
| 22325 unittest.test("method--list", () { | |
| 22326 | |
| 22327 var mock = new HttpServerMock(); | |
| 22328 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22329 var arg_profileId = "foo"; | |
| 22330 var arg_ids = buildUnnamed3302(); | |
| 22331 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22332 var path = (req.url).path; | |
| 22333 var pathOffset = 0; | |
| 22334 var index; | |
| 22335 var subPart; | |
| 22336 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22337 pathOffset += 1; | |
| 22338 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22339 pathOffset += 18; | |
| 22340 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22341 pathOffset += 13; | |
| 22342 index = path.indexOf("/userRolePermissions", pathOffset); | |
| 22343 unittest.expect(index >= 0, unittest.isTrue); | |
| 22344 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22345 pathOffset = index; | |
| 22346 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22347 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/userRolePermissions")); | |
| 22348 pathOffset += 20; | |
| 22349 | |
| 22350 var query = (req.url).query; | |
| 22351 var queryOffset = 0; | |
| 22352 var queryMap = {}; | |
| 22353 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22354 parseBool(n) { | |
| 22355 if (n == "true") return true; | |
| 22356 if (n == "false") return false; | |
| 22357 if (n == null) return null; | |
| 22358 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22359 } | |
| 22360 if (query.length > 0) { | |
| 22361 for (var part in query.split("&")) { | |
| 22362 var keyvalue = part.split("="); | |
| 22363 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22364 } | |
| 22365 } | |
| 22366 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22367 | |
| 22368 | |
| 22369 var h = { | |
| 22370 "content-type" : "application/json; charset=utf-8", | |
| 22371 }; | |
| 22372 var resp = convert.JSON.encode(buildUserRolePermissionsListResponse()); | |
| 22373 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22374 }), true); | |
| 22375 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.User
RolePermissionsListResponse response) { | |
| 22376 checkUserRolePermissionsListResponse(response); | |
| 22377 }))); | |
| 22378 }); | |
| 22379 | |
| 22380 }); | |
| 22381 | |
| 22382 | |
| 22383 unittest.group("resource-UserRolesResourceApi", () { | |
| 22384 unittest.test("method--delete", () { | |
| 22385 | |
| 22386 var mock = new HttpServerMock(); | |
| 22387 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22388 var arg_profileId = "foo"; | |
| 22389 var arg_id = "foo"; | |
| 22390 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22391 var path = (req.url).path; | |
| 22392 var pathOffset = 0; | |
| 22393 var index; | |
| 22394 var subPart; | |
| 22395 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22396 pathOffset += 1; | |
| 22397 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22398 pathOffset += 18; | |
| 22399 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22400 pathOffset += 13; | |
| 22401 index = path.indexOf("/userRoles/", pathOffset); | |
| 22402 unittest.expect(index >= 0, unittest.isTrue); | |
| 22403 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22404 pathOffset = index; | |
| 22405 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22406 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22407 pathOffset += 11; | |
| 22408 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22409 pathOffset = path.length; | |
| 22410 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22411 | |
| 22412 var query = (req.url).query; | |
| 22413 var queryOffset = 0; | |
| 22414 var queryMap = {}; | |
| 22415 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22416 parseBool(n) { | |
| 22417 if (n == "true") return true; | |
| 22418 if (n == "false") return false; | |
| 22419 if (n == null) return null; | |
| 22420 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22421 } | |
| 22422 if (query.length > 0) { | |
| 22423 for (var part in query.split("&")) { | |
| 22424 var keyvalue = part.split("="); | |
| 22425 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22426 } | |
| 22427 } | |
| 22428 | |
| 22429 | |
| 22430 var h = { | |
| 22431 "content-type" : "application/json; charset=utf-8", | |
| 22432 }; | |
| 22433 var resp = ""; | |
| 22434 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22435 }), true); | |
| 22436 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 22437 }); | |
| 22438 | |
| 22439 unittest.test("method--get", () { | |
| 22440 | |
| 22441 var mock = new HttpServerMock(); | |
| 22442 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22443 var arg_profileId = "foo"; | |
| 22444 var arg_id = "foo"; | |
| 22445 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22446 var path = (req.url).path; | |
| 22447 var pathOffset = 0; | |
| 22448 var index; | |
| 22449 var subPart; | |
| 22450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22451 pathOffset += 1; | |
| 22452 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22453 pathOffset += 18; | |
| 22454 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22455 pathOffset += 13; | |
| 22456 index = path.indexOf("/userRoles/", pathOffset); | |
| 22457 unittest.expect(index >= 0, unittest.isTrue); | |
| 22458 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22459 pathOffset = index; | |
| 22460 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22461 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22462 pathOffset += 11; | |
| 22463 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22464 pathOffset = path.length; | |
| 22465 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22466 | |
| 22467 var query = (req.url).query; | |
| 22468 var queryOffset = 0; | |
| 22469 var queryMap = {}; | |
| 22470 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22471 parseBool(n) { | |
| 22472 if (n == "true") return true; | |
| 22473 if (n == "false") return false; | |
| 22474 if (n == null) return null; | |
| 22475 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22476 } | |
| 22477 if (query.length > 0) { | |
| 22478 for (var part in query.split("&")) { | |
| 22479 var keyvalue = part.split("="); | |
| 22480 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22481 } | |
| 22482 } | |
| 22483 | |
| 22484 | |
| 22485 var h = { | |
| 22486 "content-type" : "application/json; charset=utf-8", | |
| 22487 }; | |
| 22488 var resp = convert.JSON.encode(buildUserRole()); | |
| 22489 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22490 }), true); | |
| 22491 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRole re
sponse) { | |
| 22492 checkUserRole(response); | |
| 22493 }))); | |
| 22494 }); | |
| 22495 | |
| 22496 unittest.test("method--insert", () { | |
| 22497 | |
| 22498 var mock = new HttpServerMock(); | |
| 22499 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22500 var arg_request = buildUserRole(); | |
| 22501 var arg_profileId = "foo"; | |
| 22502 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22503 var obj = new api.UserRole.fromJson(json); | |
| 22504 checkUserRole(obj); | |
| 22505 | |
| 22506 var path = (req.url).path; | |
| 22507 var pathOffset = 0; | |
| 22508 var index; | |
| 22509 var subPart; | |
| 22510 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22511 pathOffset += 1; | |
| 22512 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22513 pathOffset += 18; | |
| 22514 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22515 pathOffset += 13; | |
| 22516 index = path.indexOf("/userRoles", pathOffset); | |
| 22517 unittest.expect(index >= 0, unittest.isTrue); | |
| 22518 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22519 pathOffset = index; | |
| 22520 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22521 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22522 pathOffset += 10; | |
| 22523 | |
| 22524 var query = (req.url).query; | |
| 22525 var queryOffset = 0; | |
| 22526 var queryMap = {}; | |
| 22527 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22528 parseBool(n) { | |
| 22529 if (n == "true") return true; | |
| 22530 if (n == "false") return false; | |
| 22531 if (n == null) return null; | |
| 22532 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22533 } | |
| 22534 if (query.length > 0) { | |
| 22535 for (var part in query.split("&")) { | |
| 22536 var keyvalue = part.split("="); | |
| 22537 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22538 } | |
| 22539 } | |
| 22540 | |
| 22541 | |
| 22542 var h = { | |
| 22543 "content-type" : "application/json; charset=utf-8", | |
| 22544 }; | |
| 22545 var resp = convert.JSON.encode(buildUserRole()); | |
| 22546 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22547 }), true); | |
| 22548 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22549 checkUserRole(response); | |
| 22550 }))); | |
| 22551 }); | |
| 22552 | |
| 22553 unittest.test("method--list", () { | |
| 22554 | |
| 22555 var mock = new HttpServerMock(); | |
| 22556 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22557 var arg_profileId = "foo"; | |
| 22558 var arg_accountUserRoleOnly = true; | |
| 22559 var arg_ids = buildUnnamed3303(); | |
| 22560 var arg_maxResults = 42; | |
| 22561 var arg_pageToken = "foo"; | |
| 22562 var arg_searchString = "foo"; | |
| 22563 var arg_sortField = "foo"; | |
| 22564 var arg_sortOrder = "foo"; | |
| 22565 var arg_subaccountId = "foo"; | |
| 22566 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22567 var path = (req.url).path; | |
| 22568 var pathOffset = 0; | |
| 22569 var index; | |
| 22570 var subPart; | |
| 22571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22572 pathOffset += 1; | |
| 22573 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22574 pathOffset += 18; | |
| 22575 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22576 pathOffset += 13; | |
| 22577 index = path.indexOf("/userRoles", pathOffset); | |
| 22578 unittest.expect(index >= 0, unittest.isTrue); | |
| 22579 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22580 pathOffset = index; | |
| 22581 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22582 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22583 pathOffset += 10; | |
| 22584 | |
| 22585 var query = (req.url).query; | |
| 22586 var queryOffset = 0; | |
| 22587 var queryMap = {}; | |
| 22588 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22589 parseBool(n) { | |
| 22590 if (n == "true") return true; | |
| 22591 if (n == "false") return false; | |
| 22592 if (n == null) return null; | |
| 22593 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22594 } | |
| 22595 if (query.length > 0) { | |
| 22596 for (var part in query.split("&")) { | |
| 22597 var keyvalue = part.split("="); | |
| 22598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22599 } | |
| 22600 } | |
| 22601 unittest.expect(queryMap["accountUserRoleOnly"].first, unittest.equals("
$arg_accountUserRoleOnly")); | |
| 22602 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22603 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22604 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22605 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 22606 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22607 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22608 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 22609 | |
| 22610 | |
| 22611 var h = { | |
| 22612 "content-type" : "application/json; charset=utf-8", | |
| 22613 }; | |
| 22614 var resp = convert.JSON.encode(buildUserRolesListResponse()); | |
| 22615 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22616 }), true); | |
| 22617 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) { | |
| 22618 checkUserRolesListResponse(response); | |
| 22619 }))); | |
| 22620 }); | |
| 22621 | |
| 22622 unittest.test("method--patch", () { | |
| 22623 | |
| 22624 var mock = new HttpServerMock(); | |
| 22625 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22626 var arg_request = buildUserRole(); | |
| 22627 var arg_profileId = "foo"; | |
| 22628 var arg_id = "foo"; | |
| 22629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22630 var obj = new api.UserRole.fromJson(json); | |
| 22631 checkUserRole(obj); | |
| 22632 | |
| 22633 var path = (req.url).path; | |
| 22634 var pathOffset = 0; | |
| 22635 var index; | |
| 22636 var subPart; | |
| 22637 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22638 pathOffset += 1; | |
| 22639 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22640 pathOffset += 18; | |
| 22641 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22642 pathOffset += 13; | |
| 22643 index = path.indexOf("/userRoles", pathOffset); | |
| 22644 unittest.expect(index >= 0, unittest.isTrue); | |
| 22645 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22646 pathOffset = index; | |
| 22647 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22648 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22649 pathOffset += 10; | |
| 22650 | |
| 22651 var query = (req.url).query; | |
| 22652 var queryOffset = 0; | |
| 22653 var queryMap = {}; | |
| 22654 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22655 parseBool(n) { | |
| 22656 if (n == "true") return true; | |
| 22657 if (n == "false") return false; | |
| 22658 if (n == null) return null; | |
| 22659 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22660 } | |
| 22661 if (query.length > 0) { | |
| 22662 for (var part in query.split("&")) { | |
| 22663 var keyvalue = part.split("="); | |
| 22664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22665 } | |
| 22666 } | |
| 22667 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 22668 | |
| 22669 | |
| 22670 var h = { | |
| 22671 "content-type" : "application/json; charset=utf-8", | |
| 22672 }; | |
| 22673 var resp = convert.JSON.encode(buildUserRole()); | |
| 22674 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22675 }), true); | |
| 22676 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.UserRole response) { | |
| 22677 checkUserRole(response); | |
| 22678 }))); | |
| 22679 }); | |
| 22680 | |
| 22681 unittest.test("method--update", () { | |
| 22682 | |
| 22683 var mock = new HttpServerMock(); | |
| 22684 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22685 var arg_request = buildUserRole(); | |
| 22686 var arg_profileId = "foo"; | |
| 22687 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22688 var obj = new api.UserRole.fromJson(json); | |
| 22689 checkUserRole(obj); | |
| 22690 | |
| 22691 var path = (req.url).path; | |
| 22692 var pathOffset = 0; | |
| 22693 var index; | |
| 22694 var subPart; | |
| 22695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22696 pathOffset += 1; | |
| 22697 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.2/")); | |
| 22698 pathOffset += 18; | |
| 22699 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22700 pathOffset += 13; | |
| 22701 index = path.indexOf("/userRoles", pathOffset); | |
| 22702 unittest.expect(index >= 0, unittest.isTrue); | |
| 22703 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22704 pathOffset = index; | |
| 22705 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22706 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22707 pathOffset += 10; | |
| 22708 | |
| 22709 var query = (req.url).query; | |
| 22710 var queryOffset = 0; | |
| 22711 var queryMap = {}; | |
| 22712 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22713 parseBool(n) { | |
| 22714 if (n == "true") return true; | |
| 22715 if (n == "false") return false; | |
| 22716 if (n == null) return null; | |
| 22717 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22718 } | |
| 22719 if (query.length > 0) { | |
| 22720 for (var part in query.split("&")) { | |
| 22721 var keyvalue = part.split("="); | |
| 22722 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22723 } | |
| 22724 } | |
| 22725 | |
| 22726 | |
| 22727 var h = { | |
| 22728 "content-type" : "application/json; charset=utf-8", | |
| 22729 }; | |
| 22730 var resp = convert.JSON.encode(buildUserRole()); | |
| 22731 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22732 }), true); | |
| 22733 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22734 checkUserRole(response); | |
| 22735 }))); | |
| 22736 }); | |
| 22737 | |
| 22738 }); | |
| 22739 | |
| 22740 | |
| 22741 } | |
| 22742 | |
| OLD | NEW |