| OLD | NEW |
| (Empty) |
| 1 library googleapis.dfareporting.v2_3.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_3.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 buildUnnamed1889() { | |
| 55 var o = new core.List<core.String>(); | |
| 56 o.add("foo"); | |
| 57 o.add("foo"); | |
| 58 return o; | |
| 59 } | |
| 60 | |
| 61 checkUnnamed1889(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 buildUnnamed1890() { | |
| 68 var o = new core.List<core.String>(); | |
| 69 o.add("foo"); | |
| 70 o.add("foo"); | |
| 71 return o; | |
| 72 } | |
| 73 | |
| 74 checkUnnamed1890(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 = buildUnnamed1889(); | |
| 86 o.accountProfile = "foo"; | |
| 87 o.active = true; | |
| 88 o.activeAdsLimitTier = "foo"; | |
| 89 o.activeViewOptOut = true; | |
| 90 o.availablePermissionIds = buildUnnamed1890(); | |
| 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 checkUnnamed1889(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 checkUnnamed1890(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 buildUnnamed1891() { | |
| 163 var o = new core.List<core.String>(); | |
| 164 o.add("foo"); | |
| 165 o.add("foo"); | |
| 166 return o; | |
| 167 } | |
| 168 | |
| 169 checkUnnamed1891(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 = buildUnnamed1891(); | |
| 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 checkUnnamed1891(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 buildUnnamed1892() { | |
| 228 var o = new core.List<api.AccountPermissionGroup>(); | |
| 229 o.add(buildAccountPermissionGroup()); | |
| 230 o.add(buildAccountPermissionGroup()); | |
| 231 return o; | |
| 232 } | |
| 233 | |
| 234 checkUnnamed1892(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 = buildUnnamed1892(); | |
| 246 o.kind = "foo"; | |
| 247 } | |
| 248 buildCounterAccountPermissionGroupsListResponse--; | |
| 249 return o; | |
| 250 } | |
| 251 | |
| 252 checkAccountPermissionGroupsListResponse(api.AccountPermissionGroupsListResponse
o) { | |
| 253 buildCounterAccountPermissionGroupsListResponse++; | |
| 254 if (buildCounterAccountPermissionGroupsListResponse < 3) { | |
| 255 checkUnnamed1892(o.accountPermissionGroups); | |
| 256 unittest.expect(o.kind, unittest.equals('foo')); | |
| 257 } | |
| 258 buildCounterAccountPermissionGroupsListResponse--; | |
| 259 } | |
| 260 | |
| 261 buildUnnamed1893() { | |
| 262 var o = new core.List<api.AccountPermission>(); | |
| 263 o.add(buildAccountPermission()); | |
| 264 o.add(buildAccountPermission()); | |
| 265 return o; | |
| 266 } | |
| 267 | |
| 268 checkUnnamed1893(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 = buildUnnamed1893(); | |
| 280 o.kind = "foo"; | |
| 281 } | |
| 282 buildCounterAccountPermissionsListResponse--; | |
| 283 return o; | |
| 284 } | |
| 285 | |
| 286 checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { | |
| 287 buildCounterAccountPermissionsListResponse++; | |
| 288 if (buildCounterAccountPermissionsListResponse < 3) { | |
| 289 checkUnnamed1893(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 buildUnnamed1894() { | |
| 345 var o = new core.List<api.AccountUserProfile>(); | |
| 346 o.add(buildAccountUserProfile()); | |
| 347 o.add(buildAccountUserProfile()); | |
| 348 return o; | |
| 349 } | |
| 350 | |
| 351 checkUnnamed1894(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 = buildUnnamed1894(); | |
| 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 checkUnnamed1894(o.accountUserProfiles); | |
| 374 unittest.expect(o.kind, unittest.equals('foo')); | |
| 375 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 376 } | |
| 377 buildCounterAccountUserProfilesListResponse--; | |
| 378 } | |
| 379 | |
| 380 buildUnnamed1895() { | |
| 381 var o = new core.List<api.Account>(); | |
| 382 o.add(buildAccount()); | |
| 383 o.add(buildAccount()); | |
| 384 return o; | |
| 385 } | |
| 386 | |
| 387 checkUnnamed1895(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 = buildUnnamed1895(); | |
| 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 checkUnnamed1895(o.accounts); | |
| 410 unittest.expect(o.kind, unittest.equals('foo')); | |
| 411 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 412 } | |
| 413 buildCounterAccountsListResponse--; | |
| 414 } | |
| 415 | |
| 416 buildUnnamed1896() { | |
| 417 var o = new core.List<api.DimensionValue>(); | |
| 418 o.add(buildDimensionValue()); | |
| 419 o.add(buildDimensionValue()); | |
| 420 return o; | |
| 421 } | |
| 422 | |
| 423 checkUnnamed1896(core.List<api.DimensionValue> o) { | |
| 424 unittest.expect(o, unittest.hasLength(2)); | |
| 425 checkDimensionValue(o[0]); | |
| 426 checkDimensionValue(o[1]); | |
| 427 } | |
| 428 | |
| 429 buildUnnamed1897() { | |
| 430 var o = new core.List<core.String>(); | |
| 431 o.add("foo"); | |
| 432 o.add("foo"); | |
| 433 return o; | |
| 434 } | |
| 435 | |
| 436 checkUnnamed1897(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 = buildUnnamed1896(); | |
| 448 o.kind = "foo"; | |
| 449 o.metricNames = buildUnnamed1897(); | |
| 450 } | |
| 451 buildCounterActivities--; | |
| 452 return o; | |
| 453 } | |
| 454 | |
| 455 checkActivities(api.Activities o) { | |
| 456 buildCounterActivities++; | |
| 457 if (buildCounterActivities < 3) { | |
| 458 checkUnnamed1896(o.filters); | |
| 459 unittest.expect(o.kind, unittest.equals('foo')); | |
| 460 checkUnnamed1897(o.metricNames); | |
| 461 } | |
| 462 buildCounterActivities--; | |
| 463 } | |
| 464 | |
| 465 buildUnnamed1898() { | |
| 466 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 467 o.add(buildCreativeGroupAssignment()); | |
| 468 o.add(buildCreativeGroupAssignment()); | |
| 469 return o; | |
| 470 } | |
| 471 | |
| 472 checkUnnamed1898(core.List<api.CreativeGroupAssignment> o) { | |
| 473 unittest.expect(o, unittest.hasLength(2)); | |
| 474 checkCreativeGroupAssignment(o[0]); | |
| 475 checkCreativeGroupAssignment(o[1]); | |
| 476 } | |
| 477 | |
| 478 buildUnnamed1899() { | |
| 479 var o = new core.List<api.EventTagOverride>(); | |
| 480 o.add(buildEventTagOverride()); | |
| 481 o.add(buildEventTagOverride()); | |
| 482 return o; | |
| 483 } | |
| 484 | |
| 485 checkUnnamed1899(core.List<api.EventTagOverride> o) { | |
| 486 unittest.expect(o, unittest.hasLength(2)); | |
| 487 checkEventTagOverride(o[0]); | |
| 488 checkEventTagOverride(o[1]); | |
| 489 } | |
| 490 | |
| 491 buildUnnamed1900() { | |
| 492 var o = new core.List<api.PlacementAssignment>(); | |
| 493 o.add(buildPlacementAssignment()); | |
| 494 o.add(buildPlacementAssignment()); | |
| 495 return o; | |
| 496 } | |
| 497 | |
| 498 checkUnnamed1900(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 = buildUnnamed1898(); | |
| 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 = buildUnnamed1899(); | |
| 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 = buildUnnamed1900(); | |
| 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 checkUnnamed1898(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 checkUnnamed1899(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 checkUnnamed1900(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 buildUnnamed1901() { | |
| 629 var o = new core.List<api.Ad>(); | |
| 630 o.add(buildAd()); | |
| 631 o.add(buildAd()); | |
| 632 return o; | |
| 633 } | |
| 634 | |
| 635 checkUnnamed1901(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 = buildUnnamed1901(); | |
| 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 checkUnnamed1901(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 buildUnnamed1902() { | |
| 737 var o = new core.List<api.AdvertiserGroup>(); | |
| 738 o.add(buildAdvertiserGroup()); | |
| 739 o.add(buildAdvertiserGroup()); | |
| 740 return o; | |
| 741 } | |
| 742 | |
| 743 checkUnnamed1902(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 = buildUnnamed1902(); | |
| 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 checkUnnamed1902(o.advertiserGroups); | |
| 766 unittest.expect(o.kind, unittest.equals('foo')); | |
| 767 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 768 } | |
| 769 buildCounterAdvertiserGroupsListResponse--; | |
| 770 } | |
| 771 | |
| 772 buildUnnamed1903() { | |
| 773 var o = new core.List<api.Advertiser>(); | |
| 774 o.add(buildAdvertiser()); | |
| 775 o.add(buildAdvertiser()); | |
| 776 return o; | |
| 777 } | |
| 778 | |
| 779 checkUnnamed1903(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 = buildUnnamed1903(); | |
| 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 checkUnnamed1903(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 buildUnnamed1904() { | |
| 832 var o = new core.List<api.AudienceSegment>(); | |
| 833 o.add(buildAudienceSegment()); | |
| 834 o.add(buildAudienceSegment()); | |
| 835 return o; | |
| 836 } | |
| 837 | |
| 838 checkUnnamed1904(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 = buildUnnamed1904(); | |
| 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 checkUnnamed1904(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 buildUnnamed1905() { | |
| 897 var o = new core.List<api.Browser>(); | |
| 898 o.add(buildBrowser()); | |
| 899 o.add(buildBrowser()); | |
| 900 return o; | |
| 901 } | |
| 902 | |
| 903 checkUnnamed1905(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 = buildUnnamed1905(); | |
| 915 o.kind = "foo"; | |
| 916 } | |
| 917 buildCounterBrowsersListResponse--; | |
| 918 return o; | |
| 919 } | |
| 920 | |
| 921 checkBrowsersListResponse(api.BrowsersListResponse o) { | |
| 922 buildCounterBrowsersListResponse++; | |
| 923 if (buildCounterBrowsersListResponse < 3) { | |
| 924 checkUnnamed1905(o.browsers); | |
| 925 unittest.expect(o.kind, unittest.equals('foo')); | |
| 926 } | |
| 927 buildCounterBrowsersListResponse--; | |
| 928 } | |
| 929 | |
| 930 buildUnnamed1906() { | |
| 931 var o = new core.List<api.CreativeOptimizationConfiguration>(); | |
| 932 o.add(buildCreativeOptimizationConfiguration()); | |
| 933 o.add(buildCreativeOptimizationConfiguration()); | |
| 934 return o; | |
| 935 } | |
| 936 | |
| 937 checkUnnamed1906(core.List<api.CreativeOptimizationConfiguration> o) { | |
| 938 unittest.expect(o, unittest.hasLength(2)); | |
| 939 checkCreativeOptimizationConfiguration(o[0]); | |
| 940 checkCreativeOptimizationConfiguration(o[1]); | |
| 941 } | |
| 942 | |
| 943 buildUnnamed1907() { | |
| 944 var o = new core.List<api.AudienceSegmentGroup>(); | |
| 945 o.add(buildAudienceSegmentGroup()); | |
| 946 o.add(buildAudienceSegmentGroup()); | |
| 947 return o; | |
| 948 } | |
| 949 | |
| 950 checkUnnamed1907(core.List<api.AudienceSegmentGroup> o) { | |
| 951 unittest.expect(o, unittest.hasLength(2)); | |
| 952 checkAudienceSegmentGroup(o[0]); | |
| 953 checkAudienceSegmentGroup(o[1]); | |
| 954 } | |
| 955 | |
| 956 buildUnnamed1908() { | |
| 957 var o = new core.List<core.String>(); | |
| 958 o.add("foo"); | |
| 959 o.add("foo"); | |
| 960 return o; | |
| 961 } | |
| 962 | |
| 963 checkUnnamed1908(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 buildUnnamed1909() { | |
| 970 var o = new core.List<api.EventTagOverride>(); | |
| 971 o.add(buildEventTagOverride()); | |
| 972 o.add(buildEventTagOverride()); | |
| 973 return o; | |
| 974 } | |
| 975 | |
| 976 checkUnnamed1909(core.List<api.EventTagOverride> o) { | |
| 977 unittest.expect(o, unittest.hasLength(2)); | |
| 978 checkEventTagOverride(o[0]); | |
| 979 checkEventTagOverride(o[1]); | |
| 980 } | |
| 981 | |
| 982 buildUnnamed1910() { | |
| 983 var o = new core.List<core.String>(); | |
| 984 o.add("foo"); | |
| 985 o.add("foo"); | |
| 986 return o; | |
| 987 } | |
| 988 | |
| 989 checkUnnamed1910(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 = buildUnnamed1906(); | |
| 1002 o.advertiserGroupId = "foo"; | |
| 1003 o.advertiserId = "foo"; | |
| 1004 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 1005 o.archived = true; | |
| 1006 o.audienceSegmentGroups = buildUnnamed1907(); | |
| 1007 o.billingInvoiceCode = "foo"; | |
| 1008 o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); | |
| 1009 o.comment = "foo"; | |
| 1010 o.comscoreVceEnabled = true; | |
| 1011 o.createInfo = buildLastModifiedInfo(); | |
| 1012 o.creativeGroupIds = buildUnnamed1908(); | |
| 1013 o.creativeOptimizationConfiguration = buildCreativeOptimizationConfiguration
(); | |
| 1014 o.defaultClickThroughEventTagProperties = buildDefaultClickThroughEventTagPr
operties(); | |
| 1015 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 1016 o.eventTagOverrides = buildUnnamed1909(); | |
| 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 = buildUnnamed1910(); | |
| 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 checkUnnamed1906(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 checkUnnamed1907(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 checkUnnamed1908(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 checkUnnamed1909(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 checkUnnamed1910(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 buildUnnamed1911() { | |
| 1090 var o = new core.List<api.CampaignCreativeAssociation>(); | |
| 1091 o.add(buildCampaignCreativeAssociation()); | |
| 1092 o.add(buildCampaignCreativeAssociation()); | |
| 1093 return o; | |
| 1094 } | |
| 1095 | |
| 1096 checkUnnamed1911(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 = buildUnnamed1911(); | |
| 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 checkUnnamed1911(o.campaignCreativeAssociations); | |
| 1119 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1120 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1121 } | |
| 1122 buildCounterCampaignCreativeAssociationsListResponse--; | |
| 1123 } | |
| 1124 | |
| 1125 buildUnnamed1912() { | |
| 1126 var o = new core.List<api.Campaign>(); | |
| 1127 o.add(buildCampaign()); | |
| 1128 o.add(buildCampaign()); | |
| 1129 return o; | |
| 1130 } | |
| 1131 | |
| 1132 checkUnnamed1912(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 = buildUnnamed1912(); | |
| 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 checkUnnamed1912(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 buildUnnamed1913() { | |
| 1207 var o = new core.List<api.ChangeLog>(); | |
| 1208 o.add(buildChangeLog()); | |
| 1209 o.add(buildChangeLog()); | |
| 1210 return o; | |
| 1211 } | |
| 1212 | |
| 1213 checkUnnamed1913(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 = buildUnnamed1913(); | |
| 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 checkUnnamed1913(o.changeLogs); | |
| 1236 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1237 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1238 } | |
| 1239 buildCounterChangeLogsListResponse--; | |
| 1240 } | |
| 1241 | |
| 1242 buildUnnamed1914() { | |
| 1243 var o = new core.List<api.City>(); | |
| 1244 o.add(buildCity()); | |
| 1245 o.add(buildCity()); | |
| 1246 return o; | |
| 1247 } | |
| 1248 | |
| 1249 checkUnnamed1914(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 = buildUnnamed1914(); | |
| 1261 o.kind = "foo"; | |
| 1262 } | |
| 1263 buildCounterCitiesListResponse--; | |
| 1264 return o; | |
| 1265 } | |
| 1266 | |
| 1267 checkCitiesListResponse(api.CitiesListResponse o) { | |
| 1268 buildCounterCitiesListResponse++; | |
| 1269 if (buildCounterCitiesListResponse < 3) { | |
| 1270 checkUnnamed1914(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 buildUnnamed1915() { | |
| 1454 var o = new core.List<api.ConnectionType>(); | |
| 1455 o.add(buildConnectionType()); | |
| 1456 o.add(buildConnectionType()); | |
| 1457 return o; | |
| 1458 } | |
| 1459 | |
| 1460 checkUnnamed1915(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 = buildUnnamed1915(); | |
| 1472 o.kind = "foo"; | |
| 1473 } | |
| 1474 buildCounterConnectionTypesListResponse--; | |
| 1475 return o; | |
| 1476 } | |
| 1477 | |
| 1478 checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { | |
| 1479 buildCounterConnectionTypesListResponse++; | |
| 1480 if (buildCounterConnectionTypesListResponse < 3) { | |
| 1481 checkUnnamed1915(o.connectionTypes); | |
| 1482 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1483 } | |
| 1484 buildCounterConnectionTypesListResponse--; | |
| 1485 } | |
| 1486 | |
| 1487 buildUnnamed1916() { | |
| 1488 var o = new core.List<api.ContentCategory>(); | |
| 1489 o.add(buildContentCategory()); | |
| 1490 o.add(buildContentCategory()); | |
| 1491 return o; | |
| 1492 } | |
| 1493 | |
| 1494 checkUnnamed1916(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 = buildUnnamed1916(); | |
| 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 checkUnnamed1916(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 buildUnnamed1917() { | |
| 1549 var o = new core.List<api.Country>(); | |
| 1550 o.add(buildCountry()); | |
| 1551 o.add(buildCountry()); | |
| 1552 return o; | |
| 1553 } | |
| 1554 | |
| 1555 checkUnnamed1917(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 = buildUnnamed1917(); | |
| 1567 o.kind = "foo"; | |
| 1568 } | |
| 1569 buildCounterCountriesListResponse--; | |
| 1570 return o; | |
| 1571 } | |
| 1572 | |
| 1573 checkCountriesListResponse(api.CountriesListResponse o) { | |
| 1574 buildCounterCountriesListResponse++; | |
| 1575 if (buildCounterCountriesListResponse < 3) { | |
| 1576 checkUnnamed1917(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 buildUnnamed1918() { | |
| 1610 var o = new core.List<core.String>(); | |
| 1611 o.add("foo"); | |
| 1612 o.add("foo"); | |
| 1613 return o; | |
| 1614 } | |
| 1615 | |
| 1616 checkUnnamed1918(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 buildUnnamed1919() { | |
| 1623 var o = new core.List<core.String>(); | |
| 1624 o.add("foo"); | |
| 1625 o.add("foo"); | |
| 1626 return o; | |
| 1627 } | |
| 1628 | |
| 1629 checkUnnamed1919(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 buildUnnamed1920() { | |
| 1636 var o = new core.List<api.ClickTag>(); | |
| 1637 o.add(buildClickTag()); | |
| 1638 o.add(buildClickTag()); | |
| 1639 return o; | |
| 1640 } | |
| 1641 | |
| 1642 checkUnnamed1920(core.List<api.ClickTag> o) { | |
| 1643 unittest.expect(o, unittest.hasLength(2)); | |
| 1644 checkClickTag(o[0]); | |
| 1645 checkClickTag(o[1]); | |
| 1646 } | |
| 1647 | |
| 1648 buildUnnamed1921() { | |
| 1649 var o = new core.List<core.String>(); | |
| 1650 o.add("foo"); | |
| 1651 o.add("foo"); | |
| 1652 return o; | |
| 1653 } | |
| 1654 | |
| 1655 checkUnnamed1921(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 buildUnnamed1922() { | |
| 1662 var o = new core.List<core.String>(); | |
| 1663 o.add("foo"); | |
| 1664 o.add("foo"); | |
| 1665 return o; | |
| 1666 } | |
| 1667 | |
| 1668 checkUnnamed1922(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 buildUnnamed1923() { | |
| 1675 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1676 o.add(buildCreativeCustomEvent()); | |
| 1677 o.add(buildCreativeCustomEvent()); | |
| 1678 return o; | |
| 1679 } | |
| 1680 | |
| 1681 checkUnnamed1923(core.List<api.CreativeCustomEvent> o) { | |
| 1682 unittest.expect(o, unittest.hasLength(2)); | |
| 1683 checkCreativeCustomEvent(o[0]); | |
| 1684 checkCreativeCustomEvent(o[1]); | |
| 1685 } | |
| 1686 | |
| 1687 buildUnnamed1924() { | |
| 1688 var o = new core.List<api.CreativeAsset>(); | |
| 1689 o.add(buildCreativeAsset()); | |
| 1690 o.add(buildCreativeAsset()); | |
| 1691 return o; | |
| 1692 } | |
| 1693 | |
| 1694 checkUnnamed1924(core.List<api.CreativeAsset> o) { | |
| 1695 unittest.expect(o, unittest.hasLength(2)); | |
| 1696 checkCreativeAsset(o[0]); | |
| 1697 checkCreativeAsset(o[1]); | |
| 1698 } | |
| 1699 | |
| 1700 buildUnnamed1925() { | |
| 1701 var o = new core.List<api.CreativeFieldAssignment>(); | |
| 1702 o.add(buildCreativeFieldAssignment()); | |
| 1703 o.add(buildCreativeFieldAssignment()); | |
| 1704 return o; | |
| 1705 } | |
| 1706 | |
| 1707 checkUnnamed1925(core.List<api.CreativeFieldAssignment> o) { | |
| 1708 unittest.expect(o, unittest.hasLength(2)); | |
| 1709 checkCreativeFieldAssignment(o[0]); | |
| 1710 checkCreativeFieldAssignment(o[1]); | |
| 1711 } | |
| 1712 | |
| 1713 buildUnnamed1926() { | |
| 1714 var o = new core.List<core.String>(); | |
| 1715 o.add("foo"); | |
| 1716 o.add("foo"); | |
| 1717 return o; | |
| 1718 } | |
| 1719 | |
| 1720 checkUnnamed1926(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 buildUnnamed1927() { | |
| 1727 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1728 o.add(buildCreativeCustomEvent()); | |
| 1729 o.add(buildCreativeCustomEvent()); | |
| 1730 return o; | |
| 1731 } | |
| 1732 | |
| 1733 checkUnnamed1927(core.List<api.CreativeCustomEvent> o) { | |
| 1734 unittest.expect(o, unittest.hasLength(2)); | |
| 1735 checkCreativeCustomEvent(o[0]); | |
| 1736 checkCreativeCustomEvent(o[1]); | |
| 1737 } | |
| 1738 | |
| 1739 buildUnnamed1928() { | |
| 1740 var o = new core.List<api.ThirdPartyTrackingUrl>(); | |
| 1741 o.add(buildThirdPartyTrackingUrl()); | |
| 1742 o.add(buildThirdPartyTrackingUrl()); | |
| 1743 return o; | |
| 1744 } | |
| 1745 | |
| 1746 checkUnnamed1928(core.List<api.ThirdPartyTrackingUrl> o) { | |
| 1747 unittest.expect(o, unittest.hasLength(2)); | |
| 1748 checkThirdPartyTrackingUrl(o[0]); | |
| 1749 checkThirdPartyTrackingUrl(o[1]); | |
| 1750 } | |
| 1751 | |
| 1752 buildUnnamed1929() { | |
| 1753 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1754 o.add(buildCreativeCustomEvent()); | |
| 1755 o.add(buildCreativeCustomEvent()); | |
| 1756 return o; | |
| 1757 } | |
| 1758 | |
| 1759 checkUnnamed1929(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 = buildUnnamed1918(); | |
| 1774 o.advertiserId = "foo"; | |
| 1775 o.allowScriptAccess = true; | |
| 1776 o.archived = true; | |
| 1777 o.artworkType = "foo"; | |
| 1778 o.authoringSource = "foo"; | |
| 1779 o.authoringTool = "foo"; | |
| 1780 o.autoAdvanceImages = true; | |
| 1781 o.backgroundColor = "foo"; | |
| 1782 o.backupImageClickThroughUrl = "foo"; | |
| 1783 o.backupImageFeatures = buildUnnamed1919(); | |
| 1784 o.backupImageReportingLabel = "foo"; | |
| 1785 o.backupImageTargetWindow = buildTargetWindow(); | |
| 1786 o.clickTags = buildUnnamed1920(); | |
| 1787 o.commercialId = "foo"; | |
| 1788 o.companionCreatives = buildUnnamed1921(); | |
| 1789 o.compatibility = buildUnnamed1922(); | |
| 1790 o.convertFlashToHtml5 = true; | |
| 1791 o.counterCustomEvents = buildUnnamed1923(); | |
| 1792 o.creativeAssets = buildUnnamed1924(); | |
| 1793 o.creativeFieldAssignments = buildUnnamed1925(); | |
| 1794 o.customKeyValues = buildUnnamed1926(); | |
| 1795 o.exitCustomEvents = buildUnnamed1927(); | |
| 1796 o.fsCommand = buildFsCommand(); | |
| 1797 o.htmlCode = "foo"; | |
| 1798 o.htmlCodeLocked = true; | |
| 1799 o.id = "foo"; | |
| 1800 o.idDimensionValue = buildDimensionValue(); | |
| 1801 o.kind = "foo"; | |
| 1802 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 1803 o.latestTraffickedCreativeId = "foo"; | |
| 1804 o.name = "foo"; | |
| 1805 o.overrideCss = "foo"; | |
| 1806 o.redirectUrl = "foo"; | |
| 1807 o.renderingId = "foo"; | |
| 1808 o.renderingIdDimensionValue = buildDimensionValue(); | |
| 1809 o.requiredFlashPluginVersion = "foo"; | |
| 1810 o.requiredFlashVersion = 42; | |
| 1811 o.size = buildSize(); | |
| 1812 o.skippable = true; | |
| 1813 o.sslCompliant = true; | |
| 1814 o.sslOverride = true; | |
| 1815 o.studioAdvertiserId = "foo"; | |
| 1816 o.studioCreativeId = "foo"; | |
| 1817 o.studioTraffickedCreativeId = "foo"; | |
| 1818 o.subaccountId = "foo"; | |
| 1819 o.thirdPartyBackupImageImpressionsUrl = "foo"; | |
| 1820 o.thirdPartyRichMediaImpressionsUrl = "foo"; | |
| 1821 o.thirdPartyUrls = buildUnnamed1928(); | |
| 1822 o.timerCustomEvents = buildUnnamed1929(); | |
| 1823 o.totalFileSize = "foo"; | |
| 1824 o.type = "foo"; | |
| 1825 o.version = 42; | |
| 1826 o.videoDescription = "foo"; | |
| 1827 o.videoDuration = 42.0; | |
| 1828 } | |
| 1829 buildCounterCreative--; | |
| 1830 return o; | |
| 1831 } | |
| 1832 | |
| 1833 checkCreative(api.Creative o) { | |
| 1834 buildCounterCreative++; | |
| 1835 if (buildCounterCreative < 3) { | |
| 1836 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1837 unittest.expect(o.active, unittest.isTrue); | |
| 1838 unittest.expect(o.adParameters, unittest.equals('foo')); | |
| 1839 checkUnnamed1918(o.adTagKeys); | |
| 1840 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 1841 unittest.expect(o.allowScriptAccess, unittest.isTrue); | |
| 1842 unittest.expect(o.archived, unittest.isTrue); | |
| 1843 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1844 unittest.expect(o.authoringSource, unittest.equals('foo')); | |
| 1845 unittest.expect(o.authoringTool, unittest.equals('foo')); | |
| 1846 unittest.expect(o.autoAdvanceImages, unittest.isTrue); | |
| 1847 unittest.expect(o.backgroundColor, unittest.equals('foo')); | |
| 1848 unittest.expect(o.backupImageClickThroughUrl, unittest.equals('foo')); | |
| 1849 checkUnnamed1919(o.backupImageFeatures); | |
| 1850 unittest.expect(o.backupImageReportingLabel, unittest.equals('foo')); | |
| 1851 checkTargetWindow(o.backupImageTargetWindow); | |
| 1852 checkUnnamed1920(o.clickTags); | |
| 1853 unittest.expect(o.commercialId, unittest.equals('foo')); | |
| 1854 checkUnnamed1921(o.companionCreatives); | |
| 1855 checkUnnamed1922(o.compatibility); | |
| 1856 unittest.expect(o.convertFlashToHtml5, unittest.isTrue); | |
| 1857 checkUnnamed1923(o.counterCustomEvents); | |
| 1858 checkUnnamed1924(o.creativeAssets); | |
| 1859 checkUnnamed1925(o.creativeFieldAssignments); | |
| 1860 checkUnnamed1926(o.customKeyValues); | |
| 1861 checkUnnamed1927(o.exitCustomEvents); | |
| 1862 checkFsCommand(o.fsCommand); | |
| 1863 unittest.expect(o.htmlCode, unittest.equals('foo')); | |
| 1864 unittest.expect(o.htmlCodeLocked, unittest.isTrue); | |
| 1865 unittest.expect(o.id, unittest.equals('foo')); | |
| 1866 checkDimensionValue(o.idDimensionValue); | |
| 1867 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1868 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 1869 unittest.expect(o.latestTraffickedCreativeId, unittest.equals('foo')); | |
| 1870 unittest.expect(o.name, unittest.equals('foo')); | |
| 1871 unittest.expect(o.overrideCss, unittest.equals('foo')); | |
| 1872 unittest.expect(o.redirectUrl, unittest.equals('foo')); | |
| 1873 unittest.expect(o.renderingId, unittest.equals('foo')); | |
| 1874 checkDimensionValue(o.renderingIdDimensionValue); | |
| 1875 unittest.expect(o.requiredFlashPluginVersion, unittest.equals('foo')); | |
| 1876 unittest.expect(o.requiredFlashVersion, unittest.equals(42)); | |
| 1877 checkSize(o.size); | |
| 1878 unittest.expect(o.skippable, unittest.isTrue); | |
| 1879 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1880 unittest.expect(o.sslOverride, unittest.isTrue); | |
| 1881 unittest.expect(o.studioAdvertiserId, unittest.equals('foo')); | |
| 1882 unittest.expect(o.studioCreativeId, unittest.equals('foo')); | |
| 1883 unittest.expect(o.studioTraffickedCreativeId, unittest.equals('foo')); | |
| 1884 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 1885 unittest.expect(o.thirdPartyBackupImageImpressionsUrl, unittest.equals('foo'
)); | |
| 1886 unittest.expect(o.thirdPartyRichMediaImpressionsUrl, unittest.equals('foo'))
; | |
| 1887 checkUnnamed1928(o.thirdPartyUrls); | |
| 1888 checkUnnamed1929(o.timerCustomEvents); | |
| 1889 unittest.expect(o.totalFileSize, unittest.equals('foo')); | |
| 1890 unittest.expect(o.type, unittest.equals('foo')); | |
| 1891 unittest.expect(o.version, unittest.equals(42)); | |
| 1892 unittest.expect(o.videoDescription, unittest.equals('foo')); | |
| 1893 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 1894 } | |
| 1895 buildCounterCreative--; | |
| 1896 } | |
| 1897 | |
| 1898 buildUnnamed1930() { | |
| 1899 var o = new core.List<core.String>(); | |
| 1900 o.add("foo"); | |
| 1901 o.add("foo"); | |
| 1902 return o; | |
| 1903 } | |
| 1904 | |
| 1905 checkUnnamed1930(core.List<core.String> o) { | |
| 1906 unittest.expect(o, unittest.hasLength(2)); | |
| 1907 unittest.expect(o[0], unittest.equals('foo')); | |
| 1908 unittest.expect(o[1], unittest.equals('foo')); | |
| 1909 } | |
| 1910 | |
| 1911 core.int buildCounterCreativeAsset = 0; | |
| 1912 buildCreativeAsset() { | |
| 1913 var o = new api.CreativeAsset(); | |
| 1914 buildCounterCreativeAsset++; | |
| 1915 if (buildCounterCreativeAsset < 3) { | |
| 1916 o.actionScript3 = true; | |
| 1917 o.active = true; | |
| 1918 o.alignment = "foo"; | |
| 1919 o.artworkType = "foo"; | |
| 1920 o.assetIdentifier = buildCreativeAssetId(); | |
| 1921 o.backupImageExit = buildCreativeCustomEvent(); | |
| 1922 o.bitRate = 42; | |
| 1923 o.childAssetType = "foo"; | |
| 1924 o.collapsedSize = buildSize(); | |
| 1925 o.customStartTimeValue = 42; | |
| 1926 o.detectedFeatures = buildUnnamed1930(); | |
| 1927 o.displayType = "foo"; | |
| 1928 o.duration = 42; | |
| 1929 o.durationType = "foo"; | |
| 1930 o.expandedDimension = buildSize(); | |
| 1931 o.fileSize = "foo"; | |
| 1932 o.flashVersion = 42; | |
| 1933 o.hideFlashObjects = true; | |
| 1934 o.hideSelectionBoxes = true; | |
| 1935 o.horizontallyLocked = true; | |
| 1936 o.id = "foo"; | |
| 1937 o.mimeType = "foo"; | |
| 1938 o.offset = buildOffsetPosition(); | |
| 1939 o.originalBackup = true; | |
| 1940 o.position = buildOffsetPosition(); | |
| 1941 o.positionLeftUnit = "foo"; | |
| 1942 o.positionTopUnit = "foo"; | |
| 1943 o.progressiveServingUrl = "foo"; | |
| 1944 o.pushdown = true; | |
| 1945 o.pushdownDuration = 42.0; | |
| 1946 o.role = "foo"; | |
| 1947 o.size = buildSize(); | |
| 1948 o.sslCompliant = true; | |
| 1949 o.startTimeType = "foo"; | |
| 1950 o.streamingServingUrl = "foo"; | |
| 1951 o.transparency = true; | |
| 1952 o.verticallyLocked = true; | |
| 1953 o.videoDuration = 42.0; | |
| 1954 o.windowMode = "foo"; | |
| 1955 o.zIndex = 42; | |
| 1956 o.zipFilename = "foo"; | |
| 1957 o.zipFilesize = "foo"; | |
| 1958 } | |
| 1959 buildCounterCreativeAsset--; | |
| 1960 return o; | |
| 1961 } | |
| 1962 | |
| 1963 checkCreativeAsset(api.CreativeAsset o) { | |
| 1964 buildCounterCreativeAsset++; | |
| 1965 if (buildCounterCreativeAsset < 3) { | |
| 1966 unittest.expect(o.actionScript3, unittest.isTrue); | |
| 1967 unittest.expect(o.active, unittest.isTrue); | |
| 1968 unittest.expect(o.alignment, unittest.equals('foo')); | |
| 1969 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1970 checkCreativeAssetId(o.assetIdentifier); | |
| 1971 checkCreativeCustomEvent(o.backupImageExit); | |
| 1972 unittest.expect(o.bitRate, unittest.equals(42)); | |
| 1973 unittest.expect(o.childAssetType, unittest.equals('foo')); | |
| 1974 checkSize(o.collapsedSize); | |
| 1975 unittest.expect(o.customStartTimeValue, unittest.equals(42)); | |
| 1976 checkUnnamed1930(o.detectedFeatures); | |
| 1977 unittest.expect(o.displayType, unittest.equals('foo')); | |
| 1978 unittest.expect(o.duration, unittest.equals(42)); | |
| 1979 unittest.expect(o.durationType, unittest.equals('foo')); | |
| 1980 checkSize(o.expandedDimension); | |
| 1981 unittest.expect(o.fileSize, unittest.equals('foo')); | |
| 1982 unittest.expect(o.flashVersion, unittest.equals(42)); | |
| 1983 unittest.expect(o.hideFlashObjects, unittest.isTrue); | |
| 1984 unittest.expect(o.hideSelectionBoxes, unittest.isTrue); | |
| 1985 unittest.expect(o.horizontallyLocked, unittest.isTrue); | |
| 1986 unittest.expect(o.id, unittest.equals('foo')); | |
| 1987 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 1988 checkOffsetPosition(o.offset); | |
| 1989 unittest.expect(o.originalBackup, unittest.isTrue); | |
| 1990 checkOffsetPosition(o.position); | |
| 1991 unittest.expect(o.positionLeftUnit, unittest.equals('foo')); | |
| 1992 unittest.expect(o.positionTopUnit, unittest.equals('foo')); | |
| 1993 unittest.expect(o.progressiveServingUrl, unittest.equals('foo')); | |
| 1994 unittest.expect(o.pushdown, unittest.isTrue); | |
| 1995 unittest.expect(o.pushdownDuration, unittest.equals(42.0)); | |
| 1996 unittest.expect(o.role, unittest.equals('foo')); | |
| 1997 checkSize(o.size); | |
| 1998 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1999 unittest.expect(o.startTimeType, unittest.equals('foo')); | |
| 2000 unittest.expect(o.streamingServingUrl, unittest.equals('foo')); | |
| 2001 unittest.expect(o.transparency, unittest.isTrue); | |
| 2002 unittest.expect(o.verticallyLocked, unittest.isTrue); | |
| 2003 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 2004 unittest.expect(o.windowMode, unittest.equals('foo')); | |
| 2005 unittest.expect(o.zIndex, unittest.equals(42)); | |
| 2006 unittest.expect(o.zipFilename, unittest.equals('foo')); | |
| 2007 unittest.expect(o.zipFilesize, unittest.equals('foo')); | |
| 2008 } | |
| 2009 buildCounterCreativeAsset--; | |
| 2010 } | |
| 2011 | |
| 2012 core.int buildCounterCreativeAssetId = 0; | |
| 2013 buildCreativeAssetId() { | |
| 2014 var o = new api.CreativeAssetId(); | |
| 2015 buildCounterCreativeAssetId++; | |
| 2016 if (buildCounterCreativeAssetId < 3) { | |
| 2017 o.name = "foo"; | |
| 2018 o.type = "foo"; | |
| 2019 } | |
| 2020 buildCounterCreativeAssetId--; | |
| 2021 return o; | |
| 2022 } | |
| 2023 | |
| 2024 checkCreativeAssetId(api.CreativeAssetId o) { | |
| 2025 buildCounterCreativeAssetId++; | |
| 2026 if (buildCounterCreativeAssetId < 3) { | |
| 2027 unittest.expect(o.name, unittest.equals('foo')); | |
| 2028 unittest.expect(o.type, unittest.equals('foo')); | |
| 2029 } | |
| 2030 buildCounterCreativeAssetId--; | |
| 2031 } | |
| 2032 | |
| 2033 buildUnnamed1931() { | |
| 2034 var o = new core.List<api.ClickTag>(); | |
| 2035 o.add(buildClickTag()); | |
| 2036 o.add(buildClickTag()); | |
| 2037 return o; | |
| 2038 } | |
| 2039 | |
| 2040 checkUnnamed1931(core.List<api.ClickTag> o) { | |
| 2041 unittest.expect(o, unittest.hasLength(2)); | |
| 2042 checkClickTag(o[0]); | |
| 2043 checkClickTag(o[1]); | |
| 2044 } | |
| 2045 | |
| 2046 buildUnnamed1932() { | |
| 2047 var o = new core.List<core.String>(); | |
| 2048 o.add("foo"); | |
| 2049 o.add("foo"); | |
| 2050 return o; | |
| 2051 } | |
| 2052 | |
| 2053 checkUnnamed1932(core.List<core.String> o) { | |
| 2054 unittest.expect(o, unittest.hasLength(2)); | |
| 2055 unittest.expect(o[0], unittest.equals('foo')); | |
| 2056 unittest.expect(o[1], unittest.equals('foo')); | |
| 2057 } | |
| 2058 | |
| 2059 buildUnnamed1933() { | |
| 2060 var o = new core.List<core.String>(); | |
| 2061 o.add("foo"); | |
| 2062 o.add("foo"); | |
| 2063 return o; | |
| 2064 } | |
| 2065 | |
| 2066 checkUnnamed1933(core.List<core.String> o) { | |
| 2067 unittest.expect(o, unittest.hasLength(2)); | |
| 2068 unittest.expect(o[0], unittest.equals('foo')); | |
| 2069 unittest.expect(o[1], unittest.equals('foo')); | |
| 2070 } | |
| 2071 | |
| 2072 core.int buildCounterCreativeAssetMetadata = 0; | |
| 2073 buildCreativeAssetMetadata() { | |
| 2074 var o = new api.CreativeAssetMetadata(); | |
| 2075 buildCounterCreativeAssetMetadata++; | |
| 2076 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2077 o.assetIdentifier = buildCreativeAssetId(); | |
| 2078 o.clickTags = buildUnnamed1931(); | |
| 2079 o.detectedFeatures = buildUnnamed1932(); | |
| 2080 o.kind = "foo"; | |
| 2081 o.warnedValidationRules = buildUnnamed1933(); | |
| 2082 } | |
| 2083 buildCounterCreativeAssetMetadata--; | |
| 2084 return o; | |
| 2085 } | |
| 2086 | |
| 2087 checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { | |
| 2088 buildCounterCreativeAssetMetadata++; | |
| 2089 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2090 checkCreativeAssetId(o.assetIdentifier); | |
| 2091 checkUnnamed1931(o.clickTags); | |
| 2092 checkUnnamed1932(o.detectedFeatures); | |
| 2093 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2094 checkUnnamed1933(o.warnedValidationRules); | |
| 2095 } | |
| 2096 buildCounterCreativeAssetMetadata--; | |
| 2097 } | |
| 2098 | |
| 2099 buildUnnamed1934() { | |
| 2100 var o = new core.List<api.CompanionClickThroughOverride>(); | |
| 2101 o.add(buildCompanionClickThroughOverride()); | |
| 2102 o.add(buildCompanionClickThroughOverride()); | |
| 2103 return o; | |
| 2104 } | |
| 2105 | |
| 2106 checkUnnamed1934(core.List<api.CompanionClickThroughOverride> o) { | |
| 2107 unittest.expect(o, unittest.hasLength(2)); | |
| 2108 checkCompanionClickThroughOverride(o[0]); | |
| 2109 checkCompanionClickThroughOverride(o[1]); | |
| 2110 } | |
| 2111 | |
| 2112 buildUnnamed1935() { | |
| 2113 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 2114 o.add(buildCreativeGroupAssignment()); | |
| 2115 o.add(buildCreativeGroupAssignment()); | |
| 2116 return o; | |
| 2117 } | |
| 2118 | |
| 2119 checkUnnamed1935(core.List<api.CreativeGroupAssignment> o) { | |
| 2120 unittest.expect(o, unittest.hasLength(2)); | |
| 2121 checkCreativeGroupAssignment(o[0]); | |
| 2122 checkCreativeGroupAssignment(o[1]); | |
| 2123 } | |
| 2124 | |
| 2125 buildUnnamed1936() { | |
| 2126 var o = new core.List<api.RichMediaExitOverride>(); | |
| 2127 o.add(buildRichMediaExitOverride()); | |
| 2128 o.add(buildRichMediaExitOverride()); | |
| 2129 return o; | |
| 2130 } | |
| 2131 | |
| 2132 checkUnnamed1936(core.List<api.RichMediaExitOverride> o) { | |
| 2133 unittest.expect(o, unittest.hasLength(2)); | |
| 2134 checkRichMediaExitOverride(o[0]); | |
| 2135 checkRichMediaExitOverride(o[1]); | |
| 2136 } | |
| 2137 | |
| 2138 core.int buildCounterCreativeAssignment = 0; | |
| 2139 buildCreativeAssignment() { | |
| 2140 var o = new api.CreativeAssignment(); | |
| 2141 buildCounterCreativeAssignment++; | |
| 2142 if (buildCounterCreativeAssignment < 3) { | |
| 2143 o.active = true; | |
| 2144 o.applyEventTags = true; | |
| 2145 o.clickThroughUrl = buildClickThroughUrl(); | |
| 2146 o.companionCreativeOverrides = buildUnnamed1934(); | |
| 2147 o.creativeGroupAssignments = buildUnnamed1935(); | |
| 2148 o.creativeId = "foo"; | |
| 2149 o.creativeIdDimensionValue = buildDimensionValue(); | |
| 2150 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2151 o.richMediaExitOverrides = buildUnnamed1936(); | |
| 2152 o.sequence = 42; | |
| 2153 o.sslCompliant = true; | |
| 2154 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2155 o.weight = 42; | |
| 2156 } | |
| 2157 buildCounterCreativeAssignment--; | |
| 2158 return o; | |
| 2159 } | |
| 2160 | |
| 2161 checkCreativeAssignment(api.CreativeAssignment o) { | |
| 2162 buildCounterCreativeAssignment++; | |
| 2163 if (buildCounterCreativeAssignment < 3) { | |
| 2164 unittest.expect(o.active, unittest.isTrue); | |
| 2165 unittest.expect(o.applyEventTags, unittest.isTrue); | |
| 2166 checkClickThroughUrl(o.clickThroughUrl); | |
| 2167 checkUnnamed1934(o.companionCreativeOverrides); | |
| 2168 checkUnnamed1935(o.creativeGroupAssignments); | |
| 2169 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 2170 checkDimensionValue(o.creativeIdDimensionValue); | |
| 2171 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | |
| 2172 checkUnnamed1936(o.richMediaExitOverrides); | |
| 2173 unittest.expect(o.sequence, unittest.equals(42)); | |
| 2174 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2175 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | |
| 2176 unittest.expect(o.weight, unittest.equals(42)); | |
| 2177 } | |
| 2178 buildCounterCreativeAssignment--; | |
| 2179 } | |
| 2180 | |
| 2181 core.int buildCounterCreativeCustomEvent = 0; | |
| 2182 buildCreativeCustomEvent() { | |
| 2183 var o = new api.CreativeCustomEvent(); | |
| 2184 buildCounterCreativeCustomEvent++; | |
| 2185 if (buildCounterCreativeCustomEvent < 3) { | |
| 2186 o.advertiserCustomEventId = "foo"; | |
| 2187 o.advertiserCustomEventName = "foo"; | |
| 2188 o.advertiserCustomEventType = "foo"; | |
| 2189 o.artworkLabel = "foo"; | |
| 2190 o.artworkType = "foo"; | |
| 2191 o.exitUrl = "foo"; | |
| 2192 o.id = "foo"; | |
| 2193 o.popupWindowProperties = buildPopupWindowProperties(); | |
| 2194 o.targetType = "foo"; | |
| 2195 o.videoReportingId = "foo"; | |
| 2196 } | |
| 2197 buildCounterCreativeCustomEvent--; | |
| 2198 return o; | |
| 2199 } | |
| 2200 | |
| 2201 checkCreativeCustomEvent(api.CreativeCustomEvent o) { | |
| 2202 buildCounterCreativeCustomEvent++; | |
| 2203 if (buildCounterCreativeCustomEvent < 3) { | |
| 2204 unittest.expect(o.advertiserCustomEventId, unittest.equals('foo')); | |
| 2205 unittest.expect(o.advertiserCustomEventName, unittest.equals('foo')); | |
| 2206 unittest.expect(o.advertiserCustomEventType, unittest.equals('foo')); | |
| 2207 unittest.expect(o.artworkLabel, unittest.equals('foo')); | |
| 2208 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2209 unittest.expect(o.exitUrl, unittest.equals('foo')); | |
| 2210 unittest.expect(o.id, unittest.equals('foo')); | |
| 2211 checkPopupWindowProperties(o.popupWindowProperties); | |
| 2212 unittest.expect(o.targetType, unittest.equals('foo')); | |
| 2213 unittest.expect(o.videoReportingId, unittest.equals('foo')); | |
| 2214 } | |
| 2215 buildCounterCreativeCustomEvent--; | |
| 2216 } | |
| 2217 | |
| 2218 core.int buildCounterCreativeField = 0; | |
| 2219 buildCreativeField() { | |
| 2220 var o = new api.CreativeField(); | |
| 2221 buildCounterCreativeField++; | |
| 2222 if (buildCounterCreativeField < 3) { | |
| 2223 o.accountId = "foo"; | |
| 2224 o.advertiserId = "foo"; | |
| 2225 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2226 o.id = "foo"; | |
| 2227 o.kind = "foo"; | |
| 2228 o.name = "foo"; | |
| 2229 o.subaccountId = "foo"; | |
| 2230 } | |
| 2231 buildCounterCreativeField--; | |
| 2232 return o; | |
| 2233 } | |
| 2234 | |
| 2235 checkCreativeField(api.CreativeField o) { | |
| 2236 buildCounterCreativeField++; | |
| 2237 if (buildCounterCreativeField < 3) { | |
| 2238 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2239 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2240 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2241 unittest.expect(o.id, unittest.equals('foo')); | |
| 2242 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2243 unittest.expect(o.name, unittest.equals('foo')); | |
| 2244 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2245 } | |
| 2246 buildCounterCreativeField--; | |
| 2247 } | |
| 2248 | |
| 2249 core.int buildCounterCreativeFieldAssignment = 0; | |
| 2250 buildCreativeFieldAssignment() { | |
| 2251 var o = new api.CreativeFieldAssignment(); | |
| 2252 buildCounterCreativeFieldAssignment++; | |
| 2253 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2254 o.creativeFieldId = "foo"; | |
| 2255 o.creativeFieldValueId = "foo"; | |
| 2256 } | |
| 2257 buildCounterCreativeFieldAssignment--; | |
| 2258 return o; | |
| 2259 } | |
| 2260 | |
| 2261 checkCreativeFieldAssignment(api.CreativeFieldAssignment o) { | |
| 2262 buildCounterCreativeFieldAssignment++; | |
| 2263 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2264 unittest.expect(o.creativeFieldId, unittest.equals('foo')); | |
| 2265 unittest.expect(o.creativeFieldValueId, unittest.equals('foo')); | |
| 2266 } | |
| 2267 buildCounterCreativeFieldAssignment--; | |
| 2268 } | |
| 2269 | |
| 2270 core.int buildCounterCreativeFieldValue = 0; | |
| 2271 buildCreativeFieldValue() { | |
| 2272 var o = new api.CreativeFieldValue(); | |
| 2273 buildCounterCreativeFieldValue++; | |
| 2274 if (buildCounterCreativeFieldValue < 3) { | |
| 2275 o.id = "foo"; | |
| 2276 o.kind = "foo"; | |
| 2277 o.value = "foo"; | |
| 2278 } | |
| 2279 buildCounterCreativeFieldValue--; | |
| 2280 return o; | |
| 2281 } | |
| 2282 | |
| 2283 checkCreativeFieldValue(api.CreativeFieldValue o) { | |
| 2284 buildCounterCreativeFieldValue++; | |
| 2285 if (buildCounterCreativeFieldValue < 3) { | |
| 2286 unittest.expect(o.id, unittest.equals('foo')); | |
| 2287 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2288 unittest.expect(o.value, unittest.equals('foo')); | |
| 2289 } | |
| 2290 buildCounterCreativeFieldValue--; | |
| 2291 } | |
| 2292 | |
| 2293 buildUnnamed1937() { | |
| 2294 var o = new core.List<api.CreativeFieldValue>(); | |
| 2295 o.add(buildCreativeFieldValue()); | |
| 2296 o.add(buildCreativeFieldValue()); | |
| 2297 return o; | |
| 2298 } | |
| 2299 | |
| 2300 checkUnnamed1937(core.List<api.CreativeFieldValue> o) { | |
| 2301 unittest.expect(o, unittest.hasLength(2)); | |
| 2302 checkCreativeFieldValue(o[0]); | |
| 2303 checkCreativeFieldValue(o[1]); | |
| 2304 } | |
| 2305 | |
| 2306 core.int buildCounterCreativeFieldValuesListResponse = 0; | |
| 2307 buildCreativeFieldValuesListResponse() { | |
| 2308 var o = new api.CreativeFieldValuesListResponse(); | |
| 2309 buildCounterCreativeFieldValuesListResponse++; | |
| 2310 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2311 o.creativeFieldValues = buildUnnamed1937(); | |
| 2312 o.kind = "foo"; | |
| 2313 o.nextPageToken = "foo"; | |
| 2314 } | |
| 2315 buildCounterCreativeFieldValuesListResponse--; | |
| 2316 return o; | |
| 2317 } | |
| 2318 | |
| 2319 checkCreativeFieldValuesListResponse(api.CreativeFieldValuesListResponse o) { | |
| 2320 buildCounterCreativeFieldValuesListResponse++; | |
| 2321 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2322 checkUnnamed1937(o.creativeFieldValues); | |
| 2323 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2324 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2325 } | |
| 2326 buildCounterCreativeFieldValuesListResponse--; | |
| 2327 } | |
| 2328 | |
| 2329 buildUnnamed1938() { | |
| 2330 var o = new core.List<api.CreativeField>(); | |
| 2331 o.add(buildCreativeField()); | |
| 2332 o.add(buildCreativeField()); | |
| 2333 return o; | |
| 2334 } | |
| 2335 | |
| 2336 checkUnnamed1938(core.List<api.CreativeField> o) { | |
| 2337 unittest.expect(o, unittest.hasLength(2)); | |
| 2338 checkCreativeField(o[0]); | |
| 2339 checkCreativeField(o[1]); | |
| 2340 } | |
| 2341 | |
| 2342 core.int buildCounterCreativeFieldsListResponse = 0; | |
| 2343 buildCreativeFieldsListResponse() { | |
| 2344 var o = new api.CreativeFieldsListResponse(); | |
| 2345 buildCounterCreativeFieldsListResponse++; | |
| 2346 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2347 o.creativeFields = buildUnnamed1938(); | |
| 2348 o.kind = "foo"; | |
| 2349 o.nextPageToken = "foo"; | |
| 2350 } | |
| 2351 buildCounterCreativeFieldsListResponse--; | |
| 2352 return o; | |
| 2353 } | |
| 2354 | |
| 2355 checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { | |
| 2356 buildCounterCreativeFieldsListResponse++; | |
| 2357 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2358 checkUnnamed1938(o.creativeFields); | |
| 2359 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2360 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2361 } | |
| 2362 buildCounterCreativeFieldsListResponse--; | |
| 2363 } | |
| 2364 | |
| 2365 core.int buildCounterCreativeGroup = 0; | |
| 2366 buildCreativeGroup() { | |
| 2367 var o = new api.CreativeGroup(); | |
| 2368 buildCounterCreativeGroup++; | |
| 2369 if (buildCounterCreativeGroup < 3) { | |
| 2370 o.accountId = "foo"; | |
| 2371 o.advertiserId = "foo"; | |
| 2372 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2373 o.groupNumber = 42; | |
| 2374 o.id = "foo"; | |
| 2375 o.kind = "foo"; | |
| 2376 o.name = "foo"; | |
| 2377 o.subaccountId = "foo"; | |
| 2378 } | |
| 2379 buildCounterCreativeGroup--; | |
| 2380 return o; | |
| 2381 } | |
| 2382 | |
| 2383 checkCreativeGroup(api.CreativeGroup o) { | |
| 2384 buildCounterCreativeGroup++; | |
| 2385 if (buildCounterCreativeGroup < 3) { | |
| 2386 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2387 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2388 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2389 unittest.expect(o.groupNumber, unittest.equals(42)); | |
| 2390 unittest.expect(o.id, unittest.equals('foo')); | |
| 2391 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2392 unittest.expect(o.name, unittest.equals('foo')); | |
| 2393 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2394 } | |
| 2395 buildCounterCreativeGroup--; | |
| 2396 } | |
| 2397 | |
| 2398 core.int buildCounterCreativeGroupAssignment = 0; | |
| 2399 buildCreativeGroupAssignment() { | |
| 2400 var o = new api.CreativeGroupAssignment(); | |
| 2401 buildCounterCreativeGroupAssignment++; | |
| 2402 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2403 o.creativeGroupId = "foo"; | |
| 2404 o.creativeGroupNumber = "foo"; | |
| 2405 } | |
| 2406 buildCounterCreativeGroupAssignment--; | |
| 2407 return o; | |
| 2408 } | |
| 2409 | |
| 2410 checkCreativeGroupAssignment(api.CreativeGroupAssignment o) { | |
| 2411 buildCounterCreativeGroupAssignment++; | |
| 2412 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2413 unittest.expect(o.creativeGroupId, unittest.equals('foo')); | |
| 2414 unittest.expect(o.creativeGroupNumber, unittest.equals('foo')); | |
| 2415 } | |
| 2416 buildCounterCreativeGroupAssignment--; | |
| 2417 } | |
| 2418 | |
| 2419 buildUnnamed1939() { | |
| 2420 var o = new core.List<api.CreativeGroup>(); | |
| 2421 o.add(buildCreativeGroup()); | |
| 2422 o.add(buildCreativeGroup()); | |
| 2423 return o; | |
| 2424 } | |
| 2425 | |
| 2426 checkUnnamed1939(core.List<api.CreativeGroup> o) { | |
| 2427 unittest.expect(o, unittest.hasLength(2)); | |
| 2428 checkCreativeGroup(o[0]); | |
| 2429 checkCreativeGroup(o[1]); | |
| 2430 } | |
| 2431 | |
| 2432 core.int buildCounterCreativeGroupsListResponse = 0; | |
| 2433 buildCreativeGroupsListResponse() { | |
| 2434 var o = new api.CreativeGroupsListResponse(); | |
| 2435 buildCounterCreativeGroupsListResponse++; | |
| 2436 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2437 o.creativeGroups = buildUnnamed1939(); | |
| 2438 o.kind = "foo"; | |
| 2439 o.nextPageToken = "foo"; | |
| 2440 } | |
| 2441 buildCounterCreativeGroupsListResponse--; | |
| 2442 return o; | |
| 2443 } | |
| 2444 | |
| 2445 checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { | |
| 2446 buildCounterCreativeGroupsListResponse++; | |
| 2447 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2448 checkUnnamed1939(o.creativeGroups); | |
| 2449 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2450 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2451 } | |
| 2452 buildCounterCreativeGroupsListResponse--; | |
| 2453 } | |
| 2454 | |
| 2455 buildUnnamed1940() { | |
| 2456 var o = new core.List<api.OptimizationActivity>(); | |
| 2457 o.add(buildOptimizationActivity()); | |
| 2458 o.add(buildOptimizationActivity()); | |
| 2459 return o; | |
| 2460 } | |
| 2461 | |
| 2462 checkUnnamed1940(core.List<api.OptimizationActivity> o) { | |
| 2463 unittest.expect(o, unittest.hasLength(2)); | |
| 2464 checkOptimizationActivity(o[0]); | |
| 2465 checkOptimizationActivity(o[1]); | |
| 2466 } | |
| 2467 | |
| 2468 core.int buildCounterCreativeOptimizationConfiguration = 0; | |
| 2469 buildCreativeOptimizationConfiguration() { | |
| 2470 var o = new api.CreativeOptimizationConfiguration(); | |
| 2471 buildCounterCreativeOptimizationConfiguration++; | |
| 2472 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2473 o.id = "foo"; | |
| 2474 o.name = "foo"; | |
| 2475 o.optimizationActivitys = buildUnnamed1940(); | |
| 2476 o.optimizationModel = "foo"; | |
| 2477 } | |
| 2478 buildCounterCreativeOptimizationConfiguration--; | |
| 2479 return o; | |
| 2480 } | |
| 2481 | |
| 2482 checkCreativeOptimizationConfiguration(api.CreativeOptimizationConfiguration o)
{ | |
| 2483 buildCounterCreativeOptimizationConfiguration++; | |
| 2484 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2485 unittest.expect(o.id, unittest.equals('foo')); | |
| 2486 unittest.expect(o.name, unittest.equals('foo')); | |
| 2487 checkUnnamed1940(o.optimizationActivitys); | |
| 2488 unittest.expect(o.optimizationModel, unittest.equals('foo')); | |
| 2489 } | |
| 2490 buildCounterCreativeOptimizationConfiguration--; | |
| 2491 } | |
| 2492 | |
| 2493 buildUnnamed1941() { | |
| 2494 var o = new core.List<api.CreativeAssignment>(); | |
| 2495 o.add(buildCreativeAssignment()); | |
| 2496 o.add(buildCreativeAssignment()); | |
| 2497 return o; | |
| 2498 } | |
| 2499 | |
| 2500 checkUnnamed1941(core.List<api.CreativeAssignment> o) { | |
| 2501 unittest.expect(o, unittest.hasLength(2)); | |
| 2502 checkCreativeAssignment(o[0]); | |
| 2503 checkCreativeAssignment(o[1]); | |
| 2504 } | |
| 2505 | |
| 2506 core.int buildCounterCreativeRotation = 0; | |
| 2507 buildCreativeRotation() { | |
| 2508 var o = new api.CreativeRotation(); | |
| 2509 buildCounterCreativeRotation++; | |
| 2510 if (buildCounterCreativeRotation < 3) { | |
| 2511 o.creativeAssignments = buildUnnamed1941(); | |
| 2512 o.creativeOptimizationConfigurationId = "foo"; | |
| 2513 o.type = "foo"; | |
| 2514 o.weightCalculationStrategy = "foo"; | |
| 2515 } | |
| 2516 buildCounterCreativeRotation--; | |
| 2517 return o; | |
| 2518 } | |
| 2519 | |
| 2520 checkCreativeRotation(api.CreativeRotation o) { | |
| 2521 buildCounterCreativeRotation++; | |
| 2522 if (buildCounterCreativeRotation < 3) { | |
| 2523 checkUnnamed1941(o.creativeAssignments); | |
| 2524 unittest.expect(o.creativeOptimizationConfigurationId, unittest.equals('foo'
)); | |
| 2525 unittest.expect(o.type, unittest.equals('foo')); | |
| 2526 unittest.expect(o.weightCalculationStrategy, unittest.equals('foo')); | |
| 2527 } | |
| 2528 buildCounterCreativeRotation--; | |
| 2529 } | |
| 2530 | |
| 2531 core.int buildCounterCreativeSettings = 0; | |
| 2532 buildCreativeSettings() { | |
| 2533 var o = new api.CreativeSettings(); | |
| 2534 buildCounterCreativeSettings++; | |
| 2535 if (buildCounterCreativeSettings < 3) { | |
| 2536 o.iFrameFooter = "foo"; | |
| 2537 o.iFrameHeader = "foo"; | |
| 2538 } | |
| 2539 buildCounterCreativeSettings--; | |
| 2540 return o; | |
| 2541 } | |
| 2542 | |
| 2543 checkCreativeSettings(api.CreativeSettings o) { | |
| 2544 buildCounterCreativeSettings++; | |
| 2545 if (buildCounterCreativeSettings < 3) { | |
| 2546 unittest.expect(o.iFrameFooter, unittest.equals('foo')); | |
| 2547 unittest.expect(o.iFrameHeader, unittest.equals('foo')); | |
| 2548 } | |
| 2549 buildCounterCreativeSettings--; | |
| 2550 } | |
| 2551 | |
| 2552 buildUnnamed1942() { | |
| 2553 var o = new core.List<api.Creative>(); | |
| 2554 o.add(buildCreative()); | |
| 2555 o.add(buildCreative()); | |
| 2556 return o; | |
| 2557 } | |
| 2558 | |
| 2559 checkUnnamed1942(core.List<api.Creative> o) { | |
| 2560 unittest.expect(o, unittest.hasLength(2)); | |
| 2561 checkCreative(o[0]); | |
| 2562 checkCreative(o[1]); | |
| 2563 } | |
| 2564 | |
| 2565 core.int buildCounterCreativesListResponse = 0; | |
| 2566 buildCreativesListResponse() { | |
| 2567 var o = new api.CreativesListResponse(); | |
| 2568 buildCounterCreativesListResponse++; | |
| 2569 if (buildCounterCreativesListResponse < 3) { | |
| 2570 o.creatives = buildUnnamed1942(); | |
| 2571 o.kind = "foo"; | |
| 2572 o.nextPageToken = "foo"; | |
| 2573 } | |
| 2574 buildCounterCreativesListResponse--; | |
| 2575 return o; | |
| 2576 } | |
| 2577 | |
| 2578 checkCreativesListResponse(api.CreativesListResponse o) { | |
| 2579 buildCounterCreativesListResponse++; | |
| 2580 if (buildCounterCreativesListResponse < 3) { | |
| 2581 checkUnnamed1942(o.creatives); | |
| 2582 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2583 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2584 } | |
| 2585 buildCounterCreativesListResponse--; | |
| 2586 } | |
| 2587 | |
| 2588 buildUnnamed1943() { | |
| 2589 var o = new core.List<api.Dimension>(); | |
| 2590 o.add(buildDimension()); | |
| 2591 o.add(buildDimension()); | |
| 2592 return o; | |
| 2593 } | |
| 2594 | |
| 2595 checkUnnamed1943(core.List<api.Dimension> o) { | |
| 2596 unittest.expect(o, unittest.hasLength(2)); | |
| 2597 checkDimension(o[0]); | |
| 2598 checkDimension(o[1]); | |
| 2599 } | |
| 2600 | |
| 2601 buildUnnamed1944() { | |
| 2602 var o = new core.List<api.Dimension>(); | |
| 2603 o.add(buildDimension()); | |
| 2604 o.add(buildDimension()); | |
| 2605 return o; | |
| 2606 } | |
| 2607 | |
| 2608 checkUnnamed1944(core.List<api.Dimension> o) { | |
| 2609 unittest.expect(o, unittest.hasLength(2)); | |
| 2610 checkDimension(o[0]); | |
| 2611 checkDimension(o[1]); | |
| 2612 } | |
| 2613 | |
| 2614 buildUnnamed1945() { | |
| 2615 var o = new core.List<api.Metric>(); | |
| 2616 o.add(buildMetric()); | |
| 2617 o.add(buildMetric()); | |
| 2618 return o; | |
| 2619 } | |
| 2620 | |
| 2621 checkUnnamed1945(core.List<api.Metric> o) { | |
| 2622 unittest.expect(o, unittest.hasLength(2)); | |
| 2623 checkMetric(o[0]); | |
| 2624 checkMetric(o[1]); | |
| 2625 } | |
| 2626 | |
| 2627 buildUnnamed1946() { | |
| 2628 var o = new core.List<api.Metric>(); | |
| 2629 o.add(buildMetric()); | |
| 2630 o.add(buildMetric()); | |
| 2631 return o; | |
| 2632 } | |
| 2633 | |
| 2634 checkUnnamed1946(core.List<api.Metric> o) { | |
| 2635 unittest.expect(o, unittest.hasLength(2)); | |
| 2636 checkMetric(o[0]); | |
| 2637 checkMetric(o[1]); | |
| 2638 } | |
| 2639 | |
| 2640 core.int buildCounterCrossDimensionReachReportCompatibleFields = 0; | |
| 2641 buildCrossDimensionReachReportCompatibleFields() { | |
| 2642 var o = new api.CrossDimensionReachReportCompatibleFields(); | |
| 2643 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2644 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2645 o.breakdown = buildUnnamed1943(); | |
| 2646 o.dimensionFilters = buildUnnamed1944(); | |
| 2647 o.kind = "foo"; | |
| 2648 o.metrics = buildUnnamed1945(); | |
| 2649 o.overlapMetrics = buildUnnamed1946(); | |
| 2650 } | |
| 2651 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2652 return o; | |
| 2653 } | |
| 2654 | |
| 2655 checkCrossDimensionReachReportCompatibleFields(api.CrossDimensionReachReportComp
atibleFields o) { | |
| 2656 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2657 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2658 checkUnnamed1943(o.breakdown); | |
| 2659 checkUnnamed1944(o.dimensionFilters); | |
| 2660 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2661 checkUnnamed1945(o.metrics); | |
| 2662 checkUnnamed1946(o.overlapMetrics); | |
| 2663 } | |
| 2664 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2665 } | |
| 2666 | |
| 2667 buildUnnamed1947() { | |
| 2668 var o = new core.List<api.DimensionValue>(); | |
| 2669 o.add(buildDimensionValue()); | |
| 2670 o.add(buildDimensionValue()); | |
| 2671 return o; | |
| 2672 } | |
| 2673 | |
| 2674 checkUnnamed1947(core.List<api.DimensionValue> o) { | |
| 2675 unittest.expect(o, unittest.hasLength(2)); | |
| 2676 checkDimensionValue(o[0]); | |
| 2677 checkDimensionValue(o[1]); | |
| 2678 } | |
| 2679 | |
| 2680 core.int buildCounterCustomRichMediaEvents = 0; | |
| 2681 buildCustomRichMediaEvents() { | |
| 2682 var o = new api.CustomRichMediaEvents(); | |
| 2683 buildCounterCustomRichMediaEvents++; | |
| 2684 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2685 o.filteredEventIds = buildUnnamed1947(); | |
| 2686 o.kind = "foo"; | |
| 2687 } | |
| 2688 buildCounterCustomRichMediaEvents--; | |
| 2689 return o; | |
| 2690 } | |
| 2691 | |
| 2692 checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { | |
| 2693 buildCounterCustomRichMediaEvents++; | |
| 2694 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2695 checkUnnamed1947(o.filteredEventIds); | |
| 2696 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2697 } | |
| 2698 buildCounterCustomRichMediaEvents--; | |
| 2699 } | |
| 2700 | |
| 2701 core.int buildCounterDateRange = 0; | |
| 2702 buildDateRange() { | |
| 2703 var o = new api.DateRange(); | |
| 2704 buildCounterDateRange++; | |
| 2705 if (buildCounterDateRange < 3) { | |
| 2706 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2707 o.kind = "foo"; | |
| 2708 o.relativeDateRange = "foo"; | |
| 2709 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2710 } | |
| 2711 buildCounterDateRange--; | |
| 2712 return o; | |
| 2713 } | |
| 2714 | |
| 2715 checkDateRange(api.DateRange o) { | |
| 2716 buildCounterDateRange++; | |
| 2717 if (buildCounterDateRange < 3) { | |
| 2718 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2719 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2720 unittest.expect(o.relativeDateRange, unittest.equals('foo')); | |
| 2721 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2722 } | |
| 2723 buildCounterDateRange--; | |
| 2724 } | |
| 2725 | |
| 2726 buildUnnamed1948() { | |
| 2727 var o = new core.List<core.String>(); | |
| 2728 o.add("foo"); | |
| 2729 o.add("foo"); | |
| 2730 return o; | |
| 2731 } | |
| 2732 | |
| 2733 checkUnnamed1948(core.List<core.String> o) { | |
| 2734 unittest.expect(o, unittest.hasLength(2)); | |
| 2735 unittest.expect(o[0], unittest.equals('foo')); | |
| 2736 unittest.expect(o[1], unittest.equals('foo')); | |
| 2737 } | |
| 2738 | |
| 2739 buildUnnamed1949() { | |
| 2740 var o = new core.List<core.int>(); | |
| 2741 o.add(42); | |
| 2742 o.add(42); | |
| 2743 return o; | |
| 2744 } | |
| 2745 | |
| 2746 checkUnnamed1949(core.List<core.int> o) { | |
| 2747 unittest.expect(o, unittest.hasLength(2)); | |
| 2748 unittest.expect(o[0], unittest.equals(42)); | |
| 2749 unittest.expect(o[1], unittest.equals(42)); | |
| 2750 } | |
| 2751 | |
| 2752 core.int buildCounterDayPartTargeting = 0; | |
| 2753 buildDayPartTargeting() { | |
| 2754 var o = new api.DayPartTargeting(); | |
| 2755 buildCounterDayPartTargeting++; | |
| 2756 if (buildCounterDayPartTargeting < 3) { | |
| 2757 o.daysOfWeek = buildUnnamed1948(); | |
| 2758 o.hoursOfDay = buildUnnamed1949(); | |
| 2759 o.userLocalTime = true; | |
| 2760 } | |
| 2761 buildCounterDayPartTargeting--; | |
| 2762 return o; | |
| 2763 } | |
| 2764 | |
| 2765 checkDayPartTargeting(api.DayPartTargeting o) { | |
| 2766 buildCounterDayPartTargeting++; | |
| 2767 if (buildCounterDayPartTargeting < 3) { | |
| 2768 checkUnnamed1948(o.daysOfWeek); | |
| 2769 checkUnnamed1949(o.hoursOfDay); | |
| 2770 unittest.expect(o.userLocalTime, unittest.isTrue); | |
| 2771 } | |
| 2772 buildCounterDayPartTargeting--; | |
| 2773 } | |
| 2774 | |
| 2775 core.int buildCounterDefaultClickThroughEventTagProperties = 0; | |
| 2776 buildDefaultClickThroughEventTagProperties() { | |
| 2777 var o = new api.DefaultClickThroughEventTagProperties(); | |
| 2778 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2779 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2780 o.defaultClickThroughEventTagId = "foo"; | |
| 2781 o.overrideInheritedEventTag = true; | |
| 2782 } | |
| 2783 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2784 return o; | |
| 2785 } | |
| 2786 | |
| 2787 checkDefaultClickThroughEventTagProperties(api.DefaultClickThroughEventTagProper
ties o) { | |
| 2788 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2789 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2790 unittest.expect(o.defaultClickThroughEventTagId, unittest.equals('foo')); | |
| 2791 unittest.expect(o.overrideInheritedEventTag, unittest.isTrue); | |
| 2792 } | |
| 2793 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2794 } | |
| 2795 | |
| 2796 core.int buildCounterDeliverySchedule = 0; | |
| 2797 buildDeliverySchedule() { | |
| 2798 var o = new api.DeliverySchedule(); | |
| 2799 buildCounterDeliverySchedule++; | |
| 2800 if (buildCounterDeliverySchedule < 3) { | |
| 2801 o.frequencyCap = buildFrequencyCap(); | |
| 2802 o.hardCutoff = true; | |
| 2803 o.impressionRatio = "foo"; | |
| 2804 o.priority = "foo"; | |
| 2805 } | |
| 2806 buildCounterDeliverySchedule--; | |
| 2807 return o; | |
| 2808 } | |
| 2809 | |
| 2810 checkDeliverySchedule(api.DeliverySchedule o) { | |
| 2811 buildCounterDeliverySchedule++; | |
| 2812 if (buildCounterDeliverySchedule < 3) { | |
| 2813 checkFrequencyCap(o.frequencyCap); | |
| 2814 unittest.expect(o.hardCutoff, unittest.isTrue); | |
| 2815 unittest.expect(o.impressionRatio, unittest.equals('foo')); | |
| 2816 unittest.expect(o.priority, unittest.equals('foo')); | |
| 2817 } | |
| 2818 buildCounterDeliverySchedule--; | |
| 2819 } | |
| 2820 | |
| 2821 core.int buildCounterDfpSettings = 0; | |
| 2822 buildDfpSettings() { | |
| 2823 var o = new api.DfpSettings(); | |
| 2824 buildCounterDfpSettings++; | |
| 2825 if (buildCounterDfpSettings < 3) { | |
| 2826 o.dfpNetworkCode = "foo"; | |
| 2827 o.dfpNetworkName = "foo"; | |
| 2828 o.programmaticPlacementAccepted = true; | |
| 2829 o.pubPaidPlacementAccepted = true; | |
| 2830 o.publisherPortalOnly = true; | |
| 2831 } | |
| 2832 buildCounterDfpSettings--; | |
| 2833 return o; | |
| 2834 } | |
| 2835 | |
| 2836 checkDfpSettings(api.DfpSettings o) { | |
| 2837 buildCounterDfpSettings++; | |
| 2838 if (buildCounterDfpSettings < 3) { | |
| 2839 unittest.expect(o.dfpNetworkCode, unittest.equals('foo')); | |
| 2840 unittest.expect(o.dfpNetworkName, unittest.equals('foo')); | |
| 2841 unittest.expect(o.programmaticPlacementAccepted, unittest.isTrue); | |
| 2842 unittest.expect(o.pubPaidPlacementAccepted, unittest.isTrue); | |
| 2843 unittest.expect(o.publisherPortalOnly, unittest.isTrue); | |
| 2844 } | |
| 2845 buildCounterDfpSettings--; | |
| 2846 } | |
| 2847 | |
| 2848 core.int buildCounterDimension = 0; | |
| 2849 buildDimension() { | |
| 2850 var o = new api.Dimension(); | |
| 2851 buildCounterDimension++; | |
| 2852 if (buildCounterDimension < 3) { | |
| 2853 o.kind = "foo"; | |
| 2854 o.name = "foo"; | |
| 2855 } | |
| 2856 buildCounterDimension--; | |
| 2857 return o; | |
| 2858 } | |
| 2859 | |
| 2860 checkDimension(api.Dimension o) { | |
| 2861 buildCounterDimension++; | |
| 2862 if (buildCounterDimension < 3) { | |
| 2863 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2864 unittest.expect(o.name, unittest.equals('foo')); | |
| 2865 } | |
| 2866 buildCounterDimension--; | |
| 2867 } | |
| 2868 | |
| 2869 core.int buildCounterDimensionFilter = 0; | |
| 2870 buildDimensionFilter() { | |
| 2871 var o = new api.DimensionFilter(); | |
| 2872 buildCounterDimensionFilter++; | |
| 2873 if (buildCounterDimensionFilter < 3) { | |
| 2874 o.dimensionName = "foo"; | |
| 2875 o.kind = "foo"; | |
| 2876 o.value = "foo"; | |
| 2877 } | |
| 2878 buildCounterDimensionFilter--; | |
| 2879 return o; | |
| 2880 } | |
| 2881 | |
| 2882 checkDimensionFilter(api.DimensionFilter o) { | |
| 2883 buildCounterDimensionFilter++; | |
| 2884 if (buildCounterDimensionFilter < 3) { | |
| 2885 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2886 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2887 unittest.expect(o.value, unittest.equals('foo')); | |
| 2888 } | |
| 2889 buildCounterDimensionFilter--; | |
| 2890 } | |
| 2891 | |
| 2892 core.int buildCounterDimensionValue = 0; | |
| 2893 buildDimensionValue() { | |
| 2894 var o = new api.DimensionValue(); | |
| 2895 buildCounterDimensionValue++; | |
| 2896 if (buildCounterDimensionValue < 3) { | |
| 2897 o.dimensionName = "foo"; | |
| 2898 o.etag = "foo"; | |
| 2899 o.id = "foo"; | |
| 2900 o.kind = "foo"; | |
| 2901 o.matchType = "foo"; | |
| 2902 o.value = "foo"; | |
| 2903 } | |
| 2904 buildCounterDimensionValue--; | |
| 2905 return o; | |
| 2906 } | |
| 2907 | |
| 2908 checkDimensionValue(api.DimensionValue o) { | |
| 2909 buildCounterDimensionValue++; | |
| 2910 if (buildCounterDimensionValue < 3) { | |
| 2911 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2912 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2913 unittest.expect(o.id, unittest.equals('foo')); | |
| 2914 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2915 unittest.expect(o.matchType, unittest.equals('foo')); | |
| 2916 unittest.expect(o.value, unittest.equals('foo')); | |
| 2917 } | |
| 2918 buildCounterDimensionValue--; | |
| 2919 } | |
| 2920 | |
| 2921 buildUnnamed1950() { | |
| 2922 var o = new core.List<api.DimensionValue>(); | |
| 2923 o.add(buildDimensionValue()); | |
| 2924 o.add(buildDimensionValue()); | |
| 2925 return o; | |
| 2926 } | |
| 2927 | |
| 2928 checkUnnamed1950(core.List<api.DimensionValue> o) { | |
| 2929 unittest.expect(o, unittest.hasLength(2)); | |
| 2930 checkDimensionValue(o[0]); | |
| 2931 checkDimensionValue(o[1]); | |
| 2932 } | |
| 2933 | |
| 2934 core.int buildCounterDimensionValueList = 0; | |
| 2935 buildDimensionValueList() { | |
| 2936 var o = new api.DimensionValueList(); | |
| 2937 buildCounterDimensionValueList++; | |
| 2938 if (buildCounterDimensionValueList < 3) { | |
| 2939 o.etag = "foo"; | |
| 2940 o.items = buildUnnamed1950(); | |
| 2941 o.kind = "foo"; | |
| 2942 o.nextPageToken = "foo"; | |
| 2943 } | |
| 2944 buildCounterDimensionValueList--; | |
| 2945 return o; | |
| 2946 } | |
| 2947 | |
| 2948 checkDimensionValueList(api.DimensionValueList o) { | |
| 2949 buildCounterDimensionValueList++; | |
| 2950 if (buildCounterDimensionValueList < 3) { | |
| 2951 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2952 checkUnnamed1950(o.items); | |
| 2953 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2954 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2955 } | |
| 2956 buildCounterDimensionValueList--; | |
| 2957 } | |
| 2958 | |
| 2959 buildUnnamed1951() { | |
| 2960 var o = new core.List<api.DimensionFilter>(); | |
| 2961 o.add(buildDimensionFilter()); | |
| 2962 o.add(buildDimensionFilter()); | |
| 2963 return o; | |
| 2964 } | |
| 2965 | |
| 2966 checkUnnamed1951(core.List<api.DimensionFilter> o) { | |
| 2967 unittest.expect(o, unittest.hasLength(2)); | |
| 2968 checkDimensionFilter(o[0]); | |
| 2969 checkDimensionFilter(o[1]); | |
| 2970 } | |
| 2971 | |
| 2972 core.int buildCounterDimensionValueRequest = 0; | |
| 2973 buildDimensionValueRequest() { | |
| 2974 var o = new api.DimensionValueRequest(); | |
| 2975 buildCounterDimensionValueRequest++; | |
| 2976 if (buildCounterDimensionValueRequest < 3) { | |
| 2977 o.dimensionName = "foo"; | |
| 2978 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2979 o.filters = buildUnnamed1951(); | |
| 2980 o.kind = "foo"; | |
| 2981 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2982 } | |
| 2983 buildCounterDimensionValueRequest--; | |
| 2984 return o; | |
| 2985 } | |
| 2986 | |
| 2987 checkDimensionValueRequest(api.DimensionValueRequest o) { | |
| 2988 buildCounterDimensionValueRequest++; | |
| 2989 if (buildCounterDimensionValueRequest < 3) { | |
| 2990 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2991 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2992 checkUnnamed1951(o.filters); | |
| 2993 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2994 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2995 } | |
| 2996 buildCounterDimensionValueRequest--; | |
| 2997 } | |
| 2998 | |
| 2999 buildUnnamed1952() { | |
| 3000 var o = new core.List<api.DirectorySiteContactAssignment>(); | |
| 3001 o.add(buildDirectorySiteContactAssignment()); | |
| 3002 o.add(buildDirectorySiteContactAssignment()); | |
| 3003 return o; | |
| 3004 } | |
| 3005 | |
| 3006 checkUnnamed1952(core.List<api.DirectorySiteContactAssignment> o) { | |
| 3007 unittest.expect(o, unittest.hasLength(2)); | |
| 3008 checkDirectorySiteContactAssignment(o[0]); | |
| 3009 checkDirectorySiteContactAssignment(o[1]); | |
| 3010 } | |
| 3011 | |
| 3012 buildUnnamed1953() { | |
| 3013 var o = new core.List<core.String>(); | |
| 3014 o.add("foo"); | |
| 3015 o.add("foo"); | |
| 3016 return o; | |
| 3017 } | |
| 3018 | |
| 3019 checkUnnamed1953(core.List<core.String> o) { | |
| 3020 unittest.expect(o, unittest.hasLength(2)); | |
| 3021 unittest.expect(o[0], unittest.equals('foo')); | |
| 3022 unittest.expect(o[1], unittest.equals('foo')); | |
| 3023 } | |
| 3024 | |
| 3025 buildUnnamed1954() { | |
| 3026 var o = new core.List<core.String>(); | |
| 3027 o.add("foo"); | |
| 3028 o.add("foo"); | |
| 3029 return o; | |
| 3030 } | |
| 3031 | |
| 3032 checkUnnamed1954(core.List<core.String> o) { | |
| 3033 unittest.expect(o, unittest.hasLength(2)); | |
| 3034 unittest.expect(o[0], unittest.equals('foo')); | |
| 3035 unittest.expect(o[1], unittest.equals('foo')); | |
| 3036 } | |
| 3037 | |
| 3038 core.int buildCounterDirectorySite = 0; | |
| 3039 buildDirectorySite() { | |
| 3040 var o = new api.DirectorySite(); | |
| 3041 buildCounterDirectorySite++; | |
| 3042 if (buildCounterDirectorySite < 3) { | |
| 3043 o.active = true; | |
| 3044 o.contactAssignments = buildUnnamed1952(); | |
| 3045 o.countryId = "foo"; | |
| 3046 o.currencyId = "foo"; | |
| 3047 o.description = "foo"; | |
| 3048 o.id = "foo"; | |
| 3049 o.idDimensionValue = buildDimensionValue(); | |
| 3050 o.inpageTagFormats = buildUnnamed1953(); | |
| 3051 o.interstitialTagFormats = buildUnnamed1954(); | |
| 3052 o.kind = "foo"; | |
| 3053 o.name = "foo"; | |
| 3054 o.parentId = "foo"; | |
| 3055 o.settings = buildDirectorySiteSettings(); | |
| 3056 o.url = "foo"; | |
| 3057 } | |
| 3058 buildCounterDirectorySite--; | |
| 3059 return o; | |
| 3060 } | |
| 3061 | |
| 3062 checkDirectorySite(api.DirectorySite o) { | |
| 3063 buildCounterDirectorySite++; | |
| 3064 if (buildCounterDirectorySite < 3) { | |
| 3065 unittest.expect(o.active, unittest.isTrue); | |
| 3066 checkUnnamed1952(o.contactAssignments); | |
| 3067 unittest.expect(o.countryId, unittest.equals('foo')); | |
| 3068 unittest.expect(o.currencyId, unittest.equals('foo')); | |
| 3069 unittest.expect(o.description, unittest.equals('foo')); | |
| 3070 unittest.expect(o.id, unittest.equals('foo')); | |
| 3071 checkDimensionValue(o.idDimensionValue); | |
| 3072 checkUnnamed1953(o.inpageTagFormats); | |
| 3073 checkUnnamed1954(o.interstitialTagFormats); | |
| 3074 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3075 unittest.expect(o.name, unittest.equals('foo')); | |
| 3076 unittest.expect(o.parentId, unittest.equals('foo')); | |
| 3077 checkDirectorySiteSettings(o.settings); | |
| 3078 unittest.expect(o.url, unittest.equals('foo')); | |
| 3079 } | |
| 3080 buildCounterDirectorySite--; | |
| 3081 } | |
| 3082 | |
| 3083 core.int buildCounterDirectorySiteContact = 0; | |
| 3084 buildDirectorySiteContact() { | |
| 3085 var o = new api.DirectorySiteContact(); | |
| 3086 buildCounterDirectorySiteContact++; | |
| 3087 if (buildCounterDirectorySiteContact < 3) { | |
| 3088 o.address = "foo"; | |
| 3089 o.email = "foo"; | |
| 3090 o.firstName = "foo"; | |
| 3091 o.id = "foo"; | |
| 3092 o.kind = "foo"; | |
| 3093 o.lastName = "foo"; | |
| 3094 o.phone = "foo"; | |
| 3095 o.role = "foo"; | |
| 3096 o.title = "foo"; | |
| 3097 o.type = "foo"; | |
| 3098 } | |
| 3099 buildCounterDirectorySiteContact--; | |
| 3100 return o; | |
| 3101 } | |
| 3102 | |
| 3103 checkDirectorySiteContact(api.DirectorySiteContact o) { | |
| 3104 buildCounterDirectorySiteContact++; | |
| 3105 if (buildCounterDirectorySiteContact < 3) { | |
| 3106 unittest.expect(o.address, unittest.equals('foo')); | |
| 3107 unittest.expect(o.email, unittest.equals('foo')); | |
| 3108 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 3109 unittest.expect(o.id, unittest.equals('foo')); | |
| 3110 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3111 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 3112 unittest.expect(o.phone, unittest.equals('foo')); | |
| 3113 unittest.expect(o.role, unittest.equals('foo')); | |
| 3114 unittest.expect(o.title, unittest.equals('foo')); | |
| 3115 unittest.expect(o.type, unittest.equals('foo')); | |
| 3116 } | |
| 3117 buildCounterDirectorySiteContact--; | |
| 3118 } | |
| 3119 | |
| 3120 core.int buildCounterDirectorySiteContactAssignment = 0; | |
| 3121 buildDirectorySiteContactAssignment() { | |
| 3122 var o = new api.DirectorySiteContactAssignment(); | |
| 3123 buildCounterDirectorySiteContactAssignment++; | |
| 3124 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3125 o.contactId = "foo"; | |
| 3126 o.visibility = "foo"; | |
| 3127 } | |
| 3128 buildCounterDirectorySiteContactAssignment--; | |
| 3129 return o; | |
| 3130 } | |
| 3131 | |
| 3132 checkDirectorySiteContactAssignment(api.DirectorySiteContactAssignment o) { | |
| 3133 buildCounterDirectorySiteContactAssignment++; | |
| 3134 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3135 unittest.expect(o.contactId, unittest.equals('foo')); | |
| 3136 unittest.expect(o.visibility, unittest.equals('foo')); | |
| 3137 } | |
| 3138 buildCounterDirectorySiteContactAssignment--; | |
| 3139 } | |
| 3140 | |
| 3141 buildUnnamed1955() { | |
| 3142 var o = new core.List<api.DirectorySiteContact>(); | |
| 3143 o.add(buildDirectorySiteContact()); | |
| 3144 o.add(buildDirectorySiteContact()); | |
| 3145 return o; | |
| 3146 } | |
| 3147 | |
| 3148 checkUnnamed1955(core.List<api.DirectorySiteContact> o) { | |
| 3149 unittest.expect(o, unittest.hasLength(2)); | |
| 3150 checkDirectorySiteContact(o[0]); | |
| 3151 checkDirectorySiteContact(o[1]); | |
| 3152 } | |
| 3153 | |
| 3154 core.int buildCounterDirectorySiteContactsListResponse = 0; | |
| 3155 buildDirectorySiteContactsListResponse() { | |
| 3156 var o = new api.DirectorySiteContactsListResponse(); | |
| 3157 buildCounterDirectorySiteContactsListResponse++; | |
| 3158 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3159 o.directorySiteContacts = buildUnnamed1955(); | |
| 3160 o.kind = "foo"; | |
| 3161 o.nextPageToken = "foo"; | |
| 3162 } | |
| 3163 buildCounterDirectorySiteContactsListResponse--; | |
| 3164 return o; | |
| 3165 } | |
| 3166 | |
| 3167 checkDirectorySiteContactsListResponse(api.DirectorySiteContactsListResponse o)
{ | |
| 3168 buildCounterDirectorySiteContactsListResponse++; | |
| 3169 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3170 checkUnnamed1955(o.directorySiteContacts); | |
| 3171 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3172 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3173 } | |
| 3174 buildCounterDirectorySiteContactsListResponse--; | |
| 3175 } | |
| 3176 | |
| 3177 core.int buildCounterDirectorySiteSettings = 0; | |
| 3178 buildDirectorySiteSettings() { | |
| 3179 var o = new api.DirectorySiteSettings(); | |
| 3180 buildCounterDirectorySiteSettings++; | |
| 3181 if (buildCounterDirectorySiteSettings < 3) { | |
| 3182 o.activeViewOptOut = true; | |
| 3183 o.dfpSettings = buildDfpSettings(); | |
| 3184 o.instreamVideoPlacementAccepted = true; | |
| 3185 o.interstitialPlacementAccepted = true; | |
| 3186 o.nielsenOcrOptOut = true; | |
| 3187 o.verificationTagOptOut = true; | |
| 3188 o.videoActiveViewOptOut = true; | |
| 3189 } | |
| 3190 buildCounterDirectorySiteSettings--; | |
| 3191 return o; | |
| 3192 } | |
| 3193 | |
| 3194 checkDirectorySiteSettings(api.DirectorySiteSettings o) { | |
| 3195 buildCounterDirectorySiteSettings++; | |
| 3196 if (buildCounterDirectorySiteSettings < 3) { | |
| 3197 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 3198 checkDfpSettings(o.dfpSettings); | |
| 3199 unittest.expect(o.instreamVideoPlacementAccepted, unittest.isTrue); | |
| 3200 unittest.expect(o.interstitialPlacementAccepted, unittest.isTrue); | |
| 3201 unittest.expect(o.nielsenOcrOptOut, unittest.isTrue); | |
| 3202 unittest.expect(o.verificationTagOptOut, unittest.isTrue); | |
| 3203 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 3204 } | |
| 3205 buildCounterDirectorySiteSettings--; | |
| 3206 } | |
| 3207 | |
| 3208 buildUnnamed1956() { | |
| 3209 var o = new core.List<api.DirectorySite>(); | |
| 3210 o.add(buildDirectorySite()); | |
| 3211 o.add(buildDirectorySite()); | |
| 3212 return o; | |
| 3213 } | |
| 3214 | |
| 3215 checkUnnamed1956(core.List<api.DirectorySite> o) { | |
| 3216 unittest.expect(o, unittest.hasLength(2)); | |
| 3217 checkDirectorySite(o[0]); | |
| 3218 checkDirectorySite(o[1]); | |
| 3219 } | |
| 3220 | |
| 3221 core.int buildCounterDirectorySitesListResponse = 0; | |
| 3222 buildDirectorySitesListResponse() { | |
| 3223 var o = new api.DirectorySitesListResponse(); | |
| 3224 buildCounterDirectorySitesListResponse++; | |
| 3225 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3226 o.directorySites = buildUnnamed1956(); | |
| 3227 o.kind = "foo"; | |
| 3228 o.nextPageToken = "foo"; | |
| 3229 } | |
| 3230 buildCounterDirectorySitesListResponse--; | |
| 3231 return o; | |
| 3232 } | |
| 3233 | |
| 3234 checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { | |
| 3235 buildCounterDirectorySitesListResponse++; | |
| 3236 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3237 checkUnnamed1956(o.directorySites); | |
| 3238 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3239 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3240 } | |
| 3241 buildCounterDirectorySitesListResponse--; | |
| 3242 } | |
| 3243 | |
| 3244 buildUnnamed1957() { | |
| 3245 var o = new core.List<core.String>(); | |
| 3246 o.add("foo"); | |
| 3247 o.add("foo"); | |
| 3248 return o; | |
| 3249 } | |
| 3250 | |
| 3251 checkUnnamed1957(core.List<core.String> o) { | |
| 3252 unittest.expect(o, unittest.hasLength(2)); | |
| 3253 unittest.expect(o[0], unittest.equals('foo')); | |
| 3254 unittest.expect(o[1], unittest.equals('foo')); | |
| 3255 } | |
| 3256 | |
| 3257 core.int buildCounterEventTag = 0; | |
| 3258 buildEventTag() { | |
| 3259 var o = new api.EventTag(); | |
| 3260 buildCounterEventTag++; | |
| 3261 if (buildCounterEventTag < 3) { | |
| 3262 o.accountId = "foo"; | |
| 3263 o.advertiserId = "foo"; | |
| 3264 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3265 o.campaignId = "foo"; | |
| 3266 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 3267 o.enabledByDefault = true; | |
| 3268 o.excludeFromAdxRequests = true; | |
| 3269 o.id = "foo"; | |
| 3270 o.kind = "foo"; | |
| 3271 o.name = "foo"; | |
| 3272 o.siteFilterType = "foo"; | |
| 3273 o.siteIds = buildUnnamed1957(); | |
| 3274 o.sslCompliant = true; | |
| 3275 o.status = "foo"; | |
| 3276 o.subaccountId = "foo"; | |
| 3277 o.type = "foo"; | |
| 3278 o.url = "foo"; | |
| 3279 o.urlEscapeLevels = 42; | |
| 3280 } | |
| 3281 buildCounterEventTag--; | |
| 3282 return o; | |
| 3283 } | |
| 3284 | |
| 3285 checkEventTag(api.EventTag o) { | |
| 3286 buildCounterEventTag++; | |
| 3287 if (buildCounterEventTag < 3) { | |
| 3288 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3289 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3290 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3291 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 3292 checkDimensionValue(o.campaignIdDimensionValue); | |
| 3293 unittest.expect(o.enabledByDefault, unittest.isTrue); | |
| 3294 unittest.expect(o.excludeFromAdxRequests, unittest.isTrue); | |
| 3295 unittest.expect(o.id, unittest.equals('foo')); | |
| 3296 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3297 unittest.expect(o.name, unittest.equals('foo')); | |
| 3298 unittest.expect(o.siteFilterType, unittest.equals('foo')); | |
| 3299 checkUnnamed1957(o.siteIds); | |
| 3300 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3301 unittest.expect(o.status, unittest.equals('foo')); | |
| 3302 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3303 unittest.expect(o.type, unittest.equals('foo')); | |
| 3304 unittest.expect(o.url, unittest.equals('foo')); | |
| 3305 unittest.expect(o.urlEscapeLevels, unittest.equals(42)); | |
| 3306 } | |
| 3307 buildCounterEventTag--; | |
| 3308 } | |
| 3309 | |
| 3310 core.int buildCounterEventTagOverride = 0; | |
| 3311 buildEventTagOverride() { | |
| 3312 var o = new api.EventTagOverride(); | |
| 3313 buildCounterEventTagOverride++; | |
| 3314 if (buildCounterEventTagOverride < 3) { | |
| 3315 o.enabled = true; | |
| 3316 o.id = "foo"; | |
| 3317 } | |
| 3318 buildCounterEventTagOverride--; | |
| 3319 return o; | |
| 3320 } | |
| 3321 | |
| 3322 checkEventTagOverride(api.EventTagOverride o) { | |
| 3323 buildCounterEventTagOverride++; | |
| 3324 if (buildCounterEventTagOverride < 3) { | |
| 3325 unittest.expect(o.enabled, unittest.isTrue); | |
| 3326 unittest.expect(o.id, unittest.equals('foo')); | |
| 3327 } | |
| 3328 buildCounterEventTagOverride--; | |
| 3329 } | |
| 3330 | |
| 3331 buildUnnamed1958() { | |
| 3332 var o = new core.List<api.EventTag>(); | |
| 3333 o.add(buildEventTag()); | |
| 3334 o.add(buildEventTag()); | |
| 3335 return o; | |
| 3336 } | |
| 3337 | |
| 3338 checkUnnamed1958(core.List<api.EventTag> o) { | |
| 3339 unittest.expect(o, unittest.hasLength(2)); | |
| 3340 checkEventTag(o[0]); | |
| 3341 checkEventTag(o[1]); | |
| 3342 } | |
| 3343 | |
| 3344 core.int buildCounterEventTagsListResponse = 0; | |
| 3345 buildEventTagsListResponse() { | |
| 3346 var o = new api.EventTagsListResponse(); | |
| 3347 buildCounterEventTagsListResponse++; | |
| 3348 if (buildCounterEventTagsListResponse < 3) { | |
| 3349 o.eventTags = buildUnnamed1958(); | |
| 3350 o.kind = "foo"; | |
| 3351 } | |
| 3352 buildCounterEventTagsListResponse--; | |
| 3353 return o; | |
| 3354 } | |
| 3355 | |
| 3356 checkEventTagsListResponse(api.EventTagsListResponse o) { | |
| 3357 buildCounterEventTagsListResponse++; | |
| 3358 if (buildCounterEventTagsListResponse < 3) { | |
| 3359 checkUnnamed1958(o.eventTags); | |
| 3360 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3361 } | |
| 3362 buildCounterEventTagsListResponse--; | |
| 3363 } | |
| 3364 | |
| 3365 core.int buildCounterFileUrls = 0; | |
| 3366 buildFileUrls() { | |
| 3367 var o = new api.FileUrls(); | |
| 3368 buildCounterFileUrls++; | |
| 3369 if (buildCounterFileUrls < 3) { | |
| 3370 o.apiUrl = "foo"; | |
| 3371 o.browserUrl = "foo"; | |
| 3372 } | |
| 3373 buildCounterFileUrls--; | |
| 3374 return o; | |
| 3375 } | |
| 3376 | |
| 3377 checkFileUrls(api.FileUrls o) { | |
| 3378 buildCounterFileUrls++; | |
| 3379 if (buildCounterFileUrls < 3) { | |
| 3380 unittest.expect(o.apiUrl, unittest.equals('foo')); | |
| 3381 unittest.expect(o.browserUrl, unittest.equals('foo')); | |
| 3382 } | |
| 3383 buildCounterFileUrls--; | |
| 3384 } | |
| 3385 | |
| 3386 core.int buildCounterFile = 0; | |
| 3387 buildFile() { | |
| 3388 var o = new api.File(); | |
| 3389 buildCounterFile++; | |
| 3390 if (buildCounterFile < 3) { | |
| 3391 o.dateRange = buildDateRange(); | |
| 3392 o.etag = "foo"; | |
| 3393 o.fileName = "foo"; | |
| 3394 o.format = "foo"; | |
| 3395 o.id = "foo"; | |
| 3396 o.kind = "foo"; | |
| 3397 o.lastModifiedTime = "foo"; | |
| 3398 o.reportId = "foo"; | |
| 3399 o.status = "foo"; | |
| 3400 o.urls = buildFileUrls(); | |
| 3401 } | |
| 3402 buildCounterFile--; | |
| 3403 return o; | |
| 3404 } | |
| 3405 | |
| 3406 checkFile(api.File o) { | |
| 3407 buildCounterFile++; | |
| 3408 if (buildCounterFile < 3) { | |
| 3409 checkDateRange(o.dateRange); | |
| 3410 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3411 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 3412 unittest.expect(o.format, unittest.equals('foo')); | |
| 3413 unittest.expect(o.id, unittest.equals('foo')); | |
| 3414 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3415 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 3416 unittest.expect(o.reportId, unittest.equals('foo')); | |
| 3417 unittest.expect(o.status, unittest.equals('foo')); | |
| 3418 checkFileUrls(o.urls); | |
| 3419 } | |
| 3420 buildCounterFile--; | |
| 3421 } | |
| 3422 | |
| 3423 buildUnnamed1959() { | |
| 3424 var o = new core.List<api.File>(); | |
| 3425 o.add(buildFile()); | |
| 3426 o.add(buildFile()); | |
| 3427 return o; | |
| 3428 } | |
| 3429 | |
| 3430 checkUnnamed1959(core.List<api.File> o) { | |
| 3431 unittest.expect(o, unittest.hasLength(2)); | |
| 3432 checkFile(o[0]); | |
| 3433 checkFile(o[1]); | |
| 3434 } | |
| 3435 | |
| 3436 core.int buildCounterFileList = 0; | |
| 3437 buildFileList() { | |
| 3438 var o = new api.FileList(); | |
| 3439 buildCounterFileList++; | |
| 3440 if (buildCounterFileList < 3) { | |
| 3441 o.etag = "foo"; | |
| 3442 o.items = buildUnnamed1959(); | |
| 3443 o.kind = "foo"; | |
| 3444 o.nextPageToken = "foo"; | |
| 3445 } | |
| 3446 buildCounterFileList--; | |
| 3447 return o; | |
| 3448 } | |
| 3449 | |
| 3450 checkFileList(api.FileList o) { | |
| 3451 buildCounterFileList++; | |
| 3452 if (buildCounterFileList < 3) { | |
| 3453 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3454 checkUnnamed1959(o.items); | |
| 3455 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3456 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3457 } | |
| 3458 buildCounterFileList--; | |
| 3459 } | |
| 3460 | |
| 3461 core.int buildCounterFlight = 0; | |
| 3462 buildFlight() { | |
| 3463 var o = new api.Flight(); | |
| 3464 buildCounterFlight++; | |
| 3465 if (buildCounterFlight < 3) { | |
| 3466 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3467 o.rateOrCost = "foo"; | |
| 3468 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3469 o.units = "foo"; | |
| 3470 } | |
| 3471 buildCounterFlight--; | |
| 3472 return o; | |
| 3473 } | |
| 3474 | |
| 3475 checkFlight(api.Flight o) { | |
| 3476 buildCounterFlight++; | |
| 3477 if (buildCounterFlight < 3) { | |
| 3478 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 3479 unittest.expect(o.rateOrCost, unittest.equals('foo')); | |
| 3480 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 3481 unittest.expect(o.units, unittest.equals('foo')); | |
| 3482 } | |
| 3483 buildCounterFlight--; | |
| 3484 } | |
| 3485 | |
| 3486 core.int buildCounterFloodlightActivitiesGenerateTagResponse = 0; | |
| 3487 buildFloodlightActivitiesGenerateTagResponse() { | |
| 3488 var o = new api.FloodlightActivitiesGenerateTagResponse(); | |
| 3489 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3490 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3491 o.floodlightActivityTag = "foo"; | |
| 3492 o.kind = "foo"; | |
| 3493 } | |
| 3494 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3495 return o; | |
| 3496 } | |
| 3497 | |
| 3498 checkFloodlightActivitiesGenerateTagResponse(api.FloodlightActivitiesGenerateTag
Response o) { | |
| 3499 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3500 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3501 unittest.expect(o.floodlightActivityTag, unittest.equals('foo')); | |
| 3502 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3503 } | |
| 3504 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3505 } | |
| 3506 | |
| 3507 buildUnnamed1960() { | |
| 3508 var o = new core.List<api.FloodlightActivity>(); | |
| 3509 o.add(buildFloodlightActivity()); | |
| 3510 o.add(buildFloodlightActivity()); | |
| 3511 return o; | |
| 3512 } | |
| 3513 | |
| 3514 checkUnnamed1960(core.List<api.FloodlightActivity> o) { | |
| 3515 unittest.expect(o, unittest.hasLength(2)); | |
| 3516 checkFloodlightActivity(o[0]); | |
| 3517 checkFloodlightActivity(o[1]); | |
| 3518 } | |
| 3519 | |
| 3520 core.int buildCounterFloodlightActivitiesListResponse = 0; | |
| 3521 buildFloodlightActivitiesListResponse() { | |
| 3522 var o = new api.FloodlightActivitiesListResponse(); | |
| 3523 buildCounterFloodlightActivitiesListResponse++; | |
| 3524 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3525 o.floodlightActivities = buildUnnamed1960(); | |
| 3526 o.kind = "foo"; | |
| 3527 o.nextPageToken = "foo"; | |
| 3528 } | |
| 3529 buildCounterFloodlightActivitiesListResponse--; | |
| 3530 return o; | |
| 3531 } | |
| 3532 | |
| 3533 checkFloodlightActivitiesListResponse(api.FloodlightActivitiesListResponse o) { | |
| 3534 buildCounterFloodlightActivitiesListResponse++; | |
| 3535 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3536 checkUnnamed1960(o.floodlightActivities); | |
| 3537 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3538 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3539 } | |
| 3540 buildCounterFloodlightActivitiesListResponse--; | |
| 3541 } | |
| 3542 | |
| 3543 buildUnnamed1961() { | |
| 3544 var o = new core.List<api.FloodlightActivityDynamicTag>(); | |
| 3545 o.add(buildFloodlightActivityDynamicTag()); | |
| 3546 o.add(buildFloodlightActivityDynamicTag()); | |
| 3547 return o; | |
| 3548 } | |
| 3549 | |
| 3550 checkUnnamed1961(core.List<api.FloodlightActivityDynamicTag> o) { | |
| 3551 unittest.expect(o, unittest.hasLength(2)); | |
| 3552 checkFloodlightActivityDynamicTag(o[0]); | |
| 3553 checkFloodlightActivityDynamicTag(o[1]); | |
| 3554 } | |
| 3555 | |
| 3556 buildUnnamed1962() { | |
| 3557 var o = new core.List<api.FloodlightActivityPublisherDynamicTag>(); | |
| 3558 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3559 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3560 return o; | |
| 3561 } | |
| 3562 | |
| 3563 checkUnnamed1962(core.List<api.FloodlightActivityPublisherDynamicTag> o) { | |
| 3564 unittest.expect(o, unittest.hasLength(2)); | |
| 3565 checkFloodlightActivityPublisherDynamicTag(o[0]); | |
| 3566 checkFloodlightActivityPublisherDynamicTag(o[1]); | |
| 3567 } | |
| 3568 | |
| 3569 buildUnnamed1963() { | |
| 3570 var o = new core.List<core.String>(); | |
| 3571 o.add("foo"); | |
| 3572 o.add("foo"); | |
| 3573 return o; | |
| 3574 } | |
| 3575 | |
| 3576 checkUnnamed1963(core.List<core.String> o) { | |
| 3577 unittest.expect(o, unittest.hasLength(2)); | |
| 3578 unittest.expect(o[0], unittest.equals('foo')); | |
| 3579 unittest.expect(o[1], unittest.equals('foo')); | |
| 3580 } | |
| 3581 | |
| 3582 core.int buildCounterFloodlightActivity = 0; | |
| 3583 buildFloodlightActivity() { | |
| 3584 var o = new api.FloodlightActivity(); | |
| 3585 buildCounterFloodlightActivity++; | |
| 3586 if (buildCounterFloodlightActivity < 3) { | |
| 3587 o.accountId = "foo"; | |
| 3588 o.advertiserId = "foo"; | |
| 3589 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3590 o.cacheBustingType = "foo"; | |
| 3591 o.countingMethod = "foo"; | |
| 3592 o.defaultTags = buildUnnamed1961(); | |
| 3593 o.expectedUrl = "foo"; | |
| 3594 o.floodlightActivityGroupId = "foo"; | |
| 3595 o.floodlightActivityGroupName = "foo"; | |
| 3596 o.floodlightActivityGroupTagString = "foo"; | |
| 3597 o.floodlightActivityGroupType = "foo"; | |
| 3598 o.floodlightConfigurationId = "foo"; | |
| 3599 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3600 o.hidden = true; | |
| 3601 o.id = "foo"; | |
| 3602 o.idDimensionValue = buildDimensionValue(); | |
| 3603 o.imageTagEnabled = true; | |
| 3604 o.kind = "foo"; | |
| 3605 o.name = "foo"; | |
| 3606 o.notes = "foo"; | |
| 3607 o.publisherTags = buildUnnamed1962(); | |
| 3608 o.secure = true; | |
| 3609 o.sslCompliant = true; | |
| 3610 o.sslRequired = true; | |
| 3611 o.subaccountId = "foo"; | |
| 3612 o.tagFormat = "foo"; | |
| 3613 o.tagString = "foo"; | |
| 3614 o.userDefinedVariableTypes = buildUnnamed1963(); | |
| 3615 } | |
| 3616 buildCounterFloodlightActivity--; | |
| 3617 return o; | |
| 3618 } | |
| 3619 | |
| 3620 checkFloodlightActivity(api.FloodlightActivity o) { | |
| 3621 buildCounterFloodlightActivity++; | |
| 3622 if (buildCounterFloodlightActivity < 3) { | |
| 3623 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3624 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3625 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3626 unittest.expect(o.cacheBustingType, unittest.equals('foo')); | |
| 3627 unittest.expect(o.countingMethod, unittest.equals('foo')); | |
| 3628 checkUnnamed1961(o.defaultTags); | |
| 3629 unittest.expect(o.expectedUrl, unittest.equals('foo')); | |
| 3630 unittest.expect(o.floodlightActivityGroupId, unittest.equals('foo')); | |
| 3631 unittest.expect(o.floodlightActivityGroupName, unittest.equals('foo')); | |
| 3632 unittest.expect(o.floodlightActivityGroupTagString, unittest.equals('foo')); | |
| 3633 unittest.expect(o.floodlightActivityGroupType, unittest.equals('foo')); | |
| 3634 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3635 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3636 unittest.expect(o.hidden, unittest.isTrue); | |
| 3637 unittest.expect(o.id, unittest.equals('foo')); | |
| 3638 checkDimensionValue(o.idDimensionValue); | |
| 3639 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 3640 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3641 unittest.expect(o.name, unittest.equals('foo')); | |
| 3642 unittest.expect(o.notes, unittest.equals('foo')); | |
| 3643 checkUnnamed1962(o.publisherTags); | |
| 3644 unittest.expect(o.secure, unittest.isTrue); | |
| 3645 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3646 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 3647 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3648 unittest.expect(o.tagFormat, unittest.equals('foo')); | |
| 3649 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3650 checkUnnamed1963(o.userDefinedVariableTypes); | |
| 3651 } | |
| 3652 buildCounterFloodlightActivity--; | |
| 3653 } | |
| 3654 | |
| 3655 core.int buildCounterFloodlightActivityDynamicTag = 0; | |
| 3656 buildFloodlightActivityDynamicTag() { | |
| 3657 var o = new api.FloodlightActivityDynamicTag(); | |
| 3658 buildCounterFloodlightActivityDynamicTag++; | |
| 3659 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3660 o.id = "foo"; | |
| 3661 o.name = "foo"; | |
| 3662 o.tag = "foo"; | |
| 3663 } | |
| 3664 buildCounterFloodlightActivityDynamicTag--; | |
| 3665 return o; | |
| 3666 } | |
| 3667 | |
| 3668 checkFloodlightActivityDynamicTag(api.FloodlightActivityDynamicTag o) { | |
| 3669 buildCounterFloodlightActivityDynamicTag++; | |
| 3670 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3671 unittest.expect(o.id, unittest.equals('foo')); | |
| 3672 unittest.expect(o.name, unittest.equals('foo')); | |
| 3673 unittest.expect(o.tag, unittest.equals('foo')); | |
| 3674 } | |
| 3675 buildCounterFloodlightActivityDynamicTag--; | |
| 3676 } | |
| 3677 | |
| 3678 core.int buildCounterFloodlightActivityGroup = 0; | |
| 3679 buildFloodlightActivityGroup() { | |
| 3680 var o = new api.FloodlightActivityGroup(); | |
| 3681 buildCounterFloodlightActivityGroup++; | |
| 3682 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3683 o.accountId = "foo"; | |
| 3684 o.advertiserId = "foo"; | |
| 3685 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3686 o.floodlightConfigurationId = "foo"; | |
| 3687 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3688 o.id = "foo"; | |
| 3689 o.idDimensionValue = buildDimensionValue(); | |
| 3690 o.kind = "foo"; | |
| 3691 o.name = "foo"; | |
| 3692 o.subaccountId = "foo"; | |
| 3693 o.tagString = "foo"; | |
| 3694 o.type = "foo"; | |
| 3695 } | |
| 3696 buildCounterFloodlightActivityGroup--; | |
| 3697 return o; | |
| 3698 } | |
| 3699 | |
| 3700 checkFloodlightActivityGroup(api.FloodlightActivityGroup o) { | |
| 3701 buildCounterFloodlightActivityGroup++; | |
| 3702 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3703 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3704 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3705 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3706 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3707 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3708 unittest.expect(o.id, unittest.equals('foo')); | |
| 3709 checkDimensionValue(o.idDimensionValue); | |
| 3710 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3711 unittest.expect(o.name, unittest.equals('foo')); | |
| 3712 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3713 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3714 unittest.expect(o.type, unittest.equals('foo')); | |
| 3715 } | |
| 3716 buildCounterFloodlightActivityGroup--; | |
| 3717 } | |
| 3718 | |
| 3719 buildUnnamed1964() { | |
| 3720 var o = new core.List<api.FloodlightActivityGroup>(); | |
| 3721 o.add(buildFloodlightActivityGroup()); | |
| 3722 o.add(buildFloodlightActivityGroup()); | |
| 3723 return o; | |
| 3724 } | |
| 3725 | |
| 3726 checkUnnamed1964(core.List<api.FloodlightActivityGroup> o) { | |
| 3727 unittest.expect(o, unittest.hasLength(2)); | |
| 3728 checkFloodlightActivityGroup(o[0]); | |
| 3729 checkFloodlightActivityGroup(o[1]); | |
| 3730 } | |
| 3731 | |
| 3732 core.int buildCounterFloodlightActivityGroupsListResponse = 0; | |
| 3733 buildFloodlightActivityGroupsListResponse() { | |
| 3734 var o = new api.FloodlightActivityGroupsListResponse(); | |
| 3735 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3736 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3737 o.floodlightActivityGroups = buildUnnamed1964(); | |
| 3738 o.kind = "foo"; | |
| 3739 o.nextPageToken = "foo"; | |
| 3740 } | |
| 3741 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3742 return o; | |
| 3743 } | |
| 3744 | |
| 3745 checkFloodlightActivityGroupsListResponse(api.FloodlightActivityGroupsListRespon
se o) { | |
| 3746 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3747 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3748 checkUnnamed1964(o.floodlightActivityGroups); | |
| 3749 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3750 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3751 } | |
| 3752 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3753 } | |
| 3754 | |
| 3755 core.int buildCounterFloodlightActivityPublisherDynamicTag = 0; | |
| 3756 buildFloodlightActivityPublisherDynamicTag() { | |
| 3757 var o = new api.FloodlightActivityPublisherDynamicTag(); | |
| 3758 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3759 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3760 o.clickThrough = true; | |
| 3761 o.directorySiteId = "foo"; | |
| 3762 o.dynamicTag = buildFloodlightActivityDynamicTag(); | |
| 3763 o.siteId = "foo"; | |
| 3764 o.siteIdDimensionValue = buildDimensionValue(); | |
| 3765 o.viewThrough = true; | |
| 3766 } | |
| 3767 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3768 return o; | |
| 3769 } | |
| 3770 | |
| 3771 checkFloodlightActivityPublisherDynamicTag(api.FloodlightActivityPublisherDynami
cTag o) { | |
| 3772 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3773 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3774 unittest.expect(o.clickThrough, unittest.isTrue); | |
| 3775 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 3776 checkFloodlightActivityDynamicTag(o.dynamicTag); | |
| 3777 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 3778 checkDimensionValue(o.siteIdDimensionValue); | |
| 3779 unittest.expect(o.viewThrough, unittest.isTrue); | |
| 3780 } | |
| 3781 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3782 } | |
| 3783 | |
| 3784 buildUnnamed1965() { | |
| 3785 var o = new core.List<core.String>(); | |
| 3786 o.add("foo"); | |
| 3787 o.add("foo"); | |
| 3788 return o; | |
| 3789 } | |
| 3790 | |
| 3791 checkUnnamed1965(core.List<core.String> o) { | |
| 3792 unittest.expect(o, unittest.hasLength(2)); | |
| 3793 unittest.expect(o[0], unittest.equals('foo')); | |
| 3794 unittest.expect(o[1], unittest.equals('foo')); | |
| 3795 } | |
| 3796 | |
| 3797 buildUnnamed1966() { | |
| 3798 var o = new core.List<api.ThirdPartyAuthenticationToken>(); | |
| 3799 o.add(buildThirdPartyAuthenticationToken()); | |
| 3800 o.add(buildThirdPartyAuthenticationToken()); | |
| 3801 return o; | |
| 3802 } | |
| 3803 | |
| 3804 checkUnnamed1966(core.List<api.ThirdPartyAuthenticationToken> o) { | |
| 3805 unittest.expect(o, unittest.hasLength(2)); | |
| 3806 checkThirdPartyAuthenticationToken(o[0]); | |
| 3807 checkThirdPartyAuthenticationToken(o[1]); | |
| 3808 } | |
| 3809 | |
| 3810 buildUnnamed1967() { | |
| 3811 var o = new core.List<api.UserDefinedVariableConfiguration>(); | |
| 3812 o.add(buildUserDefinedVariableConfiguration()); | |
| 3813 o.add(buildUserDefinedVariableConfiguration()); | |
| 3814 return o; | |
| 3815 } | |
| 3816 | |
| 3817 checkUnnamed1967(core.List<api.UserDefinedVariableConfiguration> o) { | |
| 3818 unittest.expect(o, unittest.hasLength(2)); | |
| 3819 checkUserDefinedVariableConfiguration(o[0]); | |
| 3820 checkUserDefinedVariableConfiguration(o[1]); | |
| 3821 } | |
| 3822 | |
| 3823 core.int buildCounterFloodlightConfiguration = 0; | |
| 3824 buildFloodlightConfiguration() { | |
| 3825 var o = new api.FloodlightConfiguration(); | |
| 3826 buildCounterFloodlightConfiguration++; | |
| 3827 if (buildCounterFloodlightConfiguration < 3) { | |
| 3828 o.accountId = "foo"; | |
| 3829 o.advertiserId = "foo"; | |
| 3830 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3831 o.analyticsDataSharingEnabled = true; | |
| 3832 o.exposureToConversionEnabled = true; | |
| 3833 o.firstDayOfWeek = "foo"; | |
| 3834 o.id = "foo"; | |
| 3835 o.idDimensionValue = buildDimensionValue(); | |
| 3836 o.inAppAttributionTrackingEnabled = true; | |
| 3837 o.kind = "foo"; | |
| 3838 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 3839 o.naturalSearchConversionAttributionOption = "foo"; | |
| 3840 o.omnitureSettings = buildOmnitureSettings(); | |
| 3841 o.standardVariableTypes = buildUnnamed1965(); | |
| 3842 o.subaccountId = "foo"; | |
| 3843 o.tagSettings = buildTagSettings(); | |
| 3844 o.thirdPartyAuthenticationTokens = buildUnnamed1966(); | |
| 3845 o.userDefinedVariableConfigurations = buildUnnamed1967(); | |
| 3846 } | |
| 3847 buildCounterFloodlightConfiguration--; | |
| 3848 return o; | |
| 3849 } | |
| 3850 | |
| 3851 checkFloodlightConfiguration(api.FloodlightConfiguration o) { | |
| 3852 buildCounterFloodlightConfiguration++; | |
| 3853 if (buildCounterFloodlightConfiguration < 3) { | |
| 3854 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3855 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3856 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3857 unittest.expect(o.analyticsDataSharingEnabled, unittest.isTrue); | |
| 3858 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 3859 unittest.expect(o.firstDayOfWeek, unittest.equals('foo')); | |
| 3860 unittest.expect(o.id, unittest.equals('foo')); | |
| 3861 checkDimensionValue(o.idDimensionValue); | |
| 3862 unittest.expect(o.inAppAttributionTrackingEnabled, unittest.isTrue); | |
| 3863 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3864 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 3865 unittest.expect(o.naturalSearchConversionAttributionOption, unittest.equals(
'foo')); | |
| 3866 checkOmnitureSettings(o.omnitureSettings); | |
| 3867 checkUnnamed1965(o.standardVariableTypes); | |
| 3868 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3869 checkTagSettings(o.tagSettings); | |
| 3870 checkUnnamed1966(o.thirdPartyAuthenticationTokens); | |
| 3871 checkUnnamed1967(o.userDefinedVariableConfigurations); | |
| 3872 } | |
| 3873 buildCounterFloodlightConfiguration--; | |
| 3874 } | |
| 3875 | |
| 3876 buildUnnamed1968() { | |
| 3877 var o = new core.List<api.FloodlightConfiguration>(); | |
| 3878 o.add(buildFloodlightConfiguration()); | |
| 3879 o.add(buildFloodlightConfiguration()); | |
| 3880 return o; | |
| 3881 } | |
| 3882 | |
| 3883 checkUnnamed1968(core.List<api.FloodlightConfiguration> o) { | |
| 3884 unittest.expect(o, unittest.hasLength(2)); | |
| 3885 checkFloodlightConfiguration(o[0]); | |
| 3886 checkFloodlightConfiguration(o[1]); | |
| 3887 } | |
| 3888 | |
| 3889 core.int buildCounterFloodlightConfigurationsListResponse = 0; | |
| 3890 buildFloodlightConfigurationsListResponse() { | |
| 3891 var o = new api.FloodlightConfigurationsListResponse(); | |
| 3892 buildCounterFloodlightConfigurationsListResponse++; | |
| 3893 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3894 o.floodlightConfigurations = buildUnnamed1968(); | |
| 3895 o.kind = "foo"; | |
| 3896 } | |
| 3897 buildCounterFloodlightConfigurationsListResponse--; | |
| 3898 return o; | |
| 3899 } | |
| 3900 | |
| 3901 checkFloodlightConfigurationsListResponse(api.FloodlightConfigurationsListRespon
se o) { | |
| 3902 buildCounterFloodlightConfigurationsListResponse++; | |
| 3903 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3904 checkUnnamed1968(o.floodlightConfigurations); | |
| 3905 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3906 } | |
| 3907 buildCounterFloodlightConfigurationsListResponse--; | |
| 3908 } | |
| 3909 | |
| 3910 buildUnnamed1969() { | |
| 3911 var o = new core.List<api.Dimension>(); | |
| 3912 o.add(buildDimension()); | |
| 3913 o.add(buildDimension()); | |
| 3914 return o; | |
| 3915 } | |
| 3916 | |
| 3917 checkUnnamed1969(core.List<api.Dimension> o) { | |
| 3918 unittest.expect(o, unittest.hasLength(2)); | |
| 3919 checkDimension(o[0]); | |
| 3920 checkDimension(o[1]); | |
| 3921 } | |
| 3922 | |
| 3923 buildUnnamed1970() { | |
| 3924 var o = new core.List<api.Dimension>(); | |
| 3925 o.add(buildDimension()); | |
| 3926 o.add(buildDimension()); | |
| 3927 return o; | |
| 3928 } | |
| 3929 | |
| 3930 checkUnnamed1970(core.List<api.Dimension> o) { | |
| 3931 unittest.expect(o, unittest.hasLength(2)); | |
| 3932 checkDimension(o[0]); | |
| 3933 checkDimension(o[1]); | |
| 3934 } | |
| 3935 | |
| 3936 buildUnnamed1971() { | |
| 3937 var o = new core.List<api.Metric>(); | |
| 3938 o.add(buildMetric()); | |
| 3939 o.add(buildMetric()); | |
| 3940 return o; | |
| 3941 } | |
| 3942 | |
| 3943 checkUnnamed1971(core.List<api.Metric> o) { | |
| 3944 unittest.expect(o, unittest.hasLength(2)); | |
| 3945 checkMetric(o[0]); | |
| 3946 checkMetric(o[1]); | |
| 3947 } | |
| 3948 | |
| 3949 core.int buildCounterFloodlightReportCompatibleFields = 0; | |
| 3950 buildFloodlightReportCompatibleFields() { | |
| 3951 var o = new api.FloodlightReportCompatibleFields(); | |
| 3952 buildCounterFloodlightReportCompatibleFields++; | |
| 3953 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3954 o.dimensionFilters = buildUnnamed1969(); | |
| 3955 o.dimensions = buildUnnamed1970(); | |
| 3956 o.kind = "foo"; | |
| 3957 o.metrics = buildUnnamed1971(); | |
| 3958 } | |
| 3959 buildCounterFloodlightReportCompatibleFields--; | |
| 3960 return o; | |
| 3961 } | |
| 3962 | |
| 3963 checkFloodlightReportCompatibleFields(api.FloodlightReportCompatibleFields o) { | |
| 3964 buildCounterFloodlightReportCompatibleFields++; | |
| 3965 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3966 checkUnnamed1969(o.dimensionFilters); | |
| 3967 checkUnnamed1970(o.dimensions); | |
| 3968 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3969 checkUnnamed1971(o.metrics); | |
| 3970 } | |
| 3971 buildCounterFloodlightReportCompatibleFields--; | |
| 3972 } | |
| 3973 | |
| 3974 core.int buildCounterFrequencyCap = 0; | |
| 3975 buildFrequencyCap() { | |
| 3976 var o = new api.FrequencyCap(); | |
| 3977 buildCounterFrequencyCap++; | |
| 3978 if (buildCounterFrequencyCap < 3) { | |
| 3979 o.duration = "foo"; | |
| 3980 o.impressions = "foo"; | |
| 3981 } | |
| 3982 buildCounterFrequencyCap--; | |
| 3983 return o; | |
| 3984 } | |
| 3985 | |
| 3986 checkFrequencyCap(api.FrequencyCap o) { | |
| 3987 buildCounterFrequencyCap++; | |
| 3988 if (buildCounterFrequencyCap < 3) { | |
| 3989 unittest.expect(o.duration, unittest.equals('foo')); | |
| 3990 unittest.expect(o.impressions, unittest.equals('foo')); | |
| 3991 } | |
| 3992 buildCounterFrequencyCap--; | |
| 3993 } | |
| 3994 | |
| 3995 core.int buildCounterFsCommand = 0; | |
| 3996 buildFsCommand() { | |
| 3997 var o = new api.FsCommand(); | |
| 3998 buildCounterFsCommand++; | |
| 3999 if (buildCounterFsCommand < 3) { | |
| 4000 o.left = 42; | |
| 4001 o.positionOption = "foo"; | |
| 4002 o.top = 42; | |
| 4003 o.windowHeight = 42; | |
| 4004 o.windowWidth = 42; | |
| 4005 } | |
| 4006 buildCounterFsCommand--; | |
| 4007 return o; | |
| 4008 } | |
| 4009 | |
| 4010 checkFsCommand(api.FsCommand o) { | |
| 4011 buildCounterFsCommand++; | |
| 4012 if (buildCounterFsCommand < 3) { | |
| 4013 unittest.expect(o.left, unittest.equals(42)); | |
| 4014 unittest.expect(o.positionOption, unittest.equals('foo')); | |
| 4015 unittest.expect(o.top, unittest.equals(42)); | |
| 4016 unittest.expect(o.windowHeight, unittest.equals(42)); | |
| 4017 unittest.expect(o.windowWidth, unittest.equals(42)); | |
| 4018 } | |
| 4019 buildCounterFsCommand--; | |
| 4020 } | |
| 4021 | |
| 4022 buildUnnamed1972() { | |
| 4023 var o = new core.List<api.City>(); | |
| 4024 o.add(buildCity()); | |
| 4025 o.add(buildCity()); | |
| 4026 return o; | |
| 4027 } | |
| 4028 | |
| 4029 checkUnnamed1972(core.List<api.City> o) { | |
| 4030 unittest.expect(o, unittest.hasLength(2)); | |
| 4031 checkCity(o[0]); | |
| 4032 checkCity(o[1]); | |
| 4033 } | |
| 4034 | |
| 4035 buildUnnamed1973() { | |
| 4036 var o = new core.List<api.Country>(); | |
| 4037 o.add(buildCountry()); | |
| 4038 o.add(buildCountry()); | |
| 4039 return o; | |
| 4040 } | |
| 4041 | |
| 4042 checkUnnamed1973(core.List<api.Country> o) { | |
| 4043 unittest.expect(o, unittest.hasLength(2)); | |
| 4044 checkCountry(o[0]); | |
| 4045 checkCountry(o[1]); | |
| 4046 } | |
| 4047 | |
| 4048 buildUnnamed1974() { | |
| 4049 var o = new core.List<api.Metro>(); | |
| 4050 o.add(buildMetro()); | |
| 4051 o.add(buildMetro()); | |
| 4052 return o; | |
| 4053 } | |
| 4054 | |
| 4055 checkUnnamed1974(core.List<api.Metro> o) { | |
| 4056 unittest.expect(o, unittest.hasLength(2)); | |
| 4057 checkMetro(o[0]); | |
| 4058 checkMetro(o[1]); | |
| 4059 } | |
| 4060 | |
| 4061 buildUnnamed1975() { | |
| 4062 var o = new core.List<api.PostalCode>(); | |
| 4063 o.add(buildPostalCode()); | |
| 4064 o.add(buildPostalCode()); | |
| 4065 return o; | |
| 4066 } | |
| 4067 | |
| 4068 checkUnnamed1975(core.List<api.PostalCode> o) { | |
| 4069 unittest.expect(o, unittest.hasLength(2)); | |
| 4070 checkPostalCode(o[0]); | |
| 4071 checkPostalCode(o[1]); | |
| 4072 } | |
| 4073 | |
| 4074 buildUnnamed1976() { | |
| 4075 var o = new core.List<api.Region>(); | |
| 4076 o.add(buildRegion()); | |
| 4077 o.add(buildRegion()); | |
| 4078 return o; | |
| 4079 } | |
| 4080 | |
| 4081 checkUnnamed1976(core.List<api.Region> o) { | |
| 4082 unittest.expect(o, unittest.hasLength(2)); | |
| 4083 checkRegion(o[0]); | |
| 4084 checkRegion(o[1]); | |
| 4085 } | |
| 4086 | |
| 4087 core.int buildCounterGeoTargeting = 0; | |
| 4088 buildGeoTargeting() { | |
| 4089 var o = new api.GeoTargeting(); | |
| 4090 buildCounterGeoTargeting++; | |
| 4091 if (buildCounterGeoTargeting < 3) { | |
| 4092 o.cities = buildUnnamed1972(); | |
| 4093 o.countries = buildUnnamed1973(); | |
| 4094 o.excludeCountries = true; | |
| 4095 o.metros = buildUnnamed1974(); | |
| 4096 o.postalCodes = buildUnnamed1975(); | |
| 4097 o.regions = buildUnnamed1976(); | |
| 4098 } | |
| 4099 buildCounterGeoTargeting--; | |
| 4100 return o; | |
| 4101 } | |
| 4102 | |
| 4103 checkGeoTargeting(api.GeoTargeting o) { | |
| 4104 buildCounterGeoTargeting++; | |
| 4105 if (buildCounterGeoTargeting < 3) { | |
| 4106 checkUnnamed1972(o.cities); | |
| 4107 checkUnnamed1973(o.countries); | |
| 4108 unittest.expect(o.excludeCountries, unittest.isTrue); | |
| 4109 checkUnnamed1974(o.metros); | |
| 4110 checkUnnamed1975(o.postalCodes); | |
| 4111 checkUnnamed1976(o.regions); | |
| 4112 } | |
| 4113 buildCounterGeoTargeting--; | |
| 4114 } | |
| 4115 | |
| 4116 buildUnnamed1977() { | |
| 4117 var o = new core.List<api.AdSlot>(); | |
| 4118 o.add(buildAdSlot()); | |
| 4119 o.add(buildAdSlot()); | |
| 4120 return o; | |
| 4121 } | |
| 4122 | |
| 4123 checkUnnamed1977(core.List<api.AdSlot> o) { | |
| 4124 unittest.expect(o, unittest.hasLength(2)); | |
| 4125 checkAdSlot(o[0]); | |
| 4126 checkAdSlot(o[1]); | |
| 4127 } | |
| 4128 | |
| 4129 core.int buildCounterInventoryItem = 0; | |
| 4130 buildInventoryItem() { | |
| 4131 var o = new api.InventoryItem(); | |
| 4132 buildCounterInventoryItem++; | |
| 4133 if (buildCounterInventoryItem < 3) { | |
| 4134 o.accountId = "foo"; | |
| 4135 o.adSlots = buildUnnamed1977(); | |
| 4136 o.advertiserId = "foo"; | |
| 4137 o.contentCategoryId = "foo"; | |
| 4138 o.estimatedClickThroughRate = "foo"; | |
| 4139 o.estimatedConversionRate = "foo"; | |
| 4140 o.id = "foo"; | |
| 4141 o.inPlan = true; | |
| 4142 o.kind = "foo"; | |
| 4143 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4144 o.name = "foo"; | |
| 4145 o.negotiationChannelId = "foo"; | |
| 4146 o.orderId = "foo"; | |
| 4147 o.placementStrategyId = "foo"; | |
| 4148 o.pricing = buildPricing(); | |
| 4149 o.projectId = "foo"; | |
| 4150 o.rfpId = "foo"; | |
| 4151 o.siteId = "foo"; | |
| 4152 o.subaccountId = "foo"; | |
| 4153 } | |
| 4154 buildCounterInventoryItem--; | |
| 4155 return o; | |
| 4156 } | |
| 4157 | |
| 4158 checkInventoryItem(api.InventoryItem o) { | |
| 4159 buildCounterInventoryItem++; | |
| 4160 if (buildCounterInventoryItem < 3) { | |
| 4161 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4162 checkUnnamed1977(o.adSlots); | |
| 4163 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4164 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 4165 unittest.expect(o.estimatedClickThroughRate, unittest.equals('foo')); | |
| 4166 unittest.expect(o.estimatedConversionRate, unittest.equals('foo')); | |
| 4167 unittest.expect(o.id, unittest.equals('foo')); | |
| 4168 unittest.expect(o.inPlan, unittest.isTrue); | |
| 4169 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4170 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4171 unittest.expect(o.name, unittest.equals('foo')); | |
| 4172 unittest.expect(o.negotiationChannelId, unittest.equals('foo')); | |
| 4173 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 4174 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 4175 checkPricing(o.pricing); | |
| 4176 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4177 unittest.expect(o.rfpId, unittest.equals('foo')); | |
| 4178 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 4179 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4180 } | |
| 4181 buildCounterInventoryItem--; | |
| 4182 } | |
| 4183 | |
| 4184 buildUnnamed1978() { | |
| 4185 var o = new core.List<api.InventoryItem>(); | |
| 4186 o.add(buildInventoryItem()); | |
| 4187 o.add(buildInventoryItem()); | |
| 4188 return o; | |
| 4189 } | |
| 4190 | |
| 4191 checkUnnamed1978(core.List<api.InventoryItem> o) { | |
| 4192 unittest.expect(o, unittest.hasLength(2)); | |
| 4193 checkInventoryItem(o[0]); | |
| 4194 checkInventoryItem(o[1]); | |
| 4195 } | |
| 4196 | |
| 4197 core.int buildCounterInventoryItemsListResponse = 0; | |
| 4198 buildInventoryItemsListResponse() { | |
| 4199 var o = new api.InventoryItemsListResponse(); | |
| 4200 buildCounterInventoryItemsListResponse++; | |
| 4201 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4202 o.inventoryItems = buildUnnamed1978(); | |
| 4203 o.kind = "foo"; | |
| 4204 o.nextPageToken = "foo"; | |
| 4205 } | |
| 4206 buildCounterInventoryItemsListResponse--; | |
| 4207 return o; | |
| 4208 } | |
| 4209 | |
| 4210 checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { | |
| 4211 buildCounterInventoryItemsListResponse++; | |
| 4212 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4213 checkUnnamed1978(o.inventoryItems); | |
| 4214 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4215 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 4216 } | |
| 4217 buildCounterInventoryItemsListResponse--; | |
| 4218 } | |
| 4219 | |
| 4220 core.int buildCounterKeyValueTargetingExpression = 0; | |
| 4221 buildKeyValueTargetingExpression() { | |
| 4222 var o = new api.KeyValueTargetingExpression(); | |
| 4223 buildCounterKeyValueTargetingExpression++; | |
| 4224 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4225 o.expression = "foo"; | |
| 4226 } | |
| 4227 buildCounterKeyValueTargetingExpression--; | |
| 4228 return o; | |
| 4229 } | |
| 4230 | |
| 4231 checkKeyValueTargetingExpression(api.KeyValueTargetingExpression o) { | |
| 4232 buildCounterKeyValueTargetingExpression++; | |
| 4233 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4234 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4235 } | |
| 4236 buildCounterKeyValueTargetingExpression--; | |
| 4237 } | |
| 4238 | |
| 4239 core.int buildCounterLandingPage = 0; | |
| 4240 buildLandingPage() { | |
| 4241 var o = new api.LandingPage(); | |
| 4242 buildCounterLandingPage++; | |
| 4243 if (buildCounterLandingPage < 3) { | |
| 4244 o.default_ = true; | |
| 4245 o.id = "foo"; | |
| 4246 o.kind = "foo"; | |
| 4247 o.name = "foo"; | |
| 4248 o.url = "foo"; | |
| 4249 } | |
| 4250 buildCounterLandingPage--; | |
| 4251 return o; | |
| 4252 } | |
| 4253 | |
| 4254 checkLandingPage(api.LandingPage o) { | |
| 4255 buildCounterLandingPage++; | |
| 4256 if (buildCounterLandingPage < 3) { | |
| 4257 unittest.expect(o.default_, unittest.isTrue); | |
| 4258 unittest.expect(o.id, unittest.equals('foo')); | |
| 4259 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4260 unittest.expect(o.name, unittest.equals('foo')); | |
| 4261 unittest.expect(o.url, unittest.equals('foo')); | |
| 4262 } | |
| 4263 buildCounterLandingPage--; | |
| 4264 } | |
| 4265 | |
| 4266 buildUnnamed1979() { | |
| 4267 var o = new core.List<api.LandingPage>(); | |
| 4268 o.add(buildLandingPage()); | |
| 4269 o.add(buildLandingPage()); | |
| 4270 return o; | |
| 4271 } | |
| 4272 | |
| 4273 checkUnnamed1979(core.List<api.LandingPage> o) { | |
| 4274 unittest.expect(o, unittest.hasLength(2)); | |
| 4275 checkLandingPage(o[0]); | |
| 4276 checkLandingPage(o[1]); | |
| 4277 } | |
| 4278 | |
| 4279 core.int buildCounterLandingPagesListResponse = 0; | |
| 4280 buildLandingPagesListResponse() { | |
| 4281 var o = new api.LandingPagesListResponse(); | |
| 4282 buildCounterLandingPagesListResponse++; | |
| 4283 if (buildCounterLandingPagesListResponse < 3) { | |
| 4284 o.kind = "foo"; | |
| 4285 o.landingPages = buildUnnamed1979(); | |
| 4286 } | |
| 4287 buildCounterLandingPagesListResponse--; | |
| 4288 return o; | |
| 4289 } | |
| 4290 | |
| 4291 checkLandingPagesListResponse(api.LandingPagesListResponse o) { | |
| 4292 buildCounterLandingPagesListResponse++; | |
| 4293 if (buildCounterLandingPagesListResponse < 3) { | |
| 4294 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4295 checkUnnamed1979(o.landingPages); | |
| 4296 } | |
| 4297 buildCounterLandingPagesListResponse--; | |
| 4298 } | |
| 4299 | |
| 4300 core.int buildCounterLastModifiedInfo = 0; | |
| 4301 buildLastModifiedInfo() { | |
| 4302 var o = new api.LastModifiedInfo(); | |
| 4303 buildCounterLastModifiedInfo++; | |
| 4304 if (buildCounterLastModifiedInfo < 3) { | |
| 4305 o.time = "foo"; | |
| 4306 } | |
| 4307 buildCounterLastModifiedInfo--; | |
| 4308 return o; | |
| 4309 } | |
| 4310 | |
| 4311 checkLastModifiedInfo(api.LastModifiedInfo o) { | |
| 4312 buildCounterLastModifiedInfo++; | |
| 4313 if (buildCounterLastModifiedInfo < 3) { | |
| 4314 unittest.expect(o.time, unittest.equals('foo')); | |
| 4315 } | |
| 4316 buildCounterLastModifiedInfo--; | |
| 4317 } | |
| 4318 | |
| 4319 buildUnnamed1980() { | |
| 4320 var o = new core.List<api.ListPopulationTerm>(); | |
| 4321 o.add(buildListPopulationTerm()); | |
| 4322 o.add(buildListPopulationTerm()); | |
| 4323 return o; | |
| 4324 } | |
| 4325 | |
| 4326 checkUnnamed1980(core.List<api.ListPopulationTerm> o) { | |
| 4327 unittest.expect(o, unittest.hasLength(2)); | |
| 4328 checkListPopulationTerm(o[0]); | |
| 4329 checkListPopulationTerm(o[1]); | |
| 4330 } | |
| 4331 | |
| 4332 core.int buildCounterListPopulationClause = 0; | |
| 4333 buildListPopulationClause() { | |
| 4334 var o = new api.ListPopulationClause(); | |
| 4335 buildCounterListPopulationClause++; | |
| 4336 if (buildCounterListPopulationClause < 3) { | |
| 4337 o.terms = buildUnnamed1980(); | |
| 4338 } | |
| 4339 buildCounterListPopulationClause--; | |
| 4340 return o; | |
| 4341 } | |
| 4342 | |
| 4343 checkListPopulationClause(api.ListPopulationClause o) { | |
| 4344 buildCounterListPopulationClause++; | |
| 4345 if (buildCounterListPopulationClause < 3) { | |
| 4346 checkUnnamed1980(o.terms); | |
| 4347 } | |
| 4348 buildCounterListPopulationClause--; | |
| 4349 } | |
| 4350 | |
| 4351 buildUnnamed1981() { | |
| 4352 var o = new core.List<api.ListPopulationClause>(); | |
| 4353 o.add(buildListPopulationClause()); | |
| 4354 o.add(buildListPopulationClause()); | |
| 4355 return o; | |
| 4356 } | |
| 4357 | |
| 4358 checkUnnamed1981(core.List<api.ListPopulationClause> o) { | |
| 4359 unittest.expect(o, unittest.hasLength(2)); | |
| 4360 checkListPopulationClause(o[0]); | |
| 4361 checkListPopulationClause(o[1]); | |
| 4362 } | |
| 4363 | |
| 4364 core.int buildCounterListPopulationRule = 0; | |
| 4365 buildListPopulationRule() { | |
| 4366 var o = new api.ListPopulationRule(); | |
| 4367 buildCounterListPopulationRule++; | |
| 4368 if (buildCounterListPopulationRule < 3) { | |
| 4369 o.floodlightActivityId = "foo"; | |
| 4370 o.floodlightActivityName = "foo"; | |
| 4371 o.listPopulationClauses = buildUnnamed1981(); | |
| 4372 } | |
| 4373 buildCounterListPopulationRule--; | |
| 4374 return o; | |
| 4375 } | |
| 4376 | |
| 4377 checkListPopulationRule(api.ListPopulationRule o) { | |
| 4378 buildCounterListPopulationRule++; | |
| 4379 if (buildCounterListPopulationRule < 3) { | |
| 4380 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4381 unittest.expect(o.floodlightActivityName, unittest.equals('foo')); | |
| 4382 checkUnnamed1981(o.listPopulationClauses); | |
| 4383 } | |
| 4384 buildCounterListPopulationRule--; | |
| 4385 } | |
| 4386 | |
| 4387 core.int buildCounterListPopulationTerm = 0; | |
| 4388 buildListPopulationTerm() { | |
| 4389 var o = new api.ListPopulationTerm(); | |
| 4390 buildCounterListPopulationTerm++; | |
| 4391 if (buildCounterListPopulationTerm < 3) { | |
| 4392 o.contains = true; | |
| 4393 o.negation = true; | |
| 4394 o.operator = "foo"; | |
| 4395 o.remarketingListId = "foo"; | |
| 4396 o.type = "foo"; | |
| 4397 o.value = "foo"; | |
| 4398 o.variableFriendlyName = "foo"; | |
| 4399 o.variableName = "foo"; | |
| 4400 } | |
| 4401 buildCounterListPopulationTerm--; | |
| 4402 return o; | |
| 4403 } | |
| 4404 | |
| 4405 checkListPopulationTerm(api.ListPopulationTerm o) { | |
| 4406 buildCounterListPopulationTerm++; | |
| 4407 if (buildCounterListPopulationTerm < 3) { | |
| 4408 unittest.expect(o.contains, unittest.isTrue); | |
| 4409 unittest.expect(o.negation, unittest.isTrue); | |
| 4410 unittest.expect(o.operator, unittest.equals('foo')); | |
| 4411 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 4412 unittest.expect(o.type, unittest.equals('foo')); | |
| 4413 unittest.expect(o.value, unittest.equals('foo')); | |
| 4414 unittest.expect(o.variableFriendlyName, unittest.equals('foo')); | |
| 4415 unittest.expect(o.variableName, unittest.equals('foo')); | |
| 4416 } | |
| 4417 buildCounterListPopulationTerm--; | |
| 4418 } | |
| 4419 | |
| 4420 core.int buildCounterListTargetingExpression = 0; | |
| 4421 buildListTargetingExpression() { | |
| 4422 var o = new api.ListTargetingExpression(); | |
| 4423 buildCounterListTargetingExpression++; | |
| 4424 if (buildCounterListTargetingExpression < 3) { | |
| 4425 o.expression = "foo"; | |
| 4426 } | |
| 4427 buildCounterListTargetingExpression--; | |
| 4428 return o; | |
| 4429 } | |
| 4430 | |
| 4431 checkListTargetingExpression(api.ListTargetingExpression o) { | |
| 4432 buildCounterListTargetingExpression++; | |
| 4433 if (buildCounterListTargetingExpression < 3) { | |
| 4434 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4435 } | |
| 4436 buildCounterListTargetingExpression--; | |
| 4437 } | |
| 4438 | |
| 4439 core.int buildCounterLookbackConfiguration = 0; | |
| 4440 buildLookbackConfiguration() { | |
| 4441 var o = new api.LookbackConfiguration(); | |
| 4442 buildCounterLookbackConfiguration++; | |
| 4443 if (buildCounterLookbackConfiguration < 3) { | |
| 4444 o.clickDuration = 42; | |
| 4445 o.postImpressionActivitiesDuration = 42; | |
| 4446 } | |
| 4447 buildCounterLookbackConfiguration--; | |
| 4448 return o; | |
| 4449 } | |
| 4450 | |
| 4451 checkLookbackConfiguration(api.LookbackConfiguration o) { | |
| 4452 buildCounterLookbackConfiguration++; | |
| 4453 if (buildCounterLookbackConfiguration < 3) { | |
| 4454 unittest.expect(o.clickDuration, unittest.equals(42)); | |
| 4455 unittest.expect(o.postImpressionActivitiesDuration, unittest.equals(42)); | |
| 4456 } | |
| 4457 buildCounterLookbackConfiguration--; | |
| 4458 } | |
| 4459 | |
| 4460 core.int buildCounterMetric = 0; | |
| 4461 buildMetric() { | |
| 4462 var o = new api.Metric(); | |
| 4463 buildCounterMetric++; | |
| 4464 if (buildCounterMetric < 3) { | |
| 4465 o.kind = "foo"; | |
| 4466 o.name = "foo"; | |
| 4467 } | |
| 4468 buildCounterMetric--; | |
| 4469 return o; | |
| 4470 } | |
| 4471 | |
| 4472 checkMetric(api.Metric o) { | |
| 4473 buildCounterMetric++; | |
| 4474 if (buildCounterMetric < 3) { | |
| 4475 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4476 unittest.expect(o.name, unittest.equals('foo')); | |
| 4477 } | |
| 4478 buildCounterMetric--; | |
| 4479 } | |
| 4480 | |
| 4481 core.int buildCounterMetro = 0; | |
| 4482 buildMetro() { | |
| 4483 var o = new api.Metro(); | |
| 4484 buildCounterMetro++; | |
| 4485 if (buildCounterMetro < 3) { | |
| 4486 o.countryCode = "foo"; | |
| 4487 o.countryDartId = "foo"; | |
| 4488 o.dartId = "foo"; | |
| 4489 o.dmaId = "foo"; | |
| 4490 o.kind = "foo"; | |
| 4491 o.metroCode = "foo"; | |
| 4492 o.name = "foo"; | |
| 4493 } | |
| 4494 buildCounterMetro--; | |
| 4495 return o; | |
| 4496 } | |
| 4497 | |
| 4498 checkMetro(api.Metro o) { | |
| 4499 buildCounterMetro++; | |
| 4500 if (buildCounterMetro < 3) { | |
| 4501 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4502 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4503 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4504 unittest.expect(o.dmaId, unittest.equals('foo')); | |
| 4505 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4506 unittest.expect(o.metroCode, unittest.equals('foo')); | |
| 4507 unittest.expect(o.name, unittest.equals('foo')); | |
| 4508 } | |
| 4509 buildCounterMetro--; | |
| 4510 } | |
| 4511 | |
| 4512 buildUnnamed1982() { | |
| 4513 var o = new core.List<api.Metro>(); | |
| 4514 o.add(buildMetro()); | |
| 4515 o.add(buildMetro()); | |
| 4516 return o; | |
| 4517 } | |
| 4518 | |
| 4519 checkUnnamed1982(core.List<api.Metro> o) { | |
| 4520 unittest.expect(o, unittest.hasLength(2)); | |
| 4521 checkMetro(o[0]); | |
| 4522 checkMetro(o[1]); | |
| 4523 } | |
| 4524 | |
| 4525 core.int buildCounterMetrosListResponse = 0; | |
| 4526 buildMetrosListResponse() { | |
| 4527 var o = new api.MetrosListResponse(); | |
| 4528 buildCounterMetrosListResponse++; | |
| 4529 if (buildCounterMetrosListResponse < 3) { | |
| 4530 o.kind = "foo"; | |
| 4531 o.metros = buildUnnamed1982(); | |
| 4532 } | |
| 4533 buildCounterMetrosListResponse--; | |
| 4534 return o; | |
| 4535 } | |
| 4536 | |
| 4537 checkMetrosListResponse(api.MetrosListResponse o) { | |
| 4538 buildCounterMetrosListResponse++; | |
| 4539 if (buildCounterMetrosListResponse < 3) { | |
| 4540 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4541 checkUnnamed1982(o.metros); | |
| 4542 } | |
| 4543 buildCounterMetrosListResponse--; | |
| 4544 } | |
| 4545 | |
| 4546 core.int buildCounterMobileCarrier = 0; | |
| 4547 buildMobileCarrier() { | |
| 4548 var o = new api.MobileCarrier(); | |
| 4549 buildCounterMobileCarrier++; | |
| 4550 if (buildCounterMobileCarrier < 3) { | |
| 4551 o.countryCode = "foo"; | |
| 4552 o.countryDartId = "foo"; | |
| 4553 o.id = "foo"; | |
| 4554 o.kind = "foo"; | |
| 4555 o.name = "foo"; | |
| 4556 } | |
| 4557 buildCounterMobileCarrier--; | |
| 4558 return o; | |
| 4559 } | |
| 4560 | |
| 4561 checkMobileCarrier(api.MobileCarrier o) { | |
| 4562 buildCounterMobileCarrier++; | |
| 4563 if (buildCounterMobileCarrier < 3) { | |
| 4564 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4565 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4566 unittest.expect(o.id, unittest.equals('foo')); | |
| 4567 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4568 unittest.expect(o.name, unittest.equals('foo')); | |
| 4569 } | |
| 4570 buildCounterMobileCarrier--; | |
| 4571 } | |
| 4572 | |
| 4573 buildUnnamed1983() { | |
| 4574 var o = new core.List<api.MobileCarrier>(); | |
| 4575 o.add(buildMobileCarrier()); | |
| 4576 o.add(buildMobileCarrier()); | |
| 4577 return o; | |
| 4578 } | |
| 4579 | |
| 4580 checkUnnamed1983(core.List<api.MobileCarrier> o) { | |
| 4581 unittest.expect(o, unittest.hasLength(2)); | |
| 4582 checkMobileCarrier(o[0]); | |
| 4583 checkMobileCarrier(o[1]); | |
| 4584 } | |
| 4585 | |
| 4586 core.int buildCounterMobileCarriersListResponse = 0; | |
| 4587 buildMobileCarriersListResponse() { | |
| 4588 var o = new api.MobileCarriersListResponse(); | |
| 4589 buildCounterMobileCarriersListResponse++; | |
| 4590 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4591 o.kind = "foo"; | |
| 4592 o.mobileCarriers = buildUnnamed1983(); | |
| 4593 } | |
| 4594 buildCounterMobileCarriersListResponse--; | |
| 4595 return o; | |
| 4596 } | |
| 4597 | |
| 4598 checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { | |
| 4599 buildCounterMobileCarriersListResponse++; | |
| 4600 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4601 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4602 checkUnnamed1983(o.mobileCarriers); | |
| 4603 } | |
| 4604 buildCounterMobileCarriersListResponse--; | |
| 4605 } | |
| 4606 | |
| 4607 buildUnnamed1984() { | |
| 4608 var o = new core.List<core.String>(); | |
| 4609 o.add("foo"); | |
| 4610 o.add("foo"); | |
| 4611 return o; | |
| 4612 } | |
| 4613 | |
| 4614 checkUnnamed1984(core.List<core.String> o) { | |
| 4615 unittest.expect(o, unittest.hasLength(2)); | |
| 4616 unittest.expect(o[0], unittest.equals('foo')); | |
| 4617 unittest.expect(o[1], unittest.equals('foo')); | |
| 4618 } | |
| 4619 | |
| 4620 core.int buildCounterObjectFilter = 0; | |
| 4621 buildObjectFilter() { | |
| 4622 var o = new api.ObjectFilter(); | |
| 4623 buildCounterObjectFilter++; | |
| 4624 if (buildCounterObjectFilter < 3) { | |
| 4625 o.kind = "foo"; | |
| 4626 o.objectIds = buildUnnamed1984(); | |
| 4627 o.status = "foo"; | |
| 4628 } | |
| 4629 buildCounterObjectFilter--; | |
| 4630 return o; | |
| 4631 } | |
| 4632 | |
| 4633 checkObjectFilter(api.ObjectFilter o) { | |
| 4634 buildCounterObjectFilter++; | |
| 4635 if (buildCounterObjectFilter < 3) { | |
| 4636 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4637 checkUnnamed1984(o.objectIds); | |
| 4638 unittest.expect(o.status, unittest.equals('foo')); | |
| 4639 } | |
| 4640 buildCounterObjectFilter--; | |
| 4641 } | |
| 4642 | |
| 4643 core.int buildCounterOffsetPosition = 0; | |
| 4644 buildOffsetPosition() { | |
| 4645 var o = new api.OffsetPosition(); | |
| 4646 buildCounterOffsetPosition++; | |
| 4647 if (buildCounterOffsetPosition < 3) { | |
| 4648 o.left = 42; | |
| 4649 o.top = 42; | |
| 4650 } | |
| 4651 buildCounterOffsetPosition--; | |
| 4652 return o; | |
| 4653 } | |
| 4654 | |
| 4655 checkOffsetPosition(api.OffsetPosition o) { | |
| 4656 buildCounterOffsetPosition++; | |
| 4657 if (buildCounterOffsetPosition < 3) { | |
| 4658 unittest.expect(o.left, unittest.equals(42)); | |
| 4659 unittest.expect(o.top, unittest.equals(42)); | |
| 4660 } | |
| 4661 buildCounterOffsetPosition--; | |
| 4662 } | |
| 4663 | |
| 4664 core.int buildCounterOmnitureSettings = 0; | |
| 4665 buildOmnitureSettings() { | |
| 4666 var o = new api.OmnitureSettings(); | |
| 4667 buildCounterOmnitureSettings++; | |
| 4668 if (buildCounterOmnitureSettings < 3) { | |
| 4669 o.omnitureCostDataEnabled = true; | |
| 4670 o.omnitureIntegrationEnabled = true; | |
| 4671 } | |
| 4672 buildCounterOmnitureSettings--; | |
| 4673 return o; | |
| 4674 } | |
| 4675 | |
| 4676 checkOmnitureSettings(api.OmnitureSettings o) { | |
| 4677 buildCounterOmnitureSettings++; | |
| 4678 if (buildCounterOmnitureSettings < 3) { | |
| 4679 unittest.expect(o.omnitureCostDataEnabled, unittest.isTrue); | |
| 4680 unittest.expect(o.omnitureIntegrationEnabled, unittest.isTrue); | |
| 4681 } | |
| 4682 buildCounterOmnitureSettings--; | |
| 4683 } | |
| 4684 | |
| 4685 core.int buildCounterOperatingSystem = 0; | |
| 4686 buildOperatingSystem() { | |
| 4687 var o = new api.OperatingSystem(); | |
| 4688 buildCounterOperatingSystem++; | |
| 4689 if (buildCounterOperatingSystem < 3) { | |
| 4690 o.dartId = "foo"; | |
| 4691 o.desktop = true; | |
| 4692 o.kind = "foo"; | |
| 4693 o.mobile = true; | |
| 4694 o.name = "foo"; | |
| 4695 } | |
| 4696 buildCounterOperatingSystem--; | |
| 4697 return o; | |
| 4698 } | |
| 4699 | |
| 4700 checkOperatingSystem(api.OperatingSystem o) { | |
| 4701 buildCounterOperatingSystem++; | |
| 4702 if (buildCounterOperatingSystem < 3) { | |
| 4703 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4704 unittest.expect(o.desktop, unittest.isTrue); | |
| 4705 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4706 unittest.expect(o.mobile, unittest.isTrue); | |
| 4707 unittest.expect(o.name, unittest.equals('foo')); | |
| 4708 } | |
| 4709 buildCounterOperatingSystem--; | |
| 4710 } | |
| 4711 | |
| 4712 core.int buildCounterOperatingSystemVersion = 0; | |
| 4713 buildOperatingSystemVersion() { | |
| 4714 var o = new api.OperatingSystemVersion(); | |
| 4715 buildCounterOperatingSystemVersion++; | |
| 4716 if (buildCounterOperatingSystemVersion < 3) { | |
| 4717 o.id = "foo"; | |
| 4718 o.kind = "foo"; | |
| 4719 o.majorVersion = "foo"; | |
| 4720 o.minorVersion = "foo"; | |
| 4721 o.name = "foo"; | |
| 4722 o.operatingSystem = buildOperatingSystem(); | |
| 4723 } | |
| 4724 buildCounterOperatingSystemVersion--; | |
| 4725 return o; | |
| 4726 } | |
| 4727 | |
| 4728 checkOperatingSystemVersion(api.OperatingSystemVersion o) { | |
| 4729 buildCounterOperatingSystemVersion++; | |
| 4730 if (buildCounterOperatingSystemVersion < 3) { | |
| 4731 unittest.expect(o.id, unittest.equals('foo')); | |
| 4732 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4733 unittest.expect(o.majorVersion, unittest.equals('foo')); | |
| 4734 unittest.expect(o.minorVersion, unittest.equals('foo')); | |
| 4735 unittest.expect(o.name, unittest.equals('foo')); | |
| 4736 checkOperatingSystem(o.operatingSystem); | |
| 4737 } | |
| 4738 buildCounterOperatingSystemVersion--; | |
| 4739 } | |
| 4740 | |
| 4741 buildUnnamed1985() { | |
| 4742 var o = new core.List<api.OperatingSystemVersion>(); | |
| 4743 o.add(buildOperatingSystemVersion()); | |
| 4744 o.add(buildOperatingSystemVersion()); | |
| 4745 return o; | |
| 4746 } | |
| 4747 | |
| 4748 checkUnnamed1985(core.List<api.OperatingSystemVersion> o) { | |
| 4749 unittest.expect(o, unittest.hasLength(2)); | |
| 4750 checkOperatingSystemVersion(o[0]); | |
| 4751 checkOperatingSystemVersion(o[1]); | |
| 4752 } | |
| 4753 | |
| 4754 core.int buildCounterOperatingSystemVersionsListResponse = 0; | |
| 4755 buildOperatingSystemVersionsListResponse() { | |
| 4756 var o = new api.OperatingSystemVersionsListResponse(); | |
| 4757 buildCounterOperatingSystemVersionsListResponse++; | |
| 4758 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4759 o.kind = "foo"; | |
| 4760 o.operatingSystemVersions = buildUnnamed1985(); | |
| 4761 } | |
| 4762 buildCounterOperatingSystemVersionsListResponse--; | |
| 4763 return o; | |
| 4764 } | |
| 4765 | |
| 4766 checkOperatingSystemVersionsListResponse(api.OperatingSystemVersionsListResponse
o) { | |
| 4767 buildCounterOperatingSystemVersionsListResponse++; | |
| 4768 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4769 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4770 checkUnnamed1985(o.operatingSystemVersions); | |
| 4771 } | |
| 4772 buildCounterOperatingSystemVersionsListResponse--; | |
| 4773 } | |
| 4774 | |
| 4775 buildUnnamed1986() { | |
| 4776 var o = new core.List<api.OperatingSystem>(); | |
| 4777 o.add(buildOperatingSystem()); | |
| 4778 o.add(buildOperatingSystem()); | |
| 4779 return o; | |
| 4780 } | |
| 4781 | |
| 4782 checkUnnamed1986(core.List<api.OperatingSystem> o) { | |
| 4783 unittest.expect(o, unittest.hasLength(2)); | |
| 4784 checkOperatingSystem(o[0]); | |
| 4785 checkOperatingSystem(o[1]); | |
| 4786 } | |
| 4787 | |
| 4788 core.int buildCounterOperatingSystemsListResponse = 0; | |
| 4789 buildOperatingSystemsListResponse() { | |
| 4790 var o = new api.OperatingSystemsListResponse(); | |
| 4791 buildCounterOperatingSystemsListResponse++; | |
| 4792 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4793 o.kind = "foo"; | |
| 4794 o.operatingSystems = buildUnnamed1986(); | |
| 4795 } | |
| 4796 buildCounterOperatingSystemsListResponse--; | |
| 4797 return o; | |
| 4798 } | |
| 4799 | |
| 4800 checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { | |
| 4801 buildCounterOperatingSystemsListResponse++; | |
| 4802 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4803 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4804 checkUnnamed1986(o.operatingSystems); | |
| 4805 } | |
| 4806 buildCounterOperatingSystemsListResponse--; | |
| 4807 } | |
| 4808 | |
| 4809 core.int buildCounterOptimizationActivity = 0; | |
| 4810 buildOptimizationActivity() { | |
| 4811 var o = new api.OptimizationActivity(); | |
| 4812 buildCounterOptimizationActivity++; | |
| 4813 if (buildCounterOptimizationActivity < 3) { | |
| 4814 o.floodlightActivityId = "foo"; | |
| 4815 o.floodlightActivityIdDimensionValue = buildDimensionValue(); | |
| 4816 o.weight = 42; | |
| 4817 } | |
| 4818 buildCounterOptimizationActivity--; | |
| 4819 return o; | |
| 4820 } | |
| 4821 | |
| 4822 checkOptimizationActivity(api.OptimizationActivity o) { | |
| 4823 buildCounterOptimizationActivity++; | |
| 4824 if (buildCounterOptimizationActivity < 3) { | |
| 4825 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4826 checkDimensionValue(o.floodlightActivityIdDimensionValue); | |
| 4827 unittest.expect(o.weight, unittest.equals(42)); | |
| 4828 } | |
| 4829 buildCounterOptimizationActivity--; | |
| 4830 } | |
| 4831 | |
| 4832 buildUnnamed1987() { | |
| 4833 var o = new core.List<core.String>(); | |
| 4834 o.add("foo"); | |
| 4835 o.add("foo"); | |
| 4836 return o; | |
| 4837 } | |
| 4838 | |
| 4839 checkUnnamed1987(core.List<core.String> o) { | |
| 4840 unittest.expect(o, unittest.hasLength(2)); | |
| 4841 unittest.expect(o[0], unittest.equals('foo')); | |
| 4842 unittest.expect(o[1], unittest.equals('foo')); | |
| 4843 } | |
| 4844 | |
| 4845 buildUnnamed1988() { | |
| 4846 var o = new core.List<api.OrderContact>(); | |
| 4847 o.add(buildOrderContact()); | |
| 4848 o.add(buildOrderContact()); | |
| 4849 return o; | |
| 4850 } | |
| 4851 | |
| 4852 checkUnnamed1988(core.List<api.OrderContact> o) { | |
| 4853 unittest.expect(o, unittest.hasLength(2)); | |
| 4854 checkOrderContact(o[0]); | |
| 4855 checkOrderContact(o[1]); | |
| 4856 } | |
| 4857 | |
| 4858 buildUnnamed1989() { | |
| 4859 var o = new core.List<core.String>(); | |
| 4860 o.add("foo"); | |
| 4861 o.add("foo"); | |
| 4862 return o; | |
| 4863 } | |
| 4864 | |
| 4865 checkUnnamed1989(core.List<core.String> o) { | |
| 4866 unittest.expect(o, unittest.hasLength(2)); | |
| 4867 unittest.expect(o[0], unittest.equals('foo')); | |
| 4868 unittest.expect(o[1], unittest.equals('foo')); | |
| 4869 } | |
| 4870 | |
| 4871 buildUnnamed1990() { | |
| 4872 var o = new core.List<core.String>(); | |
| 4873 o.add("foo"); | |
| 4874 o.add("foo"); | |
| 4875 return o; | |
| 4876 } | |
| 4877 | |
| 4878 checkUnnamed1990(core.List<core.String> o) { | |
| 4879 unittest.expect(o, unittest.hasLength(2)); | |
| 4880 unittest.expect(o[0], unittest.equals('foo')); | |
| 4881 unittest.expect(o[1], unittest.equals('foo')); | |
| 4882 } | |
| 4883 | |
| 4884 core.int buildCounterOrder = 0; | |
| 4885 buildOrder() { | |
| 4886 var o = new api.Order(); | |
| 4887 buildCounterOrder++; | |
| 4888 if (buildCounterOrder < 3) { | |
| 4889 o.accountId = "foo"; | |
| 4890 o.advertiserId = "foo"; | |
| 4891 o.approverUserProfileIds = buildUnnamed1987(); | |
| 4892 o.buyerInvoiceId = "foo"; | |
| 4893 o.buyerOrganizationName = "foo"; | |
| 4894 o.comments = "foo"; | |
| 4895 o.contacts = buildUnnamed1988(); | |
| 4896 o.id = "foo"; | |
| 4897 o.kind = "foo"; | |
| 4898 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4899 o.name = "foo"; | |
| 4900 o.notes = "foo"; | |
| 4901 o.planningTermId = "foo"; | |
| 4902 o.projectId = "foo"; | |
| 4903 o.sellerOrderId = "foo"; | |
| 4904 o.sellerOrganizationName = "foo"; | |
| 4905 o.siteId = buildUnnamed1989(); | |
| 4906 o.siteNames = buildUnnamed1990(); | |
| 4907 o.subaccountId = "foo"; | |
| 4908 o.termsAndConditions = "foo"; | |
| 4909 } | |
| 4910 buildCounterOrder--; | |
| 4911 return o; | |
| 4912 } | |
| 4913 | |
| 4914 checkOrder(api.Order o) { | |
| 4915 buildCounterOrder++; | |
| 4916 if (buildCounterOrder < 3) { | |
| 4917 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4918 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4919 checkUnnamed1987(o.approverUserProfileIds); | |
| 4920 unittest.expect(o.buyerInvoiceId, unittest.equals('foo')); | |
| 4921 unittest.expect(o.buyerOrganizationName, unittest.equals('foo')); | |
| 4922 unittest.expect(o.comments, unittest.equals('foo')); | |
| 4923 checkUnnamed1988(o.contacts); | |
| 4924 unittest.expect(o.id, unittest.equals('foo')); | |
| 4925 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4926 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4927 unittest.expect(o.name, unittest.equals('foo')); | |
| 4928 unittest.expect(o.notes, unittest.equals('foo')); | |
| 4929 unittest.expect(o.planningTermId, unittest.equals('foo')); | |
| 4930 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4931 unittest.expect(o.sellerOrderId, unittest.equals('foo')); | |
| 4932 unittest.expect(o.sellerOrganizationName, unittest.equals('foo')); | |
| 4933 checkUnnamed1989(o.siteId); | |
| 4934 checkUnnamed1990(o.siteNames); | |
| 4935 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4936 unittest.expect(o.termsAndConditions, unittest.equals('foo')); | |
| 4937 } | |
| 4938 buildCounterOrder--; | |
| 4939 } | |
| 4940 | |
| 4941 core.int buildCounterOrderContact = 0; | |
| 4942 buildOrderContact() { | |
| 4943 var o = new api.OrderContact(); | |
| 4944 buildCounterOrderContact++; | |
| 4945 if (buildCounterOrderContact < 3) { | |
| 4946 o.contactInfo = "foo"; | |
| 4947 o.contactName = "foo"; | |
| 4948 o.contactTitle = "foo"; | |
| 4949 o.contactType = "foo"; | |
| 4950 o.signatureUserProfileId = "foo"; | |
| 4951 } | |
| 4952 buildCounterOrderContact--; | |
| 4953 return o; | |
| 4954 } | |
| 4955 | |
| 4956 checkOrderContact(api.OrderContact o) { | |
| 4957 buildCounterOrderContact++; | |
| 4958 if (buildCounterOrderContact < 3) { | |
| 4959 unittest.expect(o.contactInfo, unittest.equals('foo')); | |
| 4960 unittest.expect(o.contactName, unittest.equals('foo')); | |
| 4961 unittest.expect(o.contactTitle, unittest.equals('foo')); | |
| 4962 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 4963 unittest.expect(o.signatureUserProfileId, unittest.equals('foo')); | |
| 4964 } | |
| 4965 buildCounterOrderContact--; | |
| 4966 } | |
| 4967 | |
| 4968 buildUnnamed1991() { | |
| 4969 var o = new core.List<core.String>(); | |
| 4970 o.add("foo"); | |
| 4971 o.add("foo"); | |
| 4972 return o; | |
| 4973 } | |
| 4974 | |
| 4975 checkUnnamed1991(core.List<core.String> o) { | |
| 4976 unittest.expect(o, unittest.hasLength(2)); | |
| 4977 unittest.expect(o[0], unittest.equals('foo')); | |
| 4978 unittest.expect(o[1], unittest.equals('foo')); | |
| 4979 } | |
| 4980 | |
| 4981 buildUnnamed1992() { | |
| 4982 var o = new core.List<core.String>(); | |
| 4983 o.add("foo"); | |
| 4984 o.add("foo"); | |
| 4985 return o; | |
| 4986 } | |
| 4987 | |
| 4988 checkUnnamed1992(core.List<core.String> o) { | |
| 4989 unittest.expect(o, unittest.hasLength(2)); | |
| 4990 unittest.expect(o[0], unittest.equals('foo')); | |
| 4991 unittest.expect(o[1], unittest.equals('foo')); | |
| 4992 } | |
| 4993 | |
| 4994 core.int buildCounterOrderDocument = 0; | |
| 4995 buildOrderDocument() { | |
| 4996 var o = new api.OrderDocument(); | |
| 4997 buildCounterOrderDocument++; | |
| 4998 if (buildCounterOrderDocument < 3) { | |
| 4999 o.accountId = "foo"; | |
| 5000 o.advertiserId = "foo"; | |
| 5001 o.amendedOrderDocumentId = "foo"; | |
| 5002 o.approvedByUserProfileIds = buildUnnamed1991(); | |
| 5003 o.cancelled = true; | |
| 5004 o.createdInfo = buildLastModifiedInfo(); | |
| 5005 o.effectiveDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5006 o.id = "foo"; | |
| 5007 o.kind = "foo"; | |
| 5008 o.lastSentRecipients = buildUnnamed1992(); | |
| 5009 o.lastSentTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 5010 o.orderId = "foo"; | |
| 5011 o.projectId = "foo"; | |
| 5012 o.signed = true; | |
| 5013 o.subaccountId = "foo"; | |
| 5014 o.title = "foo"; | |
| 5015 o.type = "foo"; | |
| 5016 } | |
| 5017 buildCounterOrderDocument--; | |
| 5018 return o; | |
| 5019 } | |
| 5020 | |
| 5021 checkOrderDocument(api.OrderDocument o) { | |
| 5022 buildCounterOrderDocument++; | |
| 5023 if (buildCounterOrderDocument < 3) { | |
| 5024 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5025 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5026 unittest.expect(o.amendedOrderDocumentId, unittest.equals('foo')); | |
| 5027 checkUnnamed1991(o.approvedByUserProfileIds); | |
| 5028 unittest.expect(o.cancelled, unittest.isTrue); | |
| 5029 checkLastModifiedInfo(o.createdInfo); | |
| 5030 unittest.expect(o.effectiveDate, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | |
| 5031 unittest.expect(o.id, unittest.equals('foo')); | |
| 5032 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5033 checkUnnamed1992(o.lastSentRecipients); | |
| 5034 unittest.expect(o.lastSentTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | |
| 5035 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 5036 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 5037 unittest.expect(o.signed, unittest.isTrue); | |
| 5038 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5039 unittest.expect(o.title, unittest.equals('foo')); | |
| 5040 unittest.expect(o.type, unittest.equals('foo')); | |
| 5041 } | |
| 5042 buildCounterOrderDocument--; | |
| 5043 } | |
| 5044 | |
| 5045 buildUnnamed1993() { | |
| 5046 var o = new core.List<api.OrderDocument>(); | |
| 5047 o.add(buildOrderDocument()); | |
| 5048 o.add(buildOrderDocument()); | |
| 5049 return o; | |
| 5050 } | |
| 5051 | |
| 5052 checkUnnamed1993(core.List<api.OrderDocument> o) { | |
| 5053 unittest.expect(o, unittest.hasLength(2)); | |
| 5054 checkOrderDocument(o[0]); | |
| 5055 checkOrderDocument(o[1]); | |
| 5056 } | |
| 5057 | |
| 5058 core.int buildCounterOrderDocumentsListResponse = 0; | |
| 5059 buildOrderDocumentsListResponse() { | |
| 5060 var o = new api.OrderDocumentsListResponse(); | |
| 5061 buildCounterOrderDocumentsListResponse++; | |
| 5062 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5063 o.kind = "foo"; | |
| 5064 o.nextPageToken = "foo"; | |
| 5065 o.orderDocuments = buildUnnamed1993(); | |
| 5066 } | |
| 5067 buildCounterOrderDocumentsListResponse--; | |
| 5068 return o; | |
| 5069 } | |
| 5070 | |
| 5071 checkOrderDocumentsListResponse(api.OrderDocumentsListResponse o) { | |
| 5072 buildCounterOrderDocumentsListResponse++; | |
| 5073 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5074 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5075 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5076 checkUnnamed1993(o.orderDocuments); | |
| 5077 } | |
| 5078 buildCounterOrderDocumentsListResponse--; | |
| 5079 } | |
| 5080 | |
| 5081 buildUnnamed1994() { | |
| 5082 var o = new core.List<api.Order>(); | |
| 5083 o.add(buildOrder()); | |
| 5084 o.add(buildOrder()); | |
| 5085 return o; | |
| 5086 } | |
| 5087 | |
| 5088 checkUnnamed1994(core.List<api.Order> o) { | |
| 5089 unittest.expect(o, unittest.hasLength(2)); | |
| 5090 checkOrder(o[0]); | |
| 5091 checkOrder(o[1]); | |
| 5092 } | |
| 5093 | |
| 5094 core.int buildCounterOrdersListResponse = 0; | |
| 5095 buildOrdersListResponse() { | |
| 5096 var o = new api.OrdersListResponse(); | |
| 5097 buildCounterOrdersListResponse++; | |
| 5098 if (buildCounterOrdersListResponse < 3) { | |
| 5099 o.kind = "foo"; | |
| 5100 o.nextPageToken = "foo"; | |
| 5101 o.orders = buildUnnamed1994(); | |
| 5102 } | |
| 5103 buildCounterOrdersListResponse--; | |
| 5104 return o; | |
| 5105 } | |
| 5106 | |
| 5107 checkOrdersListResponse(api.OrdersListResponse o) { | |
| 5108 buildCounterOrdersListResponse++; | |
| 5109 if (buildCounterOrdersListResponse < 3) { | |
| 5110 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5111 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5112 checkUnnamed1994(o.orders); | |
| 5113 } | |
| 5114 buildCounterOrdersListResponse--; | |
| 5115 } | |
| 5116 | |
| 5117 buildUnnamed1995() { | |
| 5118 var o = new core.List<api.Dimension>(); | |
| 5119 o.add(buildDimension()); | |
| 5120 o.add(buildDimension()); | |
| 5121 return o; | |
| 5122 } | |
| 5123 | |
| 5124 checkUnnamed1995(core.List<api.Dimension> o) { | |
| 5125 unittest.expect(o, unittest.hasLength(2)); | |
| 5126 checkDimension(o[0]); | |
| 5127 checkDimension(o[1]); | |
| 5128 } | |
| 5129 | |
| 5130 buildUnnamed1996() { | |
| 5131 var o = new core.List<api.Dimension>(); | |
| 5132 o.add(buildDimension()); | |
| 5133 o.add(buildDimension()); | |
| 5134 return o; | |
| 5135 } | |
| 5136 | |
| 5137 checkUnnamed1996(core.List<api.Dimension> o) { | |
| 5138 unittest.expect(o, unittest.hasLength(2)); | |
| 5139 checkDimension(o[0]); | |
| 5140 checkDimension(o[1]); | |
| 5141 } | |
| 5142 | |
| 5143 buildUnnamed1997() { | |
| 5144 var o = new core.List<api.Metric>(); | |
| 5145 o.add(buildMetric()); | |
| 5146 o.add(buildMetric()); | |
| 5147 return o; | |
| 5148 } | |
| 5149 | |
| 5150 checkUnnamed1997(core.List<api.Metric> o) { | |
| 5151 unittest.expect(o, unittest.hasLength(2)); | |
| 5152 checkMetric(o[0]); | |
| 5153 checkMetric(o[1]); | |
| 5154 } | |
| 5155 | |
| 5156 buildUnnamed1998() { | |
| 5157 var o = new core.List<api.Dimension>(); | |
| 5158 o.add(buildDimension()); | |
| 5159 o.add(buildDimension()); | |
| 5160 return o; | |
| 5161 } | |
| 5162 | |
| 5163 checkUnnamed1998(core.List<api.Dimension> o) { | |
| 5164 unittest.expect(o, unittest.hasLength(2)); | |
| 5165 checkDimension(o[0]); | |
| 5166 checkDimension(o[1]); | |
| 5167 } | |
| 5168 | |
| 5169 core.int buildCounterPathToConversionReportCompatibleFields = 0; | |
| 5170 buildPathToConversionReportCompatibleFields() { | |
| 5171 var o = new api.PathToConversionReportCompatibleFields(); | |
| 5172 buildCounterPathToConversionReportCompatibleFields++; | |
| 5173 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5174 o.conversionDimensions = buildUnnamed1995(); | |
| 5175 o.customFloodlightVariables = buildUnnamed1996(); | |
| 5176 o.kind = "foo"; | |
| 5177 o.metrics = buildUnnamed1997(); | |
| 5178 o.perInteractionDimensions = buildUnnamed1998(); | |
| 5179 } | |
| 5180 buildCounterPathToConversionReportCompatibleFields--; | |
| 5181 return o; | |
| 5182 } | |
| 5183 | |
| 5184 checkPathToConversionReportCompatibleFields(api.PathToConversionReportCompatible
Fields o) { | |
| 5185 buildCounterPathToConversionReportCompatibleFields++; | |
| 5186 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5187 checkUnnamed1995(o.conversionDimensions); | |
| 5188 checkUnnamed1996(o.customFloodlightVariables); | |
| 5189 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5190 checkUnnamed1997(o.metrics); | |
| 5191 checkUnnamed1998(o.perInteractionDimensions); | |
| 5192 } | |
| 5193 buildCounterPathToConversionReportCompatibleFields--; | |
| 5194 } | |
| 5195 | |
| 5196 buildUnnamed1999() { | |
| 5197 var o = new core.List<core.String>(); | |
| 5198 o.add("foo"); | |
| 5199 o.add("foo"); | |
| 5200 return o; | |
| 5201 } | |
| 5202 | |
| 5203 checkUnnamed1999(core.List<core.String> o) { | |
| 5204 unittest.expect(o, unittest.hasLength(2)); | |
| 5205 unittest.expect(o[0], unittest.equals('foo')); | |
| 5206 unittest.expect(o[1], unittest.equals('foo')); | |
| 5207 } | |
| 5208 | |
| 5209 core.int buildCounterPlacement = 0; | |
| 5210 buildPlacement() { | |
| 5211 var o = new api.Placement(); | |
| 5212 buildCounterPlacement++; | |
| 5213 if (buildCounterPlacement < 3) { | |
| 5214 o.accountId = "foo"; | |
| 5215 o.advertiserId = "foo"; | |
| 5216 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5217 o.archived = true; | |
| 5218 o.campaignId = "foo"; | |
| 5219 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5220 o.comment = "foo"; | |
| 5221 o.compatibility = "foo"; | |
| 5222 o.contentCategoryId = "foo"; | |
| 5223 o.createInfo = buildLastModifiedInfo(); | |
| 5224 o.directorySiteId = "foo"; | |
| 5225 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5226 o.externalId = "foo"; | |
| 5227 o.id = "foo"; | |
| 5228 o.idDimensionValue = buildDimensionValue(); | |
| 5229 o.keyName = "foo"; | |
| 5230 o.kind = "foo"; | |
| 5231 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5232 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 5233 o.name = "foo"; | |
| 5234 o.paymentApproved = true; | |
| 5235 o.paymentSource = "foo"; | |
| 5236 o.placementGroupId = "foo"; | |
| 5237 o.placementGroupIdDimensionValue = buildDimensionValue(); | |
| 5238 o.placementStrategyId = "foo"; | |
| 5239 o.pricingSchedule = buildPricingSchedule(); | |
| 5240 o.primary = true; | |
| 5241 o.publisherUpdateInfo = buildLastModifiedInfo(); | |
| 5242 o.siteId = "foo"; | |
| 5243 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5244 o.size = buildSize(); | |
| 5245 o.sslRequired = true; | |
| 5246 o.status = "foo"; | |
| 5247 o.subaccountId = "foo"; | |
| 5248 o.tagFormats = buildUnnamed1999(); | |
| 5249 o.tagSetting = buildTagSetting(); | |
| 5250 } | |
| 5251 buildCounterPlacement--; | |
| 5252 return o; | |
| 5253 } | |
| 5254 | |
| 5255 checkPlacement(api.Placement o) { | |
| 5256 buildCounterPlacement++; | |
| 5257 if (buildCounterPlacement < 3) { | |
| 5258 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5259 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5260 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5261 unittest.expect(o.archived, unittest.isTrue); | |
| 5262 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5263 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5264 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5265 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 5266 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5267 checkLastModifiedInfo(o.createInfo); | |
| 5268 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5269 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5270 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5271 unittest.expect(o.id, unittest.equals('foo')); | |
| 5272 checkDimensionValue(o.idDimensionValue); | |
| 5273 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 5274 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5275 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5276 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 5277 unittest.expect(o.name, unittest.equals('foo')); | |
| 5278 unittest.expect(o.paymentApproved, unittest.isTrue); | |
| 5279 unittest.expect(o.paymentSource, unittest.equals('foo')); | |
| 5280 unittest.expect(o.placementGroupId, unittest.equals('foo')); | |
| 5281 checkDimensionValue(o.placementGroupIdDimensionValue); | |
| 5282 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5283 checkPricingSchedule(o.pricingSchedule); | |
| 5284 unittest.expect(o.primary, unittest.isTrue); | |
| 5285 checkLastModifiedInfo(o.publisherUpdateInfo); | |
| 5286 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5287 checkDimensionValue(o.siteIdDimensionValue); | |
| 5288 checkSize(o.size); | |
| 5289 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5290 unittest.expect(o.status, unittest.equals('foo')); | |
| 5291 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5292 checkUnnamed1999(o.tagFormats); | |
| 5293 checkTagSetting(o.tagSetting); | |
| 5294 } | |
| 5295 buildCounterPlacement--; | |
| 5296 } | |
| 5297 | |
| 5298 core.int buildCounterPlacementAssignment = 0; | |
| 5299 buildPlacementAssignment() { | |
| 5300 var o = new api.PlacementAssignment(); | |
| 5301 buildCounterPlacementAssignment++; | |
| 5302 if (buildCounterPlacementAssignment < 3) { | |
| 5303 o.active = true; | |
| 5304 o.placementId = "foo"; | |
| 5305 o.placementIdDimensionValue = buildDimensionValue(); | |
| 5306 o.sslRequired = true; | |
| 5307 } | |
| 5308 buildCounterPlacementAssignment--; | |
| 5309 return o; | |
| 5310 } | |
| 5311 | |
| 5312 checkPlacementAssignment(api.PlacementAssignment o) { | |
| 5313 buildCounterPlacementAssignment++; | |
| 5314 if (buildCounterPlacementAssignment < 3) { | |
| 5315 unittest.expect(o.active, unittest.isTrue); | |
| 5316 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5317 checkDimensionValue(o.placementIdDimensionValue); | |
| 5318 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5319 } | |
| 5320 buildCounterPlacementAssignment--; | |
| 5321 } | |
| 5322 | |
| 5323 buildUnnamed2000() { | |
| 5324 var o = new core.List<core.String>(); | |
| 5325 o.add("foo"); | |
| 5326 o.add("foo"); | |
| 5327 return o; | |
| 5328 } | |
| 5329 | |
| 5330 checkUnnamed2000(core.List<core.String> o) { | |
| 5331 unittest.expect(o, unittest.hasLength(2)); | |
| 5332 unittest.expect(o[0], unittest.equals('foo')); | |
| 5333 unittest.expect(o[1], unittest.equals('foo')); | |
| 5334 } | |
| 5335 | |
| 5336 core.int buildCounterPlacementGroup = 0; | |
| 5337 buildPlacementGroup() { | |
| 5338 var o = new api.PlacementGroup(); | |
| 5339 buildCounterPlacementGroup++; | |
| 5340 if (buildCounterPlacementGroup < 3) { | |
| 5341 o.accountId = "foo"; | |
| 5342 o.advertiserId = "foo"; | |
| 5343 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5344 o.archived = true; | |
| 5345 o.campaignId = "foo"; | |
| 5346 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5347 o.childPlacementIds = buildUnnamed2000(); | |
| 5348 o.comment = "foo"; | |
| 5349 o.contentCategoryId = "foo"; | |
| 5350 o.createInfo = buildLastModifiedInfo(); | |
| 5351 o.directorySiteId = "foo"; | |
| 5352 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5353 o.externalId = "foo"; | |
| 5354 o.id = "foo"; | |
| 5355 o.idDimensionValue = buildDimensionValue(); | |
| 5356 o.kind = "foo"; | |
| 5357 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5358 o.name = "foo"; | |
| 5359 o.placementGroupType = "foo"; | |
| 5360 o.placementStrategyId = "foo"; | |
| 5361 o.pricingSchedule = buildPricingSchedule(); | |
| 5362 o.primaryPlacementId = "foo"; | |
| 5363 o.primaryPlacementIdDimensionValue = buildDimensionValue(); | |
| 5364 o.siteId = "foo"; | |
| 5365 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5366 o.subaccountId = "foo"; | |
| 5367 } | |
| 5368 buildCounterPlacementGroup--; | |
| 5369 return o; | |
| 5370 } | |
| 5371 | |
| 5372 checkPlacementGroup(api.PlacementGroup o) { | |
| 5373 buildCounterPlacementGroup++; | |
| 5374 if (buildCounterPlacementGroup < 3) { | |
| 5375 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5376 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5377 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5378 unittest.expect(o.archived, unittest.isTrue); | |
| 5379 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5380 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5381 checkUnnamed2000(o.childPlacementIds); | |
| 5382 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5383 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5384 checkLastModifiedInfo(o.createInfo); | |
| 5385 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5386 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5387 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5388 unittest.expect(o.id, unittest.equals('foo')); | |
| 5389 checkDimensionValue(o.idDimensionValue); | |
| 5390 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5391 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5392 unittest.expect(o.name, unittest.equals('foo')); | |
| 5393 unittest.expect(o.placementGroupType, unittest.equals('foo')); | |
| 5394 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5395 checkPricingSchedule(o.pricingSchedule); | |
| 5396 unittest.expect(o.primaryPlacementId, unittest.equals('foo')); | |
| 5397 checkDimensionValue(o.primaryPlacementIdDimensionValue); | |
| 5398 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5399 checkDimensionValue(o.siteIdDimensionValue); | |
| 5400 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5401 } | |
| 5402 buildCounterPlacementGroup--; | |
| 5403 } | |
| 5404 | |
| 5405 buildUnnamed2001() { | |
| 5406 var o = new core.List<api.PlacementGroup>(); | |
| 5407 o.add(buildPlacementGroup()); | |
| 5408 o.add(buildPlacementGroup()); | |
| 5409 return o; | |
| 5410 } | |
| 5411 | |
| 5412 checkUnnamed2001(core.List<api.PlacementGroup> o) { | |
| 5413 unittest.expect(o, unittest.hasLength(2)); | |
| 5414 checkPlacementGroup(o[0]); | |
| 5415 checkPlacementGroup(o[1]); | |
| 5416 } | |
| 5417 | |
| 5418 core.int buildCounterPlacementGroupsListResponse = 0; | |
| 5419 buildPlacementGroupsListResponse() { | |
| 5420 var o = new api.PlacementGroupsListResponse(); | |
| 5421 buildCounterPlacementGroupsListResponse++; | |
| 5422 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5423 o.kind = "foo"; | |
| 5424 o.nextPageToken = "foo"; | |
| 5425 o.placementGroups = buildUnnamed2001(); | |
| 5426 } | |
| 5427 buildCounterPlacementGroupsListResponse--; | |
| 5428 return o; | |
| 5429 } | |
| 5430 | |
| 5431 checkPlacementGroupsListResponse(api.PlacementGroupsListResponse o) { | |
| 5432 buildCounterPlacementGroupsListResponse++; | |
| 5433 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5434 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5435 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5436 checkUnnamed2001(o.placementGroups); | |
| 5437 } | |
| 5438 buildCounterPlacementGroupsListResponse--; | |
| 5439 } | |
| 5440 | |
| 5441 buildUnnamed2002() { | |
| 5442 var o = new core.List<api.PlacementStrategy>(); | |
| 5443 o.add(buildPlacementStrategy()); | |
| 5444 o.add(buildPlacementStrategy()); | |
| 5445 return o; | |
| 5446 } | |
| 5447 | |
| 5448 checkUnnamed2002(core.List<api.PlacementStrategy> o) { | |
| 5449 unittest.expect(o, unittest.hasLength(2)); | |
| 5450 checkPlacementStrategy(o[0]); | |
| 5451 checkPlacementStrategy(o[1]); | |
| 5452 } | |
| 5453 | |
| 5454 core.int buildCounterPlacementStrategiesListResponse = 0; | |
| 5455 buildPlacementStrategiesListResponse() { | |
| 5456 var o = new api.PlacementStrategiesListResponse(); | |
| 5457 buildCounterPlacementStrategiesListResponse++; | |
| 5458 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5459 o.kind = "foo"; | |
| 5460 o.nextPageToken = "foo"; | |
| 5461 o.placementStrategies = buildUnnamed2002(); | |
| 5462 } | |
| 5463 buildCounterPlacementStrategiesListResponse--; | |
| 5464 return o; | |
| 5465 } | |
| 5466 | |
| 5467 checkPlacementStrategiesListResponse(api.PlacementStrategiesListResponse o) { | |
| 5468 buildCounterPlacementStrategiesListResponse++; | |
| 5469 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5470 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5471 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5472 checkUnnamed2002(o.placementStrategies); | |
| 5473 } | |
| 5474 buildCounterPlacementStrategiesListResponse--; | |
| 5475 } | |
| 5476 | |
| 5477 core.int buildCounterPlacementStrategy = 0; | |
| 5478 buildPlacementStrategy() { | |
| 5479 var o = new api.PlacementStrategy(); | |
| 5480 buildCounterPlacementStrategy++; | |
| 5481 if (buildCounterPlacementStrategy < 3) { | |
| 5482 o.accountId = "foo"; | |
| 5483 o.id = "foo"; | |
| 5484 o.kind = "foo"; | |
| 5485 o.name = "foo"; | |
| 5486 } | |
| 5487 buildCounterPlacementStrategy--; | |
| 5488 return o; | |
| 5489 } | |
| 5490 | |
| 5491 checkPlacementStrategy(api.PlacementStrategy o) { | |
| 5492 buildCounterPlacementStrategy++; | |
| 5493 if (buildCounterPlacementStrategy < 3) { | |
| 5494 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5495 unittest.expect(o.id, unittest.equals('foo')); | |
| 5496 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5497 unittest.expect(o.name, unittest.equals('foo')); | |
| 5498 } | |
| 5499 buildCounterPlacementStrategy--; | |
| 5500 } | |
| 5501 | |
| 5502 buildUnnamed2003() { | |
| 5503 var o = new core.List<api.TagData>(); | |
| 5504 o.add(buildTagData()); | |
| 5505 o.add(buildTagData()); | |
| 5506 return o; | |
| 5507 } | |
| 5508 | |
| 5509 checkUnnamed2003(core.List<api.TagData> o) { | |
| 5510 unittest.expect(o, unittest.hasLength(2)); | |
| 5511 checkTagData(o[0]); | |
| 5512 checkTagData(o[1]); | |
| 5513 } | |
| 5514 | |
| 5515 core.int buildCounterPlacementTag = 0; | |
| 5516 buildPlacementTag() { | |
| 5517 var o = new api.PlacementTag(); | |
| 5518 buildCounterPlacementTag++; | |
| 5519 if (buildCounterPlacementTag < 3) { | |
| 5520 o.placementId = "foo"; | |
| 5521 o.tagDatas = buildUnnamed2003(); | |
| 5522 } | |
| 5523 buildCounterPlacementTag--; | |
| 5524 return o; | |
| 5525 } | |
| 5526 | |
| 5527 checkPlacementTag(api.PlacementTag o) { | |
| 5528 buildCounterPlacementTag++; | |
| 5529 if (buildCounterPlacementTag < 3) { | |
| 5530 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5531 checkUnnamed2003(o.tagDatas); | |
| 5532 } | |
| 5533 buildCounterPlacementTag--; | |
| 5534 } | |
| 5535 | |
| 5536 buildUnnamed2004() { | |
| 5537 var o = new core.List<api.PlacementTag>(); | |
| 5538 o.add(buildPlacementTag()); | |
| 5539 o.add(buildPlacementTag()); | |
| 5540 return o; | |
| 5541 } | |
| 5542 | |
| 5543 checkUnnamed2004(core.List<api.PlacementTag> o) { | |
| 5544 unittest.expect(o, unittest.hasLength(2)); | |
| 5545 checkPlacementTag(o[0]); | |
| 5546 checkPlacementTag(o[1]); | |
| 5547 } | |
| 5548 | |
| 5549 core.int buildCounterPlacementsGenerateTagsResponse = 0; | |
| 5550 buildPlacementsGenerateTagsResponse() { | |
| 5551 var o = new api.PlacementsGenerateTagsResponse(); | |
| 5552 buildCounterPlacementsGenerateTagsResponse++; | |
| 5553 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5554 o.kind = "foo"; | |
| 5555 o.placementTags = buildUnnamed2004(); | |
| 5556 } | |
| 5557 buildCounterPlacementsGenerateTagsResponse--; | |
| 5558 return o; | |
| 5559 } | |
| 5560 | |
| 5561 checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { | |
| 5562 buildCounterPlacementsGenerateTagsResponse++; | |
| 5563 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5564 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5565 checkUnnamed2004(o.placementTags); | |
| 5566 } | |
| 5567 buildCounterPlacementsGenerateTagsResponse--; | |
| 5568 } | |
| 5569 | |
| 5570 buildUnnamed2005() { | |
| 5571 var o = new core.List<api.Placement>(); | |
| 5572 o.add(buildPlacement()); | |
| 5573 o.add(buildPlacement()); | |
| 5574 return o; | |
| 5575 } | |
| 5576 | |
| 5577 checkUnnamed2005(core.List<api.Placement> o) { | |
| 5578 unittest.expect(o, unittest.hasLength(2)); | |
| 5579 checkPlacement(o[0]); | |
| 5580 checkPlacement(o[1]); | |
| 5581 } | |
| 5582 | |
| 5583 core.int buildCounterPlacementsListResponse = 0; | |
| 5584 buildPlacementsListResponse() { | |
| 5585 var o = new api.PlacementsListResponse(); | |
| 5586 buildCounterPlacementsListResponse++; | |
| 5587 if (buildCounterPlacementsListResponse < 3) { | |
| 5588 o.kind = "foo"; | |
| 5589 o.nextPageToken = "foo"; | |
| 5590 o.placements = buildUnnamed2005(); | |
| 5591 } | |
| 5592 buildCounterPlacementsListResponse--; | |
| 5593 return o; | |
| 5594 } | |
| 5595 | |
| 5596 checkPlacementsListResponse(api.PlacementsListResponse o) { | |
| 5597 buildCounterPlacementsListResponse++; | |
| 5598 if (buildCounterPlacementsListResponse < 3) { | |
| 5599 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5600 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5601 checkUnnamed2005(o.placements); | |
| 5602 } | |
| 5603 buildCounterPlacementsListResponse--; | |
| 5604 } | |
| 5605 | |
| 5606 core.int buildCounterPlatformType = 0; | |
| 5607 buildPlatformType() { | |
| 5608 var o = new api.PlatformType(); | |
| 5609 buildCounterPlatformType++; | |
| 5610 if (buildCounterPlatformType < 3) { | |
| 5611 o.id = "foo"; | |
| 5612 o.kind = "foo"; | |
| 5613 o.name = "foo"; | |
| 5614 } | |
| 5615 buildCounterPlatformType--; | |
| 5616 return o; | |
| 5617 } | |
| 5618 | |
| 5619 checkPlatformType(api.PlatformType o) { | |
| 5620 buildCounterPlatformType++; | |
| 5621 if (buildCounterPlatformType < 3) { | |
| 5622 unittest.expect(o.id, unittest.equals('foo')); | |
| 5623 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5624 unittest.expect(o.name, unittest.equals('foo')); | |
| 5625 } | |
| 5626 buildCounterPlatformType--; | |
| 5627 } | |
| 5628 | |
| 5629 buildUnnamed2006() { | |
| 5630 var o = new core.List<api.PlatformType>(); | |
| 5631 o.add(buildPlatformType()); | |
| 5632 o.add(buildPlatformType()); | |
| 5633 return o; | |
| 5634 } | |
| 5635 | |
| 5636 checkUnnamed2006(core.List<api.PlatformType> o) { | |
| 5637 unittest.expect(o, unittest.hasLength(2)); | |
| 5638 checkPlatformType(o[0]); | |
| 5639 checkPlatformType(o[1]); | |
| 5640 } | |
| 5641 | |
| 5642 core.int buildCounterPlatformTypesListResponse = 0; | |
| 5643 buildPlatformTypesListResponse() { | |
| 5644 var o = new api.PlatformTypesListResponse(); | |
| 5645 buildCounterPlatformTypesListResponse++; | |
| 5646 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5647 o.kind = "foo"; | |
| 5648 o.platformTypes = buildUnnamed2006(); | |
| 5649 } | |
| 5650 buildCounterPlatformTypesListResponse--; | |
| 5651 return o; | |
| 5652 } | |
| 5653 | |
| 5654 checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { | |
| 5655 buildCounterPlatformTypesListResponse++; | |
| 5656 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5657 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5658 checkUnnamed2006(o.platformTypes); | |
| 5659 } | |
| 5660 buildCounterPlatformTypesListResponse--; | |
| 5661 } | |
| 5662 | |
| 5663 core.int buildCounterPopupWindowProperties = 0; | |
| 5664 buildPopupWindowProperties() { | |
| 5665 var o = new api.PopupWindowProperties(); | |
| 5666 buildCounterPopupWindowProperties++; | |
| 5667 if (buildCounterPopupWindowProperties < 3) { | |
| 5668 o.dimension = buildSize(); | |
| 5669 o.offset = buildOffsetPosition(); | |
| 5670 o.positionType = "foo"; | |
| 5671 o.showAddressBar = true; | |
| 5672 o.showMenuBar = true; | |
| 5673 o.showScrollBar = true; | |
| 5674 o.showStatusBar = true; | |
| 5675 o.showToolBar = true; | |
| 5676 o.title = "foo"; | |
| 5677 } | |
| 5678 buildCounterPopupWindowProperties--; | |
| 5679 return o; | |
| 5680 } | |
| 5681 | |
| 5682 checkPopupWindowProperties(api.PopupWindowProperties o) { | |
| 5683 buildCounterPopupWindowProperties++; | |
| 5684 if (buildCounterPopupWindowProperties < 3) { | |
| 5685 checkSize(o.dimension); | |
| 5686 checkOffsetPosition(o.offset); | |
| 5687 unittest.expect(o.positionType, unittest.equals('foo')); | |
| 5688 unittest.expect(o.showAddressBar, unittest.isTrue); | |
| 5689 unittest.expect(o.showMenuBar, unittest.isTrue); | |
| 5690 unittest.expect(o.showScrollBar, unittest.isTrue); | |
| 5691 unittest.expect(o.showStatusBar, unittest.isTrue); | |
| 5692 unittest.expect(o.showToolBar, unittest.isTrue); | |
| 5693 unittest.expect(o.title, unittest.equals('foo')); | |
| 5694 } | |
| 5695 buildCounterPopupWindowProperties--; | |
| 5696 } | |
| 5697 | |
| 5698 core.int buildCounterPostalCode = 0; | |
| 5699 buildPostalCode() { | |
| 5700 var o = new api.PostalCode(); | |
| 5701 buildCounterPostalCode++; | |
| 5702 if (buildCounterPostalCode < 3) { | |
| 5703 o.code = "foo"; | |
| 5704 o.countryCode = "foo"; | |
| 5705 o.countryDartId = "foo"; | |
| 5706 o.id = "foo"; | |
| 5707 o.kind = "foo"; | |
| 5708 } | |
| 5709 buildCounterPostalCode--; | |
| 5710 return o; | |
| 5711 } | |
| 5712 | |
| 5713 checkPostalCode(api.PostalCode o) { | |
| 5714 buildCounterPostalCode++; | |
| 5715 if (buildCounterPostalCode < 3) { | |
| 5716 unittest.expect(o.code, unittest.equals('foo')); | |
| 5717 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 5718 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 5719 unittest.expect(o.id, unittest.equals('foo')); | |
| 5720 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5721 } | |
| 5722 buildCounterPostalCode--; | |
| 5723 } | |
| 5724 | |
| 5725 buildUnnamed2007() { | |
| 5726 var o = new core.List<api.PostalCode>(); | |
| 5727 o.add(buildPostalCode()); | |
| 5728 o.add(buildPostalCode()); | |
| 5729 return o; | |
| 5730 } | |
| 5731 | |
| 5732 checkUnnamed2007(core.List<api.PostalCode> o) { | |
| 5733 unittest.expect(o, unittest.hasLength(2)); | |
| 5734 checkPostalCode(o[0]); | |
| 5735 checkPostalCode(o[1]); | |
| 5736 } | |
| 5737 | |
| 5738 core.int buildCounterPostalCodesListResponse = 0; | |
| 5739 buildPostalCodesListResponse() { | |
| 5740 var o = new api.PostalCodesListResponse(); | |
| 5741 buildCounterPostalCodesListResponse++; | |
| 5742 if (buildCounterPostalCodesListResponse < 3) { | |
| 5743 o.kind = "foo"; | |
| 5744 o.postalCodes = buildUnnamed2007(); | |
| 5745 } | |
| 5746 buildCounterPostalCodesListResponse--; | |
| 5747 return o; | |
| 5748 } | |
| 5749 | |
| 5750 checkPostalCodesListResponse(api.PostalCodesListResponse o) { | |
| 5751 buildCounterPostalCodesListResponse++; | |
| 5752 if (buildCounterPostalCodesListResponse < 3) { | |
| 5753 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5754 checkUnnamed2007(o.postalCodes); | |
| 5755 } | |
| 5756 buildCounterPostalCodesListResponse--; | |
| 5757 } | |
| 5758 | |
| 5759 buildUnnamed2008() { | |
| 5760 var o = new core.List<api.Flight>(); | |
| 5761 o.add(buildFlight()); | |
| 5762 o.add(buildFlight()); | |
| 5763 return o; | |
| 5764 } | |
| 5765 | |
| 5766 checkUnnamed2008(core.List<api.Flight> o) { | |
| 5767 unittest.expect(o, unittest.hasLength(2)); | |
| 5768 checkFlight(o[0]); | |
| 5769 checkFlight(o[1]); | |
| 5770 } | |
| 5771 | |
| 5772 core.int buildCounterPricing = 0; | |
| 5773 buildPricing() { | |
| 5774 var o = new api.Pricing(); | |
| 5775 buildCounterPricing++; | |
| 5776 if (buildCounterPricing < 3) { | |
| 5777 o.capCostType = "foo"; | |
| 5778 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5779 o.flights = buildUnnamed2008(); | |
| 5780 o.groupType = "foo"; | |
| 5781 o.pricingType = "foo"; | |
| 5782 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5783 } | |
| 5784 buildCounterPricing--; | |
| 5785 return o; | |
| 5786 } | |
| 5787 | |
| 5788 checkPricing(api.Pricing o) { | |
| 5789 buildCounterPricing++; | |
| 5790 if (buildCounterPricing < 3) { | |
| 5791 unittest.expect(o.capCostType, unittest.equals('foo')); | |
| 5792 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5793 checkUnnamed2008(o.flights); | |
| 5794 unittest.expect(o.groupType, unittest.equals('foo')); | |
| 5795 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5796 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5797 } | |
| 5798 buildCounterPricing--; | |
| 5799 } | |
| 5800 | |
| 5801 buildUnnamed2009() { | |
| 5802 var o = new core.List<api.PricingSchedulePricingPeriod>(); | |
| 5803 o.add(buildPricingSchedulePricingPeriod()); | |
| 5804 o.add(buildPricingSchedulePricingPeriod()); | |
| 5805 return o; | |
| 5806 } | |
| 5807 | |
| 5808 checkUnnamed2009(core.List<api.PricingSchedulePricingPeriod> o) { | |
| 5809 unittest.expect(o, unittest.hasLength(2)); | |
| 5810 checkPricingSchedulePricingPeriod(o[0]); | |
| 5811 checkPricingSchedulePricingPeriod(o[1]); | |
| 5812 } | |
| 5813 | |
| 5814 core.int buildCounterPricingSchedule = 0; | |
| 5815 buildPricingSchedule() { | |
| 5816 var o = new api.PricingSchedule(); | |
| 5817 buildCounterPricingSchedule++; | |
| 5818 if (buildCounterPricingSchedule < 3) { | |
| 5819 o.capCostOption = "foo"; | |
| 5820 o.disregardOverdelivery = true; | |
| 5821 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5822 o.flighted = true; | |
| 5823 o.floodlightActivityId = "foo"; | |
| 5824 o.pricingPeriods = buildUnnamed2009(); | |
| 5825 o.pricingType = "foo"; | |
| 5826 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5827 o.testingStartDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5828 } | |
| 5829 buildCounterPricingSchedule--; | |
| 5830 return o; | |
| 5831 } | |
| 5832 | |
| 5833 checkPricingSchedule(api.PricingSchedule o) { | |
| 5834 buildCounterPricingSchedule++; | |
| 5835 if (buildCounterPricingSchedule < 3) { | |
| 5836 unittest.expect(o.capCostOption, unittest.equals('foo')); | |
| 5837 unittest.expect(o.disregardOverdelivery, unittest.isTrue); | |
| 5838 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5839 unittest.expect(o.flighted, unittest.isTrue); | |
| 5840 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 5841 checkUnnamed2009(o.pricingPeriods); | |
| 5842 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5843 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5844 unittest.expect(o.testingStartDate, unittest.equals(core.DateTime.parse("200
2-02-27T00:00:00"))); | |
| 5845 } | |
| 5846 buildCounterPricingSchedule--; | |
| 5847 } | |
| 5848 | |
| 5849 core.int buildCounterPricingSchedulePricingPeriod = 0; | |
| 5850 buildPricingSchedulePricingPeriod() { | |
| 5851 var o = new api.PricingSchedulePricingPeriod(); | |
| 5852 buildCounterPricingSchedulePricingPeriod++; | |
| 5853 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5854 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5855 o.pricingComment = "foo"; | |
| 5856 o.rateOrCostNanos = "foo"; | |
| 5857 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5858 o.units = "foo"; | |
| 5859 } | |
| 5860 buildCounterPricingSchedulePricingPeriod--; | |
| 5861 return o; | |
| 5862 } | |
| 5863 | |
| 5864 checkPricingSchedulePricingPeriod(api.PricingSchedulePricingPeriod o) { | |
| 5865 buildCounterPricingSchedulePricingPeriod++; | |
| 5866 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5867 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5868 unittest.expect(o.pricingComment, unittest.equals('foo')); | |
| 5869 unittest.expect(o.rateOrCostNanos, unittest.equals('foo')); | |
| 5870 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5871 unittest.expect(o.units, unittest.equals('foo')); | |
| 5872 } | |
| 5873 buildCounterPricingSchedulePricingPeriod--; | |
| 5874 } | |
| 5875 | |
| 5876 core.int buildCounterProject = 0; | |
| 5877 buildProject() { | |
| 5878 var o = new api.Project(); | |
| 5879 buildCounterProject++; | |
| 5880 if (buildCounterProject < 3) { | |
| 5881 o.accountId = "foo"; | |
| 5882 o.advertiserId = "foo"; | |
| 5883 o.audienceAgeGroup = "foo"; | |
| 5884 o.audienceGender = "foo"; | |
| 5885 o.budget = "foo"; | |
| 5886 o.clientBillingCode = "foo"; | |
| 5887 o.clientName = "foo"; | |
| 5888 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5889 o.id = "foo"; | |
| 5890 o.kind = "foo"; | |
| 5891 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5892 o.name = "foo"; | |
| 5893 o.overview = "foo"; | |
| 5894 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5895 o.subaccountId = "foo"; | |
| 5896 o.targetClicks = "foo"; | |
| 5897 o.targetConversions = "foo"; | |
| 5898 o.targetCpaNanos = "foo"; | |
| 5899 o.targetCpcNanos = "foo"; | |
| 5900 o.targetCpmNanos = "foo"; | |
| 5901 o.targetImpressions = "foo"; | |
| 5902 } | |
| 5903 buildCounterProject--; | |
| 5904 return o; | |
| 5905 } | |
| 5906 | |
| 5907 checkProject(api.Project o) { | |
| 5908 buildCounterProject++; | |
| 5909 if (buildCounterProject < 3) { | |
| 5910 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5911 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5912 unittest.expect(o.audienceAgeGroup, unittest.equals('foo')); | |
| 5913 unittest.expect(o.audienceGender, unittest.equals('foo')); | |
| 5914 unittest.expect(o.budget, unittest.equals('foo')); | |
| 5915 unittest.expect(o.clientBillingCode, unittest.equals('foo')); | |
| 5916 unittest.expect(o.clientName, unittest.equals('foo')); | |
| 5917 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5918 unittest.expect(o.id, unittest.equals('foo')); | |
| 5919 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5920 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5921 unittest.expect(o.name, unittest.equals('foo')); | |
| 5922 unittest.expect(o.overview, unittest.equals('foo')); | |
| 5923 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5924 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5925 unittest.expect(o.targetClicks, unittest.equals('foo')); | |
| 5926 unittest.expect(o.targetConversions, unittest.equals('foo')); | |
| 5927 unittest.expect(o.targetCpaNanos, unittest.equals('foo')); | |
| 5928 unittest.expect(o.targetCpcNanos, unittest.equals('foo')); | |
| 5929 unittest.expect(o.targetCpmNanos, unittest.equals('foo')); | |
| 5930 unittest.expect(o.targetImpressions, unittest.equals('foo')); | |
| 5931 } | |
| 5932 buildCounterProject--; | |
| 5933 } | |
| 5934 | |
| 5935 buildUnnamed2010() { | |
| 5936 var o = new core.List<api.Project>(); | |
| 5937 o.add(buildProject()); | |
| 5938 o.add(buildProject()); | |
| 5939 return o; | |
| 5940 } | |
| 5941 | |
| 5942 checkUnnamed2010(core.List<api.Project> o) { | |
| 5943 unittest.expect(o, unittest.hasLength(2)); | |
| 5944 checkProject(o[0]); | |
| 5945 checkProject(o[1]); | |
| 5946 } | |
| 5947 | |
| 5948 core.int buildCounterProjectsListResponse = 0; | |
| 5949 buildProjectsListResponse() { | |
| 5950 var o = new api.ProjectsListResponse(); | |
| 5951 buildCounterProjectsListResponse++; | |
| 5952 if (buildCounterProjectsListResponse < 3) { | |
| 5953 o.kind = "foo"; | |
| 5954 o.nextPageToken = "foo"; | |
| 5955 o.projects = buildUnnamed2010(); | |
| 5956 } | |
| 5957 buildCounterProjectsListResponse--; | |
| 5958 return o; | |
| 5959 } | |
| 5960 | |
| 5961 checkProjectsListResponse(api.ProjectsListResponse o) { | |
| 5962 buildCounterProjectsListResponse++; | |
| 5963 if (buildCounterProjectsListResponse < 3) { | |
| 5964 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5965 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5966 checkUnnamed2010(o.projects); | |
| 5967 } | |
| 5968 buildCounterProjectsListResponse--; | |
| 5969 } | |
| 5970 | |
| 5971 buildUnnamed2011() { | |
| 5972 var o = new core.List<api.Dimension>(); | |
| 5973 o.add(buildDimension()); | |
| 5974 o.add(buildDimension()); | |
| 5975 return o; | |
| 5976 } | |
| 5977 | |
| 5978 checkUnnamed2011(core.List<api.Dimension> o) { | |
| 5979 unittest.expect(o, unittest.hasLength(2)); | |
| 5980 checkDimension(o[0]); | |
| 5981 checkDimension(o[1]); | |
| 5982 } | |
| 5983 | |
| 5984 buildUnnamed2012() { | |
| 5985 var o = new core.List<api.Dimension>(); | |
| 5986 o.add(buildDimension()); | |
| 5987 o.add(buildDimension()); | |
| 5988 return o; | |
| 5989 } | |
| 5990 | |
| 5991 checkUnnamed2012(core.List<api.Dimension> o) { | |
| 5992 unittest.expect(o, unittest.hasLength(2)); | |
| 5993 checkDimension(o[0]); | |
| 5994 checkDimension(o[1]); | |
| 5995 } | |
| 5996 | |
| 5997 buildUnnamed2013() { | |
| 5998 var o = new core.List<api.Metric>(); | |
| 5999 o.add(buildMetric()); | |
| 6000 o.add(buildMetric()); | |
| 6001 return o; | |
| 6002 } | |
| 6003 | |
| 6004 checkUnnamed2013(core.List<api.Metric> o) { | |
| 6005 unittest.expect(o, unittest.hasLength(2)); | |
| 6006 checkMetric(o[0]); | |
| 6007 checkMetric(o[1]); | |
| 6008 } | |
| 6009 | |
| 6010 buildUnnamed2014() { | |
| 6011 var o = new core.List<api.Metric>(); | |
| 6012 o.add(buildMetric()); | |
| 6013 o.add(buildMetric()); | |
| 6014 return o; | |
| 6015 } | |
| 6016 | |
| 6017 checkUnnamed2014(core.List<api.Metric> o) { | |
| 6018 unittest.expect(o, unittest.hasLength(2)); | |
| 6019 checkMetric(o[0]); | |
| 6020 checkMetric(o[1]); | |
| 6021 } | |
| 6022 | |
| 6023 buildUnnamed2015() { | |
| 6024 var o = new core.List<api.Metric>(); | |
| 6025 o.add(buildMetric()); | |
| 6026 o.add(buildMetric()); | |
| 6027 return o; | |
| 6028 } | |
| 6029 | |
| 6030 checkUnnamed2015(core.List<api.Metric> o) { | |
| 6031 unittest.expect(o, unittest.hasLength(2)); | |
| 6032 checkMetric(o[0]); | |
| 6033 checkMetric(o[1]); | |
| 6034 } | |
| 6035 | |
| 6036 core.int buildCounterReachReportCompatibleFields = 0; | |
| 6037 buildReachReportCompatibleFields() { | |
| 6038 var o = new api.ReachReportCompatibleFields(); | |
| 6039 buildCounterReachReportCompatibleFields++; | |
| 6040 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6041 o.dimensionFilters = buildUnnamed2011(); | |
| 6042 o.dimensions = buildUnnamed2012(); | |
| 6043 o.kind = "foo"; | |
| 6044 o.metrics = buildUnnamed2013(); | |
| 6045 o.pivotedActivityMetrics = buildUnnamed2014(); | |
| 6046 o.reachByFrequencyMetrics = buildUnnamed2015(); | |
| 6047 } | |
| 6048 buildCounterReachReportCompatibleFields--; | |
| 6049 return o; | |
| 6050 } | |
| 6051 | |
| 6052 checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { | |
| 6053 buildCounterReachReportCompatibleFields++; | |
| 6054 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6055 checkUnnamed2011(o.dimensionFilters); | |
| 6056 checkUnnamed2012(o.dimensions); | |
| 6057 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6058 checkUnnamed2013(o.metrics); | |
| 6059 checkUnnamed2014(o.pivotedActivityMetrics); | |
| 6060 checkUnnamed2015(o.reachByFrequencyMetrics); | |
| 6061 } | |
| 6062 buildCounterReachReportCompatibleFields--; | |
| 6063 } | |
| 6064 | |
| 6065 core.int buildCounterRecipient = 0; | |
| 6066 buildRecipient() { | |
| 6067 var o = new api.Recipient(); | |
| 6068 buildCounterRecipient++; | |
| 6069 if (buildCounterRecipient < 3) { | |
| 6070 o.deliveryType = "foo"; | |
| 6071 o.email = "foo"; | |
| 6072 o.kind = "foo"; | |
| 6073 } | |
| 6074 buildCounterRecipient--; | |
| 6075 return o; | |
| 6076 } | |
| 6077 | |
| 6078 checkRecipient(api.Recipient o) { | |
| 6079 buildCounterRecipient++; | |
| 6080 if (buildCounterRecipient < 3) { | |
| 6081 unittest.expect(o.deliveryType, unittest.equals('foo')); | |
| 6082 unittest.expect(o.email, unittest.equals('foo')); | |
| 6083 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6084 } | |
| 6085 buildCounterRecipient--; | |
| 6086 } | |
| 6087 | |
| 6088 core.int buildCounterRegion = 0; | |
| 6089 buildRegion() { | |
| 6090 var o = new api.Region(); | |
| 6091 buildCounterRegion++; | |
| 6092 if (buildCounterRegion < 3) { | |
| 6093 o.countryCode = "foo"; | |
| 6094 o.countryDartId = "foo"; | |
| 6095 o.dartId = "foo"; | |
| 6096 o.kind = "foo"; | |
| 6097 o.name = "foo"; | |
| 6098 o.regionCode = "foo"; | |
| 6099 } | |
| 6100 buildCounterRegion--; | |
| 6101 return o; | |
| 6102 } | |
| 6103 | |
| 6104 checkRegion(api.Region o) { | |
| 6105 buildCounterRegion++; | |
| 6106 if (buildCounterRegion < 3) { | |
| 6107 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 6108 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 6109 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 6110 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6111 unittest.expect(o.name, unittest.equals('foo')); | |
| 6112 unittest.expect(o.regionCode, unittest.equals('foo')); | |
| 6113 } | |
| 6114 buildCounterRegion--; | |
| 6115 } | |
| 6116 | |
| 6117 buildUnnamed2016() { | |
| 6118 var o = new core.List<api.Region>(); | |
| 6119 o.add(buildRegion()); | |
| 6120 o.add(buildRegion()); | |
| 6121 return o; | |
| 6122 } | |
| 6123 | |
| 6124 checkUnnamed2016(core.List<api.Region> o) { | |
| 6125 unittest.expect(o, unittest.hasLength(2)); | |
| 6126 checkRegion(o[0]); | |
| 6127 checkRegion(o[1]); | |
| 6128 } | |
| 6129 | |
| 6130 core.int buildCounterRegionsListResponse = 0; | |
| 6131 buildRegionsListResponse() { | |
| 6132 var o = new api.RegionsListResponse(); | |
| 6133 buildCounterRegionsListResponse++; | |
| 6134 if (buildCounterRegionsListResponse < 3) { | |
| 6135 o.kind = "foo"; | |
| 6136 o.regions = buildUnnamed2016(); | |
| 6137 } | |
| 6138 buildCounterRegionsListResponse--; | |
| 6139 return o; | |
| 6140 } | |
| 6141 | |
| 6142 checkRegionsListResponse(api.RegionsListResponse o) { | |
| 6143 buildCounterRegionsListResponse++; | |
| 6144 if (buildCounterRegionsListResponse < 3) { | |
| 6145 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6146 checkUnnamed2016(o.regions); | |
| 6147 } | |
| 6148 buildCounterRegionsListResponse--; | |
| 6149 } | |
| 6150 | |
| 6151 core.int buildCounterRemarketingList = 0; | |
| 6152 buildRemarketingList() { | |
| 6153 var o = new api.RemarketingList(); | |
| 6154 buildCounterRemarketingList++; | |
| 6155 if (buildCounterRemarketingList < 3) { | |
| 6156 o.accountId = "foo"; | |
| 6157 o.active = true; | |
| 6158 o.advertiserId = "foo"; | |
| 6159 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 6160 o.description = "foo"; | |
| 6161 o.id = "foo"; | |
| 6162 o.kind = "foo"; | |
| 6163 o.lifeSpan = "foo"; | |
| 6164 o.listPopulationRule = buildListPopulationRule(); | |
| 6165 o.listSize = "foo"; | |
| 6166 o.listSource = "foo"; | |
| 6167 o.name = "foo"; | |
| 6168 o.subaccountId = "foo"; | |
| 6169 } | |
| 6170 buildCounterRemarketingList--; | |
| 6171 return o; | |
| 6172 } | |
| 6173 | |
| 6174 checkRemarketingList(api.RemarketingList o) { | |
| 6175 buildCounterRemarketingList++; | |
| 6176 if (buildCounterRemarketingList < 3) { | |
| 6177 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6178 unittest.expect(o.active, unittest.isTrue); | |
| 6179 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 6180 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 6181 unittest.expect(o.description, unittest.equals('foo')); | |
| 6182 unittest.expect(o.id, unittest.equals('foo')); | |
| 6183 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6184 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 6185 checkListPopulationRule(o.listPopulationRule); | |
| 6186 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 6187 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 6188 unittest.expect(o.name, unittest.equals('foo')); | |
| 6189 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 6190 } | |
| 6191 buildCounterRemarketingList--; | |
| 6192 } | |
| 6193 | |
| 6194 buildUnnamed2017() { | |
| 6195 var o = new core.List<core.String>(); | |
| 6196 o.add("foo"); | |
| 6197 o.add("foo"); | |
| 6198 return o; | |
| 6199 } | |
| 6200 | |
| 6201 checkUnnamed2017(core.List<core.String> o) { | |
| 6202 unittest.expect(o, unittest.hasLength(2)); | |
| 6203 unittest.expect(o[0], unittest.equals('foo')); | |
| 6204 unittest.expect(o[1], unittest.equals('foo')); | |
| 6205 } | |
| 6206 | |
| 6207 buildUnnamed2018() { | |
| 6208 var o = new core.List<core.String>(); | |
| 6209 o.add("foo"); | |
| 6210 o.add("foo"); | |
| 6211 return o; | |
| 6212 } | |
| 6213 | |
| 6214 checkUnnamed2018(core.List<core.String> o) { | |
| 6215 unittest.expect(o, unittest.hasLength(2)); | |
| 6216 unittest.expect(o[0], unittest.equals('foo')); | |
| 6217 unittest.expect(o[1], unittest.equals('foo')); | |
| 6218 } | |
| 6219 | |
| 6220 core.int buildCounterRemarketingListShare = 0; | |
| 6221 buildRemarketingListShare() { | |
| 6222 var o = new api.RemarketingListShare(); | |
| 6223 buildCounterRemarketingListShare++; | |
| 6224 if (buildCounterRemarketingListShare < 3) { | |
| 6225 o.kind = "foo"; | |
| 6226 o.remarketingListId = "foo"; | |
| 6227 o.sharedAccountIds = buildUnnamed2017(); | |
| 6228 o.sharedAdvertiserIds = buildUnnamed2018(); | |
| 6229 } | |
| 6230 buildCounterRemarketingListShare--; | |
| 6231 return o; | |
| 6232 } | |
| 6233 | |
| 6234 checkRemarketingListShare(api.RemarketingListShare o) { | |
| 6235 buildCounterRemarketingListShare++; | |
| 6236 if (buildCounterRemarketingListShare < 3) { | |
| 6237 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6238 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 6239 checkUnnamed2017(o.sharedAccountIds); | |
| 6240 checkUnnamed2018(o.sharedAdvertiserIds); | |
| 6241 } | |
| 6242 buildCounterRemarketingListShare--; | |
| 6243 } | |
| 6244 | |
| 6245 buildUnnamed2019() { | |
| 6246 var o = new core.List<api.RemarketingList>(); | |
| 6247 o.add(buildRemarketingList()); | |
| 6248 o.add(buildRemarketingList()); | |
| 6249 return o; | |
| 6250 } | |
| 6251 | |
| 6252 checkUnnamed2019(core.List<api.RemarketingList> o) { | |
| 6253 unittest.expect(o, unittest.hasLength(2)); | |
| 6254 checkRemarketingList(o[0]); | |
| 6255 checkRemarketingList(o[1]); | |
| 6256 } | |
| 6257 | |
| 6258 core.int buildCounterRemarketingListsListResponse = 0; | |
| 6259 buildRemarketingListsListResponse() { | |
| 6260 var o = new api.RemarketingListsListResponse(); | |
| 6261 buildCounterRemarketingListsListResponse++; | |
| 6262 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6263 o.kind = "foo"; | |
| 6264 o.nextPageToken = "foo"; | |
| 6265 o.remarketingLists = buildUnnamed2019(); | |
| 6266 } | |
| 6267 buildCounterRemarketingListsListResponse--; | |
| 6268 return o; | |
| 6269 } | |
| 6270 | |
| 6271 checkRemarketingListsListResponse(api.RemarketingListsListResponse o) { | |
| 6272 buildCounterRemarketingListsListResponse++; | |
| 6273 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6274 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6275 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 6276 checkUnnamed2019(o.remarketingLists); | |
| 6277 } | |
| 6278 buildCounterRemarketingListsListResponse--; | |
| 6279 } | |
| 6280 | |
| 6281 buildUnnamed2020() { | |
| 6282 var o = new core.List<api.DimensionValue>(); | |
| 6283 o.add(buildDimensionValue()); | |
| 6284 o.add(buildDimensionValue()); | |
| 6285 return o; | |
| 6286 } | |
| 6287 | |
| 6288 checkUnnamed2020(core.List<api.DimensionValue> o) { | |
| 6289 unittest.expect(o, unittest.hasLength(2)); | |
| 6290 checkDimensionValue(o[0]); | |
| 6291 checkDimensionValue(o[1]); | |
| 6292 } | |
| 6293 | |
| 6294 buildUnnamed2021() { | |
| 6295 var o = new core.List<api.SortedDimension>(); | |
| 6296 o.add(buildSortedDimension()); | |
| 6297 o.add(buildSortedDimension()); | |
| 6298 return o; | |
| 6299 } | |
| 6300 | |
| 6301 checkUnnamed2021(core.List<api.SortedDimension> o) { | |
| 6302 unittest.expect(o, unittest.hasLength(2)); | |
| 6303 checkSortedDimension(o[0]); | |
| 6304 checkSortedDimension(o[1]); | |
| 6305 } | |
| 6306 | |
| 6307 buildUnnamed2022() { | |
| 6308 var o = new core.List<core.String>(); | |
| 6309 o.add("foo"); | |
| 6310 o.add("foo"); | |
| 6311 return o; | |
| 6312 } | |
| 6313 | |
| 6314 checkUnnamed2022(core.List<core.String> o) { | |
| 6315 unittest.expect(o, unittest.hasLength(2)); | |
| 6316 unittest.expect(o[0], unittest.equals('foo')); | |
| 6317 unittest.expect(o[1], unittest.equals('foo')); | |
| 6318 } | |
| 6319 | |
| 6320 core.int buildCounterReportCriteria = 0; | |
| 6321 buildReportCriteria() { | |
| 6322 var o = new api.ReportCriteria(); | |
| 6323 buildCounterReportCriteria++; | |
| 6324 if (buildCounterReportCriteria < 3) { | |
| 6325 o.activities = buildActivities(); | |
| 6326 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6327 o.dateRange = buildDateRange(); | |
| 6328 o.dimensionFilters = buildUnnamed2020(); | |
| 6329 o.dimensions = buildUnnamed2021(); | |
| 6330 o.metricNames = buildUnnamed2022(); | |
| 6331 } | |
| 6332 buildCounterReportCriteria--; | |
| 6333 return o; | |
| 6334 } | |
| 6335 | |
| 6336 checkReportCriteria(api.ReportCriteria o) { | |
| 6337 buildCounterReportCriteria++; | |
| 6338 if (buildCounterReportCriteria < 3) { | |
| 6339 checkActivities(o.activities); | |
| 6340 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6341 checkDateRange(o.dateRange); | |
| 6342 checkUnnamed2020(o.dimensionFilters); | |
| 6343 checkUnnamed2021(o.dimensions); | |
| 6344 checkUnnamed2022(o.metricNames); | |
| 6345 } | |
| 6346 buildCounterReportCriteria--; | |
| 6347 } | |
| 6348 | |
| 6349 buildUnnamed2023() { | |
| 6350 var o = new core.List<api.SortedDimension>(); | |
| 6351 o.add(buildSortedDimension()); | |
| 6352 o.add(buildSortedDimension()); | |
| 6353 return o; | |
| 6354 } | |
| 6355 | |
| 6356 checkUnnamed2023(core.List<api.SortedDimension> o) { | |
| 6357 unittest.expect(o, unittest.hasLength(2)); | |
| 6358 checkSortedDimension(o[0]); | |
| 6359 checkSortedDimension(o[1]); | |
| 6360 } | |
| 6361 | |
| 6362 buildUnnamed2024() { | |
| 6363 var o = new core.List<api.DimensionValue>(); | |
| 6364 o.add(buildDimensionValue()); | |
| 6365 o.add(buildDimensionValue()); | |
| 6366 return o; | |
| 6367 } | |
| 6368 | |
| 6369 checkUnnamed2024(core.List<api.DimensionValue> o) { | |
| 6370 unittest.expect(o, unittest.hasLength(2)); | |
| 6371 checkDimensionValue(o[0]); | |
| 6372 checkDimensionValue(o[1]); | |
| 6373 } | |
| 6374 | |
| 6375 buildUnnamed2025() { | |
| 6376 var o = new core.List<core.String>(); | |
| 6377 o.add("foo"); | |
| 6378 o.add("foo"); | |
| 6379 return o; | |
| 6380 } | |
| 6381 | |
| 6382 checkUnnamed2025(core.List<core.String> o) { | |
| 6383 unittest.expect(o, unittest.hasLength(2)); | |
| 6384 unittest.expect(o[0], unittest.equals('foo')); | |
| 6385 unittest.expect(o[1], unittest.equals('foo')); | |
| 6386 } | |
| 6387 | |
| 6388 buildUnnamed2026() { | |
| 6389 var o = new core.List<core.String>(); | |
| 6390 o.add("foo"); | |
| 6391 o.add("foo"); | |
| 6392 return o; | |
| 6393 } | |
| 6394 | |
| 6395 checkUnnamed2026(core.List<core.String> o) { | |
| 6396 unittest.expect(o, unittest.hasLength(2)); | |
| 6397 unittest.expect(o[0], unittest.equals('foo')); | |
| 6398 unittest.expect(o[1], unittest.equals('foo')); | |
| 6399 } | |
| 6400 | |
| 6401 core.int buildCounterReportCrossDimensionReachCriteria = 0; | |
| 6402 buildReportCrossDimensionReachCriteria() { | |
| 6403 var o = new api.ReportCrossDimensionReachCriteria(); | |
| 6404 buildCounterReportCrossDimensionReachCriteria++; | |
| 6405 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6406 o.breakdown = buildUnnamed2023(); | |
| 6407 o.dateRange = buildDateRange(); | |
| 6408 o.dimension = "foo"; | |
| 6409 o.dimensionFilters = buildUnnamed2024(); | |
| 6410 o.metricNames = buildUnnamed2025(); | |
| 6411 o.overlapMetricNames = buildUnnamed2026(); | |
| 6412 o.pivoted = true; | |
| 6413 } | |
| 6414 buildCounterReportCrossDimensionReachCriteria--; | |
| 6415 return o; | |
| 6416 } | |
| 6417 | |
| 6418 checkReportCrossDimensionReachCriteria(api.ReportCrossDimensionReachCriteria o)
{ | |
| 6419 buildCounterReportCrossDimensionReachCriteria++; | |
| 6420 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6421 checkUnnamed2023(o.breakdown); | |
| 6422 checkDateRange(o.dateRange); | |
| 6423 unittest.expect(o.dimension, unittest.equals('foo')); | |
| 6424 checkUnnamed2024(o.dimensionFilters); | |
| 6425 checkUnnamed2025(o.metricNames); | |
| 6426 checkUnnamed2026(o.overlapMetricNames); | |
| 6427 unittest.expect(o.pivoted, unittest.isTrue); | |
| 6428 } | |
| 6429 buildCounterReportCrossDimensionReachCriteria--; | |
| 6430 } | |
| 6431 | |
| 6432 buildUnnamed2027() { | |
| 6433 var o = new core.List<api.Recipient>(); | |
| 6434 o.add(buildRecipient()); | |
| 6435 o.add(buildRecipient()); | |
| 6436 return o; | |
| 6437 } | |
| 6438 | |
| 6439 checkUnnamed2027(core.List<api.Recipient> o) { | |
| 6440 unittest.expect(o, unittest.hasLength(2)); | |
| 6441 checkRecipient(o[0]); | |
| 6442 checkRecipient(o[1]); | |
| 6443 } | |
| 6444 | |
| 6445 core.int buildCounterReportDelivery = 0; | |
| 6446 buildReportDelivery() { | |
| 6447 var o = new api.ReportDelivery(); | |
| 6448 buildCounterReportDelivery++; | |
| 6449 if (buildCounterReportDelivery < 3) { | |
| 6450 o.emailOwner = true; | |
| 6451 o.emailOwnerDeliveryType = "foo"; | |
| 6452 o.message = "foo"; | |
| 6453 o.recipients = buildUnnamed2027(); | |
| 6454 } | |
| 6455 buildCounterReportDelivery--; | |
| 6456 return o; | |
| 6457 } | |
| 6458 | |
| 6459 checkReportDelivery(api.ReportDelivery o) { | |
| 6460 buildCounterReportDelivery++; | |
| 6461 if (buildCounterReportDelivery < 3) { | |
| 6462 unittest.expect(o.emailOwner, unittest.isTrue); | |
| 6463 unittest.expect(o.emailOwnerDeliveryType, unittest.equals('foo')); | |
| 6464 unittest.expect(o.message, unittest.equals('foo')); | |
| 6465 checkUnnamed2027(o.recipients); | |
| 6466 } | |
| 6467 buildCounterReportDelivery--; | |
| 6468 } | |
| 6469 | |
| 6470 buildUnnamed2028() { | |
| 6471 var o = new core.List<api.DimensionValue>(); | |
| 6472 o.add(buildDimensionValue()); | |
| 6473 o.add(buildDimensionValue()); | |
| 6474 return o; | |
| 6475 } | |
| 6476 | |
| 6477 checkUnnamed2028(core.List<api.DimensionValue> o) { | |
| 6478 unittest.expect(o, unittest.hasLength(2)); | |
| 6479 checkDimensionValue(o[0]); | |
| 6480 checkDimensionValue(o[1]); | |
| 6481 } | |
| 6482 | |
| 6483 buildUnnamed2029() { | |
| 6484 var o = new core.List<api.DimensionValue>(); | |
| 6485 o.add(buildDimensionValue()); | |
| 6486 o.add(buildDimensionValue()); | |
| 6487 return o; | |
| 6488 } | |
| 6489 | |
| 6490 checkUnnamed2029(core.List<api.DimensionValue> o) { | |
| 6491 unittest.expect(o, unittest.hasLength(2)); | |
| 6492 checkDimensionValue(o[0]); | |
| 6493 checkDimensionValue(o[1]); | |
| 6494 } | |
| 6495 | |
| 6496 buildUnnamed2030() { | |
| 6497 var o = new core.List<api.SortedDimension>(); | |
| 6498 o.add(buildSortedDimension()); | |
| 6499 o.add(buildSortedDimension()); | |
| 6500 return o; | |
| 6501 } | |
| 6502 | |
| 6503 checkUnnamed2030(core.List<api.SortedDimension> o) { | |
| 6504 unittest.expect(o, unittest.hasLength(2)); | |
| 6505 checkSortedDimension(o[0]); | |
| 6506 checkSortedDimension(o[1]); | |
| 6507 } | |
| 6508 | |
| 6509 buildUnnamed2031() { | |
| 6510 var o = new core.List<core.String>(); | |
| 6511 o.add("foo"); | |
| 6512 o.add("foo"); | |
| 6513 return o; | |
| 6514 } | |
| 6515 | |
| 6516 checkUnnamed2031(core.List<core.String> o) { | |
| 6517 unittest.expect(o, unittest.hasLength(2)); | |
| 6518 unittest.expect(o[0], unittest.equals('foo')); | |
| 6519 unittest.expect(o[1], unittest.equals('foo')); | |
| 6520 } | |
| 6521 | |
| 6522 core.int buildCounterReportFloodlightCriteriaReportProperties = 0; | |
| 6523 buildReportFloodlightCriteriaReportProperties() { | |
| 6524 var o = new api.ReportFloodlightCriteriaReportProperties(); | |
| 6525 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6526 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6527 o.includeAttributedIPConversions = true; | |
| 6528 o.includeUnattributedCookieConversions = true; | |
| 6529 o.includeUnattributedIPConversions = true; | |
| 6530 } | |
| 6531 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6532 return o; | |
| 6533 } | |
| 6534 | |
| 6535 checkReportFloodlightCriteriaReportProperties(api.ReportFloodlightCriteriaReport
Properties o) { | |
| 6536 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6537 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6538 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6539 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6540 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6541 } | |
| 6542 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6543 } | |
| 6544 | |
| 6545 core.int buildCounterReportFloodlightCriteria = 0; | |
| 6546 buildReportFloodlightCriteria() { | |
| 6547 var o = new api.ReportFloodlightCriteria(); | |
| 6548 buildCounterReportFloodlightCriteria++; | |
| 6549 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6550 o.customRichMediaEvents = buildUnnamed2028(); | |
| 6551 o.dateRange = buildDateRange(); | |
| 6552 o.dimensionFilters = buildUnnamed2029(); | |
| 6553 o.dimensions = buildUnnamed2030(); | |
| 6554 o.floodlightConfigId = buildDimensionValue(); | |
| 6555 o.metricNames = buildUnnamed2031(); | |
| 6556 o.reportProperties = buildReportFloodlightCriteriaReportProperties(); | |
| 6557 } | |
| 6558 buildCounterReportFloodlightCriteria--; | |
| 6559 return o; | |
| 6560 } | |
| 6561 | |
| 6562 checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { | |
| 6563 buildCounterReportFloodlightCriteria++; | |
| 6564 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6565 checkUnnamed2028(o.customRichMediaEvents); | |
| 6566 checkDateRange(o.dateRange); | |
| 6567 checkUnnamed2029(o.dimensionFilters); | |
| 6568 checkUnnamed2030(o.dimensions); | |
| 6569 checkDimensionValue(o.floodlightConfigId); | |
| 6570 checkUnnamed2031(o.metricNames); | |
| 6571 checkReportFloodlightCriteriaReportProperties(o.reportProperties); | |
| 6572 } | |
| 6573 buildCounterReportFloodlightCriteria--; | |
| 6574 } | |
| 6575 | |
| 6576 buildUnnamed2032() { | |
| 6577 var o = new core.List<api.DimensionValue>(); | |
| 6578 o.add(buildDimensionValue()); | |
| 6579 o.add(buildDimensionValue()); | |
| 6580 return o; | |
| 6581 } | |
| 6582 | |
| 6583 checkUnnamed2032(core.List<api.DimensionValue> o) { | |
| 6584 unittest.expect(o, unittest.hasLength(2)); | |
| 6585 checkDimensionValue(o[0]); | |
| 6586 checkDimensionValue(o[1]); | |
| 6587 } | |
| 6588 | |
| 6589 buildUnnamed2033() { | |
| 6590 var o = new core.List<api.SortedDimension>(); | |
| 6591 o.add(buildSortedDimension()); | |
| 6592 o.add(buildSortedDimension()); | |
| 6593 return o; | |
| 6594 } | |
| 6595 | |
| 6596 checkUnnamed2033(core.List<api.SortedDimension> o) { | |
| 6597 unittest.expect(o, unittest.hasLength(2)); | |
| 6598 checkSortedDimension(o[0]); | |
| 6599 checkSortedDimension(o[1]); | |
| 6600 } | |
| 6601 | |
| 6602 buildUnnamed2034() { | |
| 6603 var o = new core.List<api.SortedDimension>(); | |
| 6604 o.add(buildSortedDimension()); | |
| 6605 o.add(buildSortedDimension()); | |
| 6606 return o; | |
| 6607 } | |
| 6608 | |
| 6609 checkUnnamed2034(core.List<api.SortedDimension> o) { | |
| 6610 unittest.expect(o, unittest.hasLength(2)); | |
| 6611 checkSortedDimension(o[0]); | |
| 6612 checkSortedDimension(o[1]); | |
| 6613 } | |
| 6614 | |
| 6615 buildUnnamed2035() { | |
| 6616 var o = new core.List<api.DimensionValue>(); | |
| 6617 o.add(buildDimensionValue()); | |
| 6618 o.add(buildDimensionValue()); | |
| 6619 return o; | |
| 6620 } | |
| 6621 | |
| 6622 checkUnnamed2035(core.List<api.DimensionValue> o) { | |
| 6623 unittest.expect(o, unittest.hasLength(2)); | |
| 6624 checkDimensionValue(o[0]); | |
| 6625 checkDimensionValue(o[1]); | |
| 6626 } | |
| 6627 | |
| 6628 buildUnnamed2036() { | |
| 6629 var o = new core.List<core.String>(); | |
| 6630 o.add("foo"); | |
| 6631 o.add("foo"); | |
| 6632 return o; | |
| 6633 } | |
| 6634 | |
| 6635 checkUnnamed2036(core.List<core.String> o) { | |
| 6636 unittest.expect(o, unittest.hasLength(2)); | |
| 6637 unittest.expect(o[0], unittest.equals('foo')); | |
| 6638 unittest.expect(o[1], unittest.equals('foo')); | |
| 6639 } | |
| 6640 | |
| 6641 buildUnnamed2037() { | |
| 6642 var o = new core.List<api.SortedDimension>(); | |
| 6643 o.add(buildSortedDimension()); | |
| 6644 o.add(buildSortedDimension()); | |
| 6645 return o; | |
| 6646 } | |
| 6647 | |
| 6648 checkUnnamed2037(core.List<api.SortedDimension> o) { | |
| 6649 unittest.expect(o, unittest.hasLength(2)); | |
| 6650 checkSortedDimension(o[0]); | |
| 6651 checkSortedDimension(o[1]); | |
| 6652 } | |
| 6653 | |
| 6654 core.int buildCounterReportPathToConversionCriteriaReportProperties = 0; | |
| 6655 buildReportPathToConversionCriteriaReportProperties() { | |
| 6656 var o = new api.ReportPathToConversionCriteriaReportProperties(); | |
| 6657 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6658 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6659 o.clicksLookbackWindow = 42; | |
| 6660 o.impressionsLookbackWindow = 42; | |
| 6661 o.includeAttributedIPConversions = true; | |
| 6662 o.includeUnattributedCookieConversions = true; | |
| 6663 o.includeUnattributedIPConversions = true; | |
| 6664 o.maximumClickInteractions = 42; | |
| 6665 o.maximumImpressionInteractions = 42; | |
| 6666 o.maximumInteractionGap = 42; | |
| 6667 o.pivotOnInteractionPath = true; | |
| 6668 } | |
| 6669 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6670 return o; | |
| 6671 } | |
| 6672 | |
| 6673 checkReportPathToConversionCriteriaReportProperties(api.ReportPathToConversionCr
iteriaReportProperties o) { | |
| 6674 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6675 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6676 unittest.expect(o.clicksLookbackWindow, unittest.equals(42)); | |
| 6677 unittest.expect(o.impressionsLookbackWindow, unittest.equals(42)); | |
| 6678 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6679 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6680 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6681 unittest.expect(o.maximumClickInteractions, unittest.equals(42)); | |
| 6682 unittest.expect(o.maximumImpressionInteractions, unittest.equals(42)); | |
| 6683 unittest.expect(o.maximumInteractionGap, unittest.equals(42)); | |
| 6684 unittest.expect(o.pivotOnInteractionPath, unittest.isTrue); | |
| 6685 } | |
| 6686 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6687 } | |
| 6688 | |
| 6689 core.int buildCounterReportPathToConversionCriteria = 0; | |
| 6690 buildReportPathToConversionCriteria() { | |
| 6691 var o = new api.ReportPathToConversionCriteria(); | |
| 6692 buildCounterReportPathToConversionCriteria++; | |
| 6693 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6694 o.activityFilters = buildUnnamed2032(); | |
| 6695 o.conversionDimensions = buildUnnamed2033(); | |
| 6696 o.customFloodlightVariables = buildUnnamed2034(); | |
| 6697 o.customRichMediaEvents = buildUnnamed2035(); | |
| 6698 o.dateRange = buildDateRange(); | |
| 6699 o.floodlightConfigId = buildDimensionValue(); | |
| 6700 o.metricNames = buildUnnamed2036(); | |
| 6701 o.perInteractionDimensions = buildUnnamed2037(); | |
| 6702 o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); | |
| 6703 } | |
| 6704 buildCounterReportPathToConversionCriteria--; | |
| 6705 return o; | |
| 6706 } | |
| 6707 | |
| 6708 checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { | |
| 6709 buildCounterReportPathToConversionCriteria++; | |
| 6710 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6711 checkUnnamed2032(o.activityFilters); | |
| 6712 checkUnnamed2033(o.conversionDimensions); | |
| 6713 checkUnnamed2034(o.customFloodlightVariables); | |
| 6714 checkUnnamed2035(o.customRichMediaEvents); | |
| 6715 checkDateRange(o.dateRange); | |
| 6716 checkDimensionValue(o.floodlightConfigId); | |
| 6717 checkUnnamed2036(o.metricNames); | |
| 6718 checkUnnamed2037(o.perInteractionDimensions); | |
| 6719 checkReportPathToConversionCriteriaReportProperties(o.reportProperties); | |
| 6720 } | |
| 6721 buildCounterReportPathToConversionCriteria--; | |
| 6722 } | |
| 6723 | |
| 6724 buildUnnamed2038() { | |
| 6725 var o = new core.List<api.DimensionValue>(); | |
| 6726 o.add(buildDimensionValue()); | |
| 6727 o.add(buildDimensionValue()); | |
| 6728 return o; | |
| 6729 } | |
| 6730 | |
| 6731 checkUnnamed2038(core.List<api.DimensionValue> o) { | |
| 6732 unittest.expect(o, unittest.hasLength(2)); | |
| 6733 checkDimensionValue(o[0]); | |
| 6734 checkDimensionValue(o[1]); | |
| 6735 } | |
| 6736 | |
| 6737 buildUnnamed2039() { | |
| 6738 var o = new core.List<api.SortedDimension>(); | |
| 6739 o.add(buildSortedDimension()); | |
| 6740 o.add(buildSortedDimension()); | |
| 6741 return o; | |
| 6742 } | |
| 6743 | |
| 6744 checkUnnamed2039(core.List<api.SortedDimension> o) { | |
| 6745 unittest.expect(o, unittest.hasLength(2)); | |
| 6746 checkSortedDimension(o[0]); | |
| 6747 checkSortedDimension(o[1]); | |
| 6748 } | |
| 6749 | |
| 6750 buildUnnamed2040() { | |
| 6751 var o = new core.List<core.String>(); | |
| 6752 o.add("foo"); | |
| 6753 o.add("foo"); | |
| 6754 return o; | |
| 6755 } | |
| 6756 | |
| 6757 checkUnnamed2040(core.List<core.String> o) { | |
| 6758 unittest.expect(o, unittest.hasLength(2)); | |
| 6759 unittest.expect(o[0], unittest.equals('foo')); | |
| 6760 unittest.expect(o[1], unittest.equals('foo')); | |
| 6761 } | |
| 6762 | |
| 6763 buildUnnamed2041() { | |
| 6764 var o = new core.List<core.String>(); | |
| 6765 o.add("foo"); | |
| 6766 o.add("foo"); | |
| 6767 return o; | |
| 6768 } | |
| 6769 | |
| 6770 checkUnnamed2041(core.List<core.String> o) { | |
| 6771 unittest.expect(o, unittest.hasLength(2)); | |
| 6772 unittest.expect(o[0], unittest.equals('foo')); | |
| 6773 unittest.expect(o[1], unittest.equals('foo')); | |
| 6774 } | |
| 6775 | |
| 6776 core.int buildCounterReportReachCriteria = 0; | |
| 6777 buildReportReachCriteria() { | |
| 6778 var o = new api.ReportReachCriteria(); | |
| 6779 buildCounterReportReachCriteria++; | |
| 6780 if (buildCounterReportReachCriteria < 3) { | |
| 6781 o.activities = buildActivities(); | |
| 6782 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6783 o.dateRange = buildDateRange(); | |
| 6784 o.dimensionFilters = buildUnnamed2038(); | |
| 6785 o.dimensions = buildUnnamed2039(); | |
| 6786 o.enableAllDimensionCombinations = true; | |
| 6787 o.metricNames = buildUnnamed2040(); | |
| 6788 o.reachByFrequencyMetricNames = buildUnnamed2041(); | |
| 6789 } | |
| 6790 buildCounterReportReachCriteria--; | |
| 6791 return o; | |
| 6792 } | |
| 6793 | |
| 6794 checkReportReachCriteria(api.ReportReachCriteria o) { | |
| 6795 buildCounterReportReachCriteria++; | |
| 6796 if (buildCounterReportReachCriteria < 3) { | |
| 6797 checkActivities(o.activities); | |
| 6798 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6799 checkDateRange(o.dateRange); | |
| 6800 checkUnnamed2038(o.dimensionFilters); | |
| 6801 checkUnnamed2039(o.dimensions); | |
| 6802 unittest.expect(o.enableAllDimensionCombinations, unittest.isTrue); | |
| 6803 checkUnnamed2040(o.metricNames); | |
| 6804 checkUnnamed2041(o.reachByFrequencyMetricNames); | |
| 6805 } | |
| 6806 buildCounterReportReachCriteria--; | |
| 6807 } | |
| 6808 | |
| 6809 buildUnnamed2042() { | |
| 6810 var o = new core.List<core.String>(); | |
| 6811 o.add("foo"); | |
| 6812 o.add("foo"); | |
| 6813 return o; | |
| 6814 } | |
| 6815 | |
| 6816 checkUnnamed2042(core.List<core.String> o) { | |
| 6817 unittest.expect(o, unittest.hasLength(2)); | |
| 6818 unittest.expect(o[0], unittest.equals('foo')); | |
| 6819 unittest.expect(o[1], unittest.equals('foo')); | |
| 6820 } | |
| 6821 | |
| 6822 core.int buildCounterReportSchedule = 0; | |
| 6823 buildReportSchedule() { | |
| 6824 var o = new api.ReportSchedule(); | |
| 6825 buildCounterReportSchedule++; | |
| 6826 if (buildCounterReportSchedule < 3) { | |
| 6827 o.active = true; | |
| 6828 o.every = 42; | |
| 6829 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6830 o.repeats = "foo"; | |
| 6831 o.repeatsOnWeekDays = buildUnnamed2042(); | |
| 6832 o.runsOnDayOfMonth = "foo"; | |
| 6833 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6834 } | |
| 6835 buildCounterReportSchedule--; | |
| 6836 return o; | |
| 6837 } | |
| 6838 | |
| 6839 checkReportSchedule(api.ReportSchedule o) { | |
| 6840 buildCounterReportSchedule++; | |
| 6841 if (buildCounterReportSchedule < 3) { | |
| 6842 unittest.expect(o.active, unittest.isTrue); | |
| 6843 unittest.expect(o.every, unittest.equals(42)); | |
| 6844 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T00:00:00"))); | |
| 6845 unittest.expect(o.repeats, unittest.equals('foo')); | |
| 6846 checkUnnamed2042(o.repeatsOnWeekDays); | |
| 6847 unittest.expect(o.runsOnDayOfMonth, unittest.equals('foo')); | |
| 6848 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6849 } | |
| 6850 buildCounterReportSchedule--; | |
| 6851 } | |
| 6852 | |
| 6853 core.int buildCounterReport = 0; | |
| 6854 buildReport() { | |
| 6855 var o = new api.Report(); | |
| 6856 buildCounterReport++; | |
| 6857 if (buildCounterReport < 3) { | |
| 6858 o.accountId = "foo"; | |
| 6859 o.criteria = buildReportCriteria(); | |
| 6860 o.crossDimensionReachCriteria = buildReportCrossDimensionReachCriteria(); | |
| 6861 o.delivery = buildReportDelivery(); | |
| 6862 o.etag = "foo"; | |
| 6863 o.fileName = "foo"; | |
| 6864 o.floodlightCriteria = buildReportFloodlightCriteria(); | |
| 6865 o.format = "foo"; | |
| 6866 o.id = "foo"; | |
| 6867 o.kind = "foo"; | |
| 6868 o.lastModifiedTime = "foo"; | |
| 6869 o.name = "foo"; | |
| 6870 o.ownerProfileId = "foo"; | |
| 6871 o.pathToConversionCriteria = buildReportPathToConversionCriteria(); | |
| 6872 o.reachCriteria = buildReportReachCriteria(); | |
| 6873 o.schedule = buildReportSchedule(); | |
| 6874 o.subAccountId = "foo"; | |
| 6875 o.type = "foo"; | |
| 6876 } | |
| 6877 buildCounterReport--; | |
| 6878 return o; | |
| 6879 } | |
| 6880 | |
| 6881 checkReport(api.Report o) { | |
| 6882 buildCounterReport++; | |
| 6883 if (buildCounterReport < 3) { | |
| 6884 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6885 checkReportCriteria(o.criteria); | |
| 6886 checkReportCrossDimensionReachCriteria(o.crossDimensionReachCriteria); | |
| 6887 checkReportDelivery(o.delivery); | |
| 6888 unittest.expect(o.etag, unittest.equals('foo')); | |
| 6889 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 6890 checkReportFloodlightCriteria(o.floodlightCriteria); | |
| 6891 unittest.expect(o.format, unittest.equals('foo')); | |
| 6892 unittest.expect(o.id, unittest.equals('foo')); | |
| 6893 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6894 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 6895 unittest.expect(o.name, unittest.equals('foo')); | |
| 6896 unittest.expect(o.ownerProfileId, unittest.equals('foo')); | |
| 6897 checkReportPathToConversionCriteria(o.pathToConversionCriteria); | |
| 6898 checkReportReachCriteria(o.reachCriteria); | |
| 6899 checkReportSchedule(o.schedule); | |
| 6900 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 6901 unittest.expect(o.type, unittest.equals('foo')); | |
| 6902 } | |
| 6903 buildCounterReport--; | |
| 6904 } | |
| 6905 | |
| 6906 buildUnnamed2043() { | |
| 6907 var o = new core.List<api.Dimension>(); | |
| 6908 o.add(buildDimension()); | |
| 6909 o.add(buildDimension()); | |
| 6910 return o; | |
| 6911 } | |
| 6912 | |
| 6913 checkUnnamed2043(core.List<api.Dimension> o) { | |
| 6914 unittest.expect(o, unittest.hasLength(2)); | |
| 6915 checkDimension(o[0]); | |
| 6916 checkDimension(o[1]); | |
| 6917 } | |
| 6918 | |
| 6919 buildUnnamed2044() { | |
| 6920 var o = new core.List<api.Dimension>(); | |
| 6921 o.add(buildDimension()); | |
| 6922 o.add(buildDimension()); | |
| 6923 return o; | |
| 6924 } | |
| 6925 | |
| 6926 checkUnnamed2044(core.List<api.Dimension> o) { | |
| 6927 unittest.expect(o, unittest.hasLength(2)); | |
| 6928 checkDimension(o[0]); | |
| 6929 checkDimension(o[1]); | |
| 6930 } | |
| 6931 | |
| 6932 buildUnnamed2045() { | |
| 6933 var o = new core.List<api.Metric>(); | |
| 6934 o.add(buildMetric()); | |
| 6935 o.add(buildMetric()); | |
| 6936 return o; | |
| 6937 } | |
| 6938 | |
| 6939 checkUnnamed2045(core.List<api.Metric> o) { | |
| 6940 unittest.expect(o, unittest.hasLength(2)); | |
| 6941 checkMetric(o[0]); | |
| 6942 checkMetric(o[1]); | |
| 6943 } | |
| 6944 | |
| 6945 buildUnnamed2046() { | |
| 6946 var o = new core.List<api.Metric>(); | |
| 6947 o.add(buildMetric()); | |
| 6948 o.add(buildMetric()); | |
| 6949 return o; | |
| 6950 } | |
| 6951 | |
| 6952 checkUnnamed2046(core.List<api.Metric> o) { | |
| 6953 unittest.expect(o, unittest.hasLength(2)); | |
| 6954 checkMetric(o[0]); | |
| 6955 checkMetric(o[1]); | |
| 6956 } | |
| 6957 | |
| 6958 core.int buildCounterReportCompatibleFields = 0; | |
| 6959 buildReportCompatibleFields() { | |
| 6960 var o = new api.ReportCompatibleFields(); | |
| 6961 buildCounterReportCompatibleFields++; | |
| 6962 if (buildCounterReportCompatibleFields < 3) { | |
| 6963 o.dimensionFilters = buildUnnamed2043(); | |
| 6964 o.dimensions = buildUnnamed2044(); | |
| 6965 o.kind = "foo"; | |
| 6966 o.metrics = buildUnnamed2045(); | |
| 6967 o.pivotedActivityMetrics = buildUnnamed2046(); | |
| 6968 } | |
| 6969 buildCounterReportCompatibleFields--; | |
| 6970 return o; | |
| 6971 } | |
| 6972 | |
| 6973 checkReportCompatibleFields(api.ReportCompatibleFields o) { | |
| 6974 buildCounterReportCompatibleFields++; | |
| 6975 if (buildCounterReportCompatibleFields < 3) { | |
| 6976 checkUnnamed2043(o.dimensionFilters); | |
| 6977 checkUnnamed2044(o.dimensions); | |
| 6978 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6979 checkUnnamed2045(o.metrics); | |
| 6980 checkUnnamed2046(o.pivotedActivityMetrics); | |
| 6981 } | |
| 6982 buildCounterReportCompatibleFields--; | |
| 6983 } | |
| 6984 | |
| 6985 buildUnnamed2047() { | |
| 6986 var o = new core.List<api.Report>(); | |
| 6987 o.add(buildReport()); | |
| 6988 o.add(buildReport()); | |
| 6989 return o; | |
| 6990 } | |
| 6991 | |
| 6992 checkUnnamed2047(core.List<api.Report> o) { | |
| 6993 unittest.expect(o, unittest.hasLength(2)); | |
| 6994 checkReport(o[0]); | |
| 6995 checkReport(o[1]); | |
| 6996 } | |
| 6997 | |
| 6998 core.int buildCounterReportList = 0; | |
| 6999 buildReportList() { | |
| 7000 var o = new api.ReportList(); | |
| 7001 buildCounterReportList++; | |
| 7002 if (buildCounterReportList < 3) { | |
| 7003 o.etag = "foo"; | |
| 7004 o.items = buildUnnamed2047(); | |
| 7005 o.kind = "foo"; | |
| 7006 o.nextPageToken = "foo"; | |
| 7007 } | |
| 7008 buildCounterReportList--; | |
| 7009 return o; | |
| 7010 } | |
| 7011 | |
| 7012 checkReportList(api.ReportList o) { | |
| 7013 buildCounterReportList++; | |
| 7014 if (buildCounterReportList < 3) { | |
| 7015 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7016 checkUnnamed2047(o.items); | |
| 7017 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7018 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7019 } | |
| 7020 buildCounterReportList--; | |
| 7021 } | |
| 7022 | |
| 7023 core.int buildCounterReportsConfiguration = 0; | |
| 7024 buildReportsConfiguration() { | |
| 7025 var o = new api.ReportsConfiguration(); | |
| 7026 buildCounterReportsConfiguration++; | |
| 7027 if (buildCounterReportsConfiguration < 3) { | |
| 7028 o.exposureToConversionEnabled = true; | |
| 7029 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7030 o.reportGenerationTimeZoneId = "foo"; | |
| 7031 } | |
| 7032 buildCounterReportsConfiguration--; | |
| 7033 return o; | |
| 7034 } | |
| 7035 | |
| 7036 checkReportsConfiguration(api.ReportsConfiguration o) { | |
| 7037 buildCounterReportsConfiguration++; | |
| 7038 if (buildCounterReportsConfiguration < 3) { | |
| 7039 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 7040 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7041 unittest.expect(o.reportGenerationTimeZoneId, unittest.equals('foo')); | |
| 7042 } | |
| 7043 buildCounterReportsConfiguration--; | |
| 7044 } | |
| 7045 | |
| 7046 core.int buildCounterRichMediaExitOverride = 0; | |
| 7047 buildRichMediaExitOverride() { | |
| 7048 var o = new api.RichMediaExitOverride(); | |
| 7049 buildCounterRichMediaExitOverride++; | |
| 7050 if (buildCounterRichMediaExitOverride < 3) { | |
| 7051 o.customExitUrl = "foo"; | |
| 7052 o.exitId = "foo"; | |
| 7053 o.useCustomExitUrl = true; | |
| 7054 } | |
| 7055 buildCounterRichMediaExitOverride--; | |
| 7056 return o; | |
| 7057 } | |
| 7058 | |
| 7059 checkRichMediaExitOverride(api.RichMediaExitOverride o) { | |
| 7060 buildCounterRichMediaExitOverride++; | |
| 7061 if (buildCounterRichMediaExitOverride < 3) { | |
| 7062 unittest.expect(o.customExitUrl, unittest.equals('foo')); | |
| 7063 unittest.expect(o.exitId, unittest.equals('foo')); | |
| 7064 unittest.expect(o.useCustomExitUrl, unittest.isTrue); | |
| 7065 } | |
| 7066 buildCounterRichMediaExitOverride--; | |
| 7067 } | |
| 7068 | |
| 7069 buildUnnamed2048() { | |
| 7070 var o = new core.List<api.SiteContact>(); | |
| 7071 o.add(buildSiteContact()); | |
| 7072 o.add(buildSiteContact()); | |
| 7073 return o; | |
| 7074 } | |
| 7075 | |
| 7076 checkUnnamed2048(core.List<api.SiteContact> o) { | |
| 7077 unittest.expect(o, unittest.hasLength(2)); | |
| 7078 checkSiteContact(o[0]); | |
| 7079 checkSiteContact(o[1]); | |
| 7080 } | |
| 7081 | |
| 7082 core.int buildCounterSite = 0; | |
| 7083 buildSite() { | |
| 7084 var o = new api.Site(); | |
| 7085 buildCounterSite++; | |
| 7086 if (buildCounterSite < 3) { | |
| 7087 o.accountId = "foo"; | |
| 7088 o.approved = true; | |
| 7089 o.directorySiteId = "foo"; | |
| 7090 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 7091 o.id = "foo"; | |
| 7092 o.idDimensionValue = buildDimensionValue(); | |
| 7093 o.keyName = "foo"; | |
| 7094 o.kind = "foo"; | |
| 7095 o.name = "foo"; | |
| 7096 o.siteContacts = buildUnnamed2048(); | |
| 7097 o.siteSettings = buildSiteSettings(); | |
| 7098 o.subaccountId = "foo"; | |
| 7099 } | |
| 7100 buildCounterSite--; | |
| 7101 return o; | |
| 7102 } | |
| 7103 | |
| 7104 checkSite(api.Site o) { | |
| 7105 buildCounterSite++; | |
| 7106 if (buildCounterSite < 3) { | |
| 7107 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7108 unittest.expect(o.approved, unittest.isTrue); | |
| 7109 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 7110 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 7111 unittest.expect(o.id, unittest.equals('foo')); | |
| 7112 checkDimensionValue(o.idDimensionValue); | |
| 7113 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 7114 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7115 unittest.expect(o.name, unittest.equals('foo')); | |
| 7116 checkUnnamed2048(o.siteContacts); | |
| 7117 checkSiteSettings(o.siteSettings); | |
| 7118 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7119 } | |
| 7120 buildCounterSite--; | |
| 7121 } | |
| 7122 | |
| 7123 core.int buildCounterSiteContact = 0; | |
| 7124 buildSiteContact() { | |
| 7125 var o = new api.SiteContact(); | |
| 7126 buildCounterSiteContact++; | |
| 7127 if (buildCounterSiteContact < 3) { | |
| 7128 o.address = "foo"; | |
| 7129 o.contactType = "foo"; | |
| 7130 o.email = "foo"; | |
| 7131 o.firstName = "foo"; | |
| 7132 o.id = "foo"; | |
| 7133 o.lastName = "foo"; | |
| 7134 o.phone = "foo"; | |
| 7135 o.title = "foo"; | |
| 7136 } | |
| 7137 buildCounterSiteContact--; | |
| 7138 return o; | |
| 7139 } | |
| 7140 | |
| 7141 checkSiteContact(api.SiteContact o) { | |
| 7142 buildCounterSiteContact++; | |
| 7143 if (buildCounterSiteContact < 3) { | |
| 7144 unittest.expect(o.address, unittest.equals('foo')); | |
| 7145 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 7146 unittest.expect(o.email, unittest.equals('foo')); | |
| 7147 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 7148 unittest.expect(o.id, unittest.equals('foo')); | |
| 7149 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 7150 unittest.expect(o.phone, unittest.equals('foo')); | |
| 7151 unittest.expect(o.title, unittest.equals('foo')); | |
| 7152 } | |
| 7153 buildCounterSiteContact--; | |
| 7154 } | |
| 7155 | |
| 7156 core.int buildCounterSiteSettings = 0; | |
| 7157 buildSiteSettings() { | |
| 7158 var o = new api.SiteSettings(); | |
| 7159 buildCounterSiteSettings++; | |
| 7160 if (buildCounterSiteSettings < 3) { | |
| 7161 o.activeViewOptOut = true; | |
| 7162 o.creativeSettings = buildCreativeSettings(); | |
| 7163 o.disableBrandSafeAds = true; | |
| 7164 o.disableNewCookie = true; | |
| 7165 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7166 o.tagSetting = buildTagSetting(); | |
| 7167 o.videoActiveViewOptOut = true; | |
| 7168 } | |
| 7169 buildCounterSiteSettings--; | |
| 7170 return o; | |
| 7171 } | |
| 7172 | |
| 7173 checkSiteSettings(api.SiteSettings o) { | |
| 7174 buildCounterSiteSettings++; | |
| 7175 if (buildCounterSiteSettings < 3) { | |
| 7176 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 7177 checkCreativeSettings(o.creativeSettings); | |
| 7178 unittest.expect(o.disableBrandSafeAds, unittest.isTrue); | |
| 7179 unittest.expect(o.disableNewCookie, unittest.isTrue); | |
| 7180 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7181 checkTagSetting(o.tagSetting); | |
| 7182 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 7183 } | |
| 7184 buildCounterSiteSettings--; | |
| 7185 } | |
| 7186 | |
| 7187 buildUnnamed2049() { | |
| 7188 var o = new core.List<api.Site>(); | |
| 7189 o.add(buildSite()); | |
| 7190 o.add(buildSite()); | |
| 7191 return o; | |
| 7192 } | |
| 7193 | |
| 7194 checkUnnamed2049(core.List<api.Site> o) { | |
| 7195 unittest.expect(o, unittest.hasLength(2)); | |
| 7196 checkSite(o[0]); | |
| 7197 checkSite(o[1]); | |
| 7198 } | |
| 7199 | |
| 7200 core.int buildCounterSitesListResponse = 0; | |
| 7201 buildSitesListResponse() { | |
| 7202 var o = new api.SitesListResponse(); | |
| 7203 buildCounterSitesListResponse++; | |
| 7204 if (buildCounterSitesListResponse < 3) { | |
| 7205 o.kind = "foo"; | |
| 7206 o.nextPageToken = "foo"; | |
| 7207 o.sites = buildUnnamed2049(); | |
| 7208 } | |
| 7209 buildCounterSitesListResponse--; | |
| 7210 return o; | |
| 7211 } | |
| 7212 | |
| 7213 checkSitesListResponse(api.SitesListResponse o) { | |
| 7214 buildCounterSitesListResponse++; | |
| 7215 if (buildCounterSitesListResponse < 3) { | |
| 7216 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7217 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7218 checkUnnamed2049(o.sites); | |
| 7219 } | |
| 7220 buildCounterSitesListResponse--; | |
| 7221 } | |
| 7222 | |
| 7223 core.int buildCounterSize = 0; | |
| 7224 buildSize() { | |
| 7225 var o = new api.Size(); | |
| 7226 buildCounterSize++; | |
| 7227 if (buildCounterSize < 3) { | |
| 7228 o.height = 42; | |
| 7229 o.iab = true; | |
| 7230 o.id = "foo"; | |
| 7231 o.kind = "foo"; | |
| 7232 o.width = 42; | |
| 7233 } | |
| 7234 buildCounterSize--; | |
| 7235 return o; | |
| 7236 } | |
| 7237 | |
| 7238 checkSize(api.Size o) { | |
| 7239 buildCounterSize++; | |
| 7240 if (buildCounterSize < 3) { | |
| 7241 unittest.expect(o.height, unittest.equals(42)); | |
| 7242 unittest.expect(o.iab, unittest.isTrue); | |
| 7243 unittest.expect(o.id, unittest.equals('foo')); | |
| 7244 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7245 unittest.expect(o.width, unittest.equals(42)); | |
| 7246 } | |
| 7247 buildCounterSize--; | |
| 7248 } | |
| 7249 | |
| 7250 buildUnnamed2050() { | |
| 7251 var o = new core.List<api.Size>(); | |
| 7252 o.add(buildSize()); | |
| 7253 o.add(buildSize()); | |
| 7254 return o; | |
| 7255 } | |
| 7256 | |
| 7257 checkUnnamed2050(core.List<api.Size> o) { | |
| 7258 unittest.expect(o, unittest.hasLength(2)); | |
| 7259 checkSize(o[0]); | |
| 7260 checkSize(o[1]); | |
| 7261 } | |
| 7262 | |
| 7263 core.int buildCounterSizesListResponse = 0; | |
| 7264 buildSizesListResponse() { | |
| 7265 var o = new api.SizesListResponse(); | |
| 7266 buildCounterSizesListResponse++; | |
| 7267 if (buildCounterSizesListResponse < 3) { | |
| 7268 o.kind = "foo"; | |
| 7269 o.sizes = buildUnnamed2050(); | |
| 7270 } | |
| 7271 buildCounterSizesListResponse--; | |
| 7272 return o; | |
| 7273 } | |
| 7274 | |
| 7275 checkSizesListResponse(api.SizesListResponse o) { | |
| 7276 buildCounterSizesListResponse++; | |
| 7277 if (buildCounterSizesListResponse < 3) { | |
| 7278 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7279 checkUnnamed2050(o.sizes); | |
| 7280 } | |
| 7281 buildCounterSizesListResponse--; | |
| 7282 } | |
| 7283 | |
| 7284 core.int buildCounterSortedDimension = 0; | |
| 7285 buildSortedDimension() { | |
| 7286 var o = new api.SortedDimension(); | |
| 7287 buildCounterSortedDimension++; | |
| 7288 if (buildCounterSortedDimension < 3) { | |
| 7289 o.kind = "foo"; | |
| 7290 o.name = "foo"; | |
| 7291 o.sortOrder = "foo"; | |
| 7292 } | |
| 7293 buildCounterSortedDimension--; | |
| 7294 return o; | |
| 7295 } | |
| 7296 | |
| 7297 checkSortedDimension(api.SortedDimension o) { | |
| 7298 buildCounterSortedDimension++; | |
| 7299 if (buildCounterSortedDimension < 3) { | |
| 7300 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7301 unittest.expect(o.name, unittest.equals('foo')); | |
| 7302 unittest.expect(o.sortOrder, unittest.equals('foo')); | |
| 7303 } | |
| 7304 buildCounterSortedDimension--; | |
| 7305 } | |
| 7306 | |
| 7307 buildUnnamed2051() { | |
| 7308 var o = new core.List<core.String>(); | |
| 7309 o.add("foo"); | |
| 7310 o.add("foo"); | |
| 7311 return o; | |
| 7312 } | |
| 7313 | |
| 7314 checkUnnamed2051(core.List<core.String> o) { | |
| 7315 unittest.expect(o, unittest.hasLength(2)); | |
| 7316 unittest.expect(o[0], unittest.equals('foo')); | |
| 7317 unittest.expect(o[1], unittest.equals('foo')); | |
| 7318 } | |
| 7319 | |
| 7320 core.int buildCounterSubaccount = 0; | |
| 7321 buildSubaccount() { | |
| 7322 var o = new api.Subaccount(); | |
| 7323 buildCounterSubaccount++; | |
| 7324 if (buildCounterSubaccount < 3) { | |
| 7325 o.accountId = "foo"; | |
| 7326 o.availablePermissionIds = buildUnnamed2051(); | |
| 7327 o.id = "foo"; | |
| 7328 o.kind = "foo"; | |
| 7329 o.name = "foo"; | |
| 7330 } | |
| 7331 buildCounterSubaccount--; | |
| 7332 return o; | |
| 7333 } | |
| 7334 | |
| 7335 checkSubaccount(api.Subaccount o) { | |
| 7336 buildCounterSubaccount++; | |
| 7337 if (buildCounterSubaccount < 3) { | |
| 7338 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7339 checkUnnamed2051(o.availablePermissionIds); | |
| 7340 unittest.expect(o.id, unittest.equals('foo')); | |
| 7341 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7342 unittest.expect(o.name, unittest.equals('foo')); | |
| 7343 } | |
| 7344 buildCounterSubaccount--; | |
| 7345 } | |
| 7346 | |
| 7347 buildUnnamed2052() { | |
| 7348 var o = new core.List<api.Subaccount>(); | |
| 7349 o.add(buildSubaccount()); | |
| 7350 o.add(buildSubaccount()); | |
| 7351 return o; | |
| 7352 } | |
| 7353 | |
| 7354 checkUnnamed2052(core.List<api.Subaccount> o) { | |
| 7355 unittest.expect(o, unittest.hasLength(2)); | |
| 7356 checkSubaccount(o[0]); | |
| 7357 checkSubaccount(o[1]); | |
| 7358 } | |
| 7359 | |
| 7360 core.int buildCounterSubaccountsListResponse = 0; | |
| 7361 buildSubaccountsListResponse() { | |
| 7362 var o = new api.SubaccountsListResponse(); | |
| 7363 buildCounterSubaccountsListResponse++; | |
| 7364 if (buildCounterSubaccountsListResponse < 3) { | |
| 7365 o.kind = "foo"; | |
| 7366 o.nextPageToken = "foo"; | |
| 7367 o.subaccounts = buildUnnamed2052(); | |
| 7368 } | |
| 7369 buildCounterSubaccountsListResponse--; | |
| 7370 return o; | |
| 7371 } | |
| 7372 | |
| 7373 checkSubaccountsListResponse(api.SubaccountsListResponse o) { | |
| 7374 buildCounterSubaccountsListResponse++; | |
| 7375 if (buildCounterSubaccountsListResponse < 3) { | |
| 7376 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7377 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7378 checkUnnamed2052(o.subaccounts); | |
| 7379 } | |
| 7380 buildCounterSubaccountsListResponse--; | |
| 7381 } | |
| 7382 | |
| 7383 core.int buildCounterTagData = 0; | |
| 7384 buildTagData() { | |
| 7385 var o = new api.TagData(); | |
| 7386 buildCounterTagData++; | |
| 7387 if (buildCounterTagData < 3) { | |
| 7388 o.adId = "foo"; | |
| 7389 o.clickTag = "foo"; | |
| 7390 o.creativeId = "foo"; | |
| 7391 o.format = "foo"; | |
| 7392 o.impressionTag = "foo"; | |
| 7393 } | |
| 7394 buildCounterTagData--; | |
| 7395 return o; | |
| 7396 } | |
| 7397 | |
| 7398 checkTagData(api.TagData o) { | |
| 7399 buildCounterTagData++; | |
| 7400 if (buildCounterTagData < 3) { | |
| 7401 unittest.expect(o.adId, unittest.equals('foo')); | |
| 7402 unittest.expect(o.clickTag, unittest.equals('foo')); | |
| 7403 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 7404 unittest.expect(o.format, unittest.equals('foo')); | |
| 7405 unittest.expect(o.impressionTag, unittest.equals('foo')); | |
| 7406 } | |
| 7407 buildCounterTagData--; | |
| 7408 } | |
| 7409 | |
| 7410 core.int buildCounterTagSetting = 0; | |
| 7411 buildTagSetting() { | |
| 7412 var o = new api.TagSetting(); | |
| 7413 buildCounterTagSetting++; | |
| 7414 if (buildCounterTagSetting < 3) { | |
| 7415 o.additionalKeyValues = "foo"; | |
| 7416 o.includeClickThroughUrls = true; | |
| 7417 o.includeClickTracking = true; | |
| 7418 o.keywordOption = "foo"; | |
| 7419 } | |
| 7420 buildCounterTagSetting--; | |
| 7421 return o; | |
| 7422 } | |
| 7423 | |
| 7424 checkTagSetting(api.TagSetting o) { | |
| 7425 buildCounterTagSetting++; | |
| 7426 if (buildCounterTagSetting < 3) { | |
| 7427 unittest.expect(o.additionalKeyValues, unittest.equals('foo')); | |
| 7428 unittest.expect(o.includeClickThroughUrls, unittest.isTrue); | |
| 7429 unittest.expect(o.includeClickTracking, unittest.isTrue); | |
| 7430 unittest.expect(o.keywordOption, unittest.equals('foo')); | |
| 7431 } | |
| 7432 buildCounterTagSetting--; | |
| 7433 } | |
| 7434 | |
| 7435 core.int buildCounterTagSettings = 0; | |
| 7436 buildTagSettings() { | |
| 7437 var o = new api.TagSettings(); | |
| 7438 buildCounterTagSettings++; | |
| 7439 if (buildCounterTagSettings < 3) { | |
| 7440 o.dynamicTagEnabled = true; | |
| 7441 o.imageTagEnabled = true; | |
| 7442 } | |
| 7443 buildCounterTagSettings--; | |
| 7444 return o; | |
| 7445 } | |
| 7446 | |
| 7447 checkTagSettings(api.TagSettings o) { | |
| 7448 buildCounterTagSettings++; | |
| 7449 if (buildCounterTagSettings < 3) { | |
| 7450 unittest.expect(o.dynamicTagEnabled, unittest.isTrue); | |
| 7451 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 7452 } | |
| 7453 buildCounterTagSettings--; | |
| 7454 } | |
| 7455 | |
| 7456 core.int buildCounterTargetWindow = 0; | |
| 7457 buildTargetWindow() { | |
| 7458 var o = new api.TargetWindow(); | |
| 7459 buildCounterTargetWindow++; | |
| 7460 if (buildCounterTargetWindow < 3) { | |
| 7461 o.customHtml = "foo"; | |
| 7462 o.targetWindowOption = "foo"; | |
| 7463 } | |
| 7464 buildCounterTargetWindow--; | |
| 7465 return o; | |
| 7466 } | |
| 7467 | |
| 7468 checkTargetWindow(api.TargetWindow o) { | |
| 7469 buildCounterTargetWindow++; | |
| 7470 if (buildCounterTargetWindow < 3) { | |
| 7471 unittest.expect(o.customHtml, unittest.equals('foo')); | |
| 7472 unittest.expect(o.targetWindowOption, unittest.equals('foo')); | |
| 7473 } | |
| 7474 buildCounterTargetWindow--; | |
| 7475 } | |
| 7476 | |
| 7477 core.int buildCounterTargetableRemarketingList = 0; | |
| 7478 buildTargetableRemarketingList() { | |
| 7479 var o = new api.TargetableRemarketingList(); | |
| 7480 buildCounterTargetableRemarketingList++; | |
| 7481 if (buildCounterTargetableRemarketingList < 3) { | |
| 7482 o.accountId = "foo"; | |
| 7483 o.active = true; | |
| 7484 o.advertiserId = "foo"; | |
| 7485 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 7486 o.description = "foo"; | |
| 7487 o.id = "foo"; | |
| 7488 o.kind = "foo"; | |
| 7489 o.lifeSpan = "foo"; | |
| 7490 o.listSize = "foo"; | |
| 7491 o.listSource = "foo"; | |
| 7492 o.name = "foo"; | |
| 7493 o.subaccountId = "foo"; | |
| 7494 } | |
| 7495 buildCounterTargetableRemarketingList--; | |
| 7496 return o; | |
| 7497 } | |
| 7498 | |
| 7499 checkTargetableRemarketingList(api.TargetableRemarketingList o) { | |
| 7500 buildCounterTargetableRemarketingList++; | |
| 7501 if (buildCounterTargetableRemarketingList < 3) { | |
| 7502 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7503 unittest.expect(o.active, unittest.isTrue); | |
| 7504 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 7505 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 7506 unittest.expect(o.description, unittest.equals('foo')); | |
| 7507 unittest.expect(o.id, unittest.equals('foo')); | |
| 7508 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7509 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 7510 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 7511 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 7512 unittest.expect(o.name, unittest.equals('foo')); | |
| 7513 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7514 } | |
| 7515 buildCounterTargetableRemarketingList--; | |
| 7516 } | |
| 7517 | |
| 7518 buildUnnamed2053() { | |
| 7519 var o = new core.List<api.TargetableRemarketingList>(); | |
| 7520 o.add(buildTargetableRemarketingList()); | |
| 7521 o.add(buildTargetableRemarketingList()); | |
| 7522 return o; | |
| 7523 } | |
| 7524 | |
| 7525 checkUnnamed2053(core.List<api.TargetableRemarketingList> o) { | |
| 7526 unittest.expect(o, unittest.hasLength(2)); | |
| 7527 checkTargetableRemarketingList(o[0]); | |
| 7528 checkTargetableRemarketingList(o[1]); | |
| 7529 } | |
| 7530 | |
| 7531 core.int buildCounterTargetableRemarketingListsListResponse = 0; | |
| 7532 buildTargetableRemarketingListsListResponse() { | |
| 7533 var o = new api.TargetableRemarketingListsListResponse(); | |
| 7534 buildCounterTargetableRemarketingListsListResponse++; | |
| 7535 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7536 o.kind = "foo"; | |
| 7537 o.nextPageToken = "foo"; | |
| 7538 o.targetableRemarketingLists = buildUnnamed2053(); | |
| 7539 } | |
| 7540 buildCounterTargetableRemarketingListsListResponse--; | |
| 7541 return o; | |
| 7542 } | |
| 7543 | |
| 7544 checkTargetableRemarketingListsListResponse(api.TargetableRemarketingListsListRe
sponse o) { | |
| 7545 buildCounterTargetableRemarketingListsListResponse++; | |
| 7546 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7547 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7548 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7549 checkUnnamed2053(o.targetableRemarketingLists); | |
| 7550 } | |
| 7551 buildCounterTargetableRemarketingListsListResponse--; | |
| 7552 } | |
| 7553 | |
| 7554 buildUnnamed2054() { | |
| 7555 var o = new core.List<api.Browser>(); | |
| 7556 o.add(buildBrowser()); | |
| 7557 o.add(buildBrowser()); | |
| 7558 return o; | |
| 7559 } | |
| 7560 | |
| 7561 checkUnnamed2054(core.List<api.Browser> o) { | |
| 7562 unittest.expect(o, unittest.hasLength(2)); | |
| 7563 checkBrowser(o[0]); | |
| 7564 checkBrowser(o[1]); | |
| 7565 } | |
| 7566 | |
| 7567 buildUnnamed2055() { | |
| 7568 var o = new core.List<api.ConnectionType>(); | |
| 7569 o.add(buildConnectionType()); | |
| 7570 o.add(buildConnectionType()); | |
| 7571 return o; | |
| 7572 } | |
| 7573 | |
| 7574 checkUnnamed2055(core.List<api.ConnectionType> o) { | |
| 7575 unittest.expect(o, unittest.hasLength(2)); | |
| 7576 checkConnectionType(o[0]); | |
| 7577 checkConnectionType(o[1]); | |
| 7578 } | |
| 7579 | |
| 7580 buildUnnamed2056() { | |
| 7581 var o = new core.List<api.MobileCarrier>(); | |
| 7582 o.add(buildMobileCarrier()); | |
| 7583 o.add(buildMobileCarrier()); | |
| 7584 return o; | |
| 7585 } | |
| 7586 | |
| 7587 checkUnnamed2056(core.List<api.MobileCarrier> o) { | |
| 7588 unittest.expect(o, unittest.hasLength(2)); | |
| 7589 checkMobileCarrier(o[0]); | |
| 7590 checkMobileCarrier(o[1]); | |
| 7591 } | |
| 7592 | |
| 7593 buildUnnamed2057() { | |
| 7594 var o = new core.List<api.OperatingSystemVersion>(); | |
| 7595 o.add(buildOperatingSystemVersion()); | |
| 7596 o.add(buildOperatingSystemVersion()); | |
| 7597 return o; | |
| 7598 } | |
| 7599 | |
| 7600 checkUnnamed2057(core.List<api.OperatingSystemVersion> o) { | |
| 7601 unittest.expect(o, unittest.hasLength(2)); | |
| 7602 checkOperatingSystemVersion(o[0]); | |
| 7603 checkOperatingSystemVersion(o[1]); | |
| 7604 } | |
| 7605 | |
| 7606 buildUnnamed2058() { | |
| 7607 var o = new core.List<api.OperatingSystem>(); | |
| 7608 o.add(buildOperatingSystem()); | |
| 7609 o.add(buildOperatingSystem()); | |
| 7610 return o; | |
| 7611 } | |
| 7612 | |
| 7613 checkUnnamed2058(core.List<api.OperatingSystem> o) { | |
| 7614 unittest.expect(o, unittest.hasLength(2)); | |
| 7615 checkOperatingSystem(o[0]); | |
| 7616 checkOperatingSystem(o[1]); | |
| 7617 } | |
| 7618 | |
| 7619 buildUnnamed2059() { | |
| 7620 var o = new core.List<api.PlatformType>(); | |
| 7621 o.add(buildPlatformType()); | |
| 7622 o.add(buildPlatformType()); | |
| 7623 return o; | |
| 7624 } | |
| 7625 | |
| 7626 checkUnnamed2059(core.List<api.PlatformType> o) { | |
| 7627 unittest.expect(o, unittest.hasLength(2)); | |
| 7628 checkPlatformType(o[0]); | |
| 7629 checkPlatformType(o[1]); | |
| 7630 } | |
| 7631 | |
| 7632 core.int buildCounterTechnologyTargeting = 0; | |
| 7633 buildTechnologyTargeting() { | |
| 7634 var o = new api.TechnologyTargeting(); | |
| 7635 buildCounterTechnologyTargeting++; | |
| 7636 if (buildCounterTechnologyTargeting < 3) { | |
| 7637 o.browsers = buildUnnamed2054(); | |
| 7638 o.connectionTypes = buildUnnamed2055(); | |
| 7639 o.mobileCarriers = buildUnnamed2056(); | |
| 7640 o.operatingSystemVersions = buildUnnamed2057(); | |
| 7641 o.operatingSystems = buildUnnamed2058(); | |
| 7642 o.platformTypes = buildUnnamed2059(); | |
| 7643 } | |
| 7644 buildCounterTechnologyTargeting--; | |
| 7645 return o; | |
| 7646 } | |
| 7647 | |
| 7648 checkTechnologyTargeting(api.TechnologyTargeting o) { | |
| 7649 buildCounterTechnologyTargeting++; | |
| 7650 if (buildCounterTechnologyTargeting < 3) { | |
| 7651 checkUnnamed2054(o.browsers); | |
| 7652 checkUnnamed2055(o.connectionTypes); | |
| 7653 checkUnnamed2056(o.mobileCarriers); | |
| 7654 checkUnnamed2057(o.operatingSystemVersions); | |
| 7655 checkUnnamed2058(o.operatingSystems); | |
| 7656 checkUnnamed2059(o.platformTypes); | |
| 7657 } | |
| 7658 buildCounterTechnologyTargeting--; | |
| 7659 } | |
| 7660 | |
| 7661 core.int buildCounterThirdPartyAuthenticationToken = 0; | |
| 7662 buildThirdPartyAuthenticationToken() { | |
| 7663 var o = new api.ThirdPartyAuthenticationToken(); | |
| 7664 buildCounterThirdPartyAuthenticationToken++; | |
| 7665 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7666 o.name = "foo"; | |
| 7667 o.value = "foo"; | |
| 7668 } | |
| 7669 buildCounterThirdPartyAuthenticationToken--; | |
| 7670 return o; | |
| 7671 } | |
| 7672 | |
| 7673 checkThirdPartyAuthenticationToken(api.ThirdPartyAuthenticationToken o) { | |
| 7674 buildCounterThirdPartyAuthenticationToken++; | |
| 7675 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7676 unittest.expect(o.name, unittest.equals('foo')); | |
| 7677 unittest.expect(o.value, unittest.equals('foo')); | |
| 7678 } | |
| 7679 buildCounterThirdPartyAuthenticationToken--; | |
| 7680 } | |
| 7681 | |
| 7682 core.int buildCounterThirdPartyTrackingUrl = 0; | |
| 7683 buildThirdPartyTrackingUrl() { | |
| 7684 var o = new api.ThirdPartyTrackingUrl(); | |
| 7685 buildCounterThirdPartyTrackingUrl++; | |
| 7686 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7687 o.thirdPartyUrlType = "foo"; | |
| 7688 o.url = "foo"; | |
| 7689 } | |
| 7690 buildCounterThirdPartyTrackingUrl--; | |
| 7691 return o; | |
| 7692 } | |
| 7693 | |
| 7694 checkThirdPartyTrackingUrl(api.ThirdPartyTrackingUrl o) { | |
| 7695 buildCounterThirdPartyTrackingUrl++; | |
| 7696 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7697 unittest.expect(o.thirdPartyUrlType, unittest.equals('foo')); | |
| 7698 unittest.expect(o.url, unittest.equals('foo')); | |
| 7699 } | |
| 7700 buildCounterThirdPartyTrackingUrl--; | |
| 7701 } | |
| 7702 | |
| 7703 core.int buildCounterUserDefinedVariableConfiguration = 0; | |
| 7704 buildUserDefinedVariableConfiguration() { | |
| 7705 var o = new api.UserDefinedVariableConfiguration(); | |
| 7706 buildCounterUserDefinedVariableConfiguration++; | |
| 7707 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7708 o.dataType = "foo"; | |
| 7709 o.reportName = "foo"; | |
| 7710 o.variableType = "foo"; | |
| 7711 } | |
| 7712 buildCounterUserDefinedVariableConfiguration--; | |
| 7713 return o; | |
| 7714 } | |
| 7715 | |
| 7716 checkUserDefinedVariableConfiguration(api.UserDefinedVariableConfiguration o) { | |
| 7717 buildCounterUserDefinedVariableConfiguration++; | |
| 7718 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7719 unittest.expect(o.dataType, unittest.equals('foo')); | |
| 7720 unittest.expect(o.reportName, unittest.equals('foo')); | |
| 7721 unittest.expect(o.variableType, unittest.equals('foo')); | |
| 7722 } | |
| 7723 buildCounterUserDefinedVariableConfiguration--; | |
| 7724 } | |
| 7725 | |
| 7726 core.int buildCounterUserProfile = 0; | |
| 7727 buildUserProfile() { | |
| 7728 var o = new api.UserProfile(); | |
| 7729 buildCounterUserProfile++; | |
| 7730 if (buildCounterUserProfile < 3) { | |
| 7731 o.accountId = "foo"; | |
| 7732 o.accountName = "foo"; | |
| 7733 o.etag = "foo"; | |
| 7734 o.kind = "foo"; | |
| 7735 o.profileId = "foo"; | |
| 7736 o.subAccountId = "foo"; | |
| 7737 o.subAccountName = "foo"; | |
| 7738 o.userName = "foo"; | |
| 7739 } | |
| 7740 buildCounterUserProfile--; | |
| 7741 return o; | |
| 7742 } | |
| 7743 | |
| 7744 checkUserProfile(api.UserProfile o) { | |
| 7745 buildCounterUserProfile++; | |
| 7746 if (buildCounterUserProfile < 3) { | |
| 7747 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7748 unittest.expect(o.accountName, unittest.equals('foo')); | |
| 7749 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7750 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7751 unittest.expect(o.profileId, unittest.equals('foo')); | |
| 7752 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 7753 unittest.expect(o.subAccountName, unittest.equals('foo')); | |
| 7754 unittest.expect(o.userName, unittest.equals('foo')); | |
| 7755 } | |
| 7756 buildCounterUserProfile--; | |
| 7757 } | |
| 7758 | |
| 7759 buildUnnamed2060() { | |
| 7760 var o = new core.List<api.UserProfile>(); | |
| 7761 o.add(buildUserProfile()); | |
| 7762 o.add(buildUserProfile()); | |
| 7763 return o; | |
| 7764 } | |
| 7765 | |
| 7766 checkUnnamed2060(core.List<api.UserProfile> o) { | |
| 7767 unittest.expect(o, unittest.hasLength(2)); | |
| 7768 checkUserProfile(o[0]); | |
| 7769 checkUserProfile(o[1]); | |
| 7770 } | |
| 7771 | |
| 7772 core.int buildCounterUserProfileList = 0; | |
| 7773 buildUserProfileList() { | |
| 7774 var o = new api.UserProfileList(); | |
| 7775 buildCounterUserProfileList++; | |
| 7776 if (buildCounterUserProfileList < 3) { | |
| 7777 o.etag = "foo"; | |
| 7778 o.items = buildUnnamed2060(); | |
| 7779 o.kind = "foo"; | |
| 7780 } | |
| 7781 buildCounterUserProfileList--; | |
| 7782 return o; | |
| 7783 } | |
| 7784 | |
| 7785 checkUserProfileList(api.UserProfileList o) { | |
| 7786 buildCounterUserProfileList++; | |
| 7787 if (buildCounterUserProfileList < 3) { | |
| 7788 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7789 checkUnnamed2060(o.items); | |
| 7790 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7791 } | |
| 7792 buildCounterUserProfileList--; | |
| 7793 } | |
| 7794 | |
| 7795 buildUnnamed2061() { | |
| 7796 var o = new core.List<api.UserRolePermission>(); | |
| 7797 o.add(buildUserRolePermission()); | |
| 7798 o.add(buildUserRolePermission()); | |
| 7799 return o; | |
| 7800 } | |
| 7801 | |
| 7802 checkUnnamed2061(core.List<api.UserRolePermission> o) { | |
| 7803 unittest.expect(o, unittest.hasLength(2)); | |
| 7804 checkUserRolePermission(o[0]); | |
| 7805 checkUserRolePermission(o[1]); | |
| 7806 } | |
| 7807 | |
| 7808 core.int buildCounterUserRole = 0; | |
| 7809 buildUserRole() { | |
| 7810 var o = new api.UserRole(); | |
| 7811 buildCounterUserRole++; | |
| 7812 if (buildCounterUserRole < 3) { | |
| 7813 o.accountId = "foo"; | |
| 7814 o.defaultUserRole = true; | |
| 7815 o.id = "foo"; | |
| 7816 o.kind = "foo"; | |
| 7817 o.name = "foo"; | |
| 7818 o.parentUserRoleId = "foo"; | |
| 7819 o.permissions = buildUnnamed2061(); | |
| 7820 o.subaccountId = "foo"; | |
| 7821 } | |
| 7822 buildCounterUserRole--; | |
| 7823 return o; | |
| 7824 } | |
| 7825 | |
| 7826 checkUserRole(api.UserRole o) { | |
| 7827 buildCounterUserRole++; | |
| 7828 if (buildCounterUserRole < 3) { | |
| 7829 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7830 unittest.expect(o.defaultUserRole, unittest.isTrue); | |
| 7831 unittest.expect(o.id, unittest.equals('foo')); | |
| 7832 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7833 unittest.expect(o.name, unittest.equals('foo')); | |
| 7834 unittest.expect(o.parentUserRoleId, unittest.equals('foo')); | |
| 7835 checkUnnamed2061(o.permissions); | |
| 7836 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7837 } | |
| 7838 buildCounterUserRole--; | |
| 7839 } | |
| 7840 | |
| 7841 core.int buildCounterUserRolePermission = 0; | |
| 7842 buildUserRolePermission() { | |
| 7843 var o = new api.UserRolePermission(); | |
| 7844 buildCounterUserRolePermission++; | |
| 7845 if (buildCounterUserRolePermission < 3) { | |
| 7846 o.availability = "foo"; | |
| 7847 o.id = "foo"; | |
| 7848 o.kind = "foo"; | |
| 7849 o.name = "foo"; | |
| 7850 o.permissionGroupId = "foo"; | |
| 7851 } | |
| 7852 buildCounterUserRolePermission--; | |
| 7853 return o; | |
| 7854 } | |
| 7855 | |
| 7856 checkUserRolePermission(api.UserRolePermission o) { | |
| 7857 buildCounterUserRolePermission++; | |
| 7858 if (buildCounterUserRolePermission < 3) { | |
| 7859 unittest.expect(o.availability, unittest.equals('foo')); | |
| 7860 unittest.expect(o.id, unittest.equals('foo')); | |
| 7861 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7862 unittest.expect(o.name, unittest.equals('foo')); | |
| 7863 unittest.expect(o.permissionGroupId, unittest.equals('foo')); | |
| 7864 } | |
| 7865 buildCounterUserRolePermission--; | |
| 7866 } | |
| 7867 | |
| 7868 core.int buildCounterUserRolePermissionGroup = 0; | |
| 7869 buildUserRolePermissionGroup() { | |
| 7870 var o = new api.UserRolePermissionGroup(); | |
| 7871 buildCounterUserRolePermissionGroup++; | |
| 7872 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7873 o.id = "foo"; | |
| 7874 o.kind = "foo"; | |
| 7875 o.name = "foo"; | |
| 7876 } | |
| 7877 buildCounterUserRolePermissionGroup--; | |
| 7878 return o; | |
| 7879 } | |
| 7880 | |
| 7881 checkUserRolePermissionGroup(api.UserRolePermissionGroup o) { | |
| 7882 buildCounterUserRolePermissionGroup++; | |
| 7883 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7884 unittest.expect(o.id, unittest.equals('foo')); | |
| 7885 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7886 unittest.expect(o.name, unittest.equals('foo')); | |
| 7887 } | |
| 7888 buildCounterUserRolePermissionGroup--; | |
| 7889 } | |
| 7890 | |
| 7891 buildUnnamed2062() { | |
| 7892 var o = new core.List<api.UserRolePermissionGroup>(); | |
| 7893 o.add(buildUserRolePermissionGroup()); | |
| 7894 o.add(buildUserRolePermissionGroup()); | |
| 7895 return o; | |
| 7896 } | |
| 7897 | |
| 7898 checkUnnamed2062(core.List<api.UserRolePermissionGroup> o) { | |
| 7899 unittest.expect(o, unittest.hasLength(2)); | |
| 7900 checkUserRolePermissionGroup(o[0]); | |
| 7901 checkUserRolePermissionGroup(o[1]); | |
| 7902 } | |
| 7903 | |
| 7904 core.int buildCounterUserRolePermissionGroupsListResponse = 0; | |
| 7905 buildUserRolePermissionGroupsListResponse() { | |
| 7906 var o = new api.UserRolePermissionGroupsListResponse(); | |
| 7907 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7908 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7909 o.kind = "foo"; | |
| 7910 o.userRolePermissionGroups = buildUnnamed2062(); | |
| 7911 } | |
| 7912 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7913 return o; | |
| 7914 } | |
| 7915 | |
| 7916 checkUserRolePermissionGroupsListResponse(api.UserRolePermissionGroupsListRespon
se o) { | |
| 7917 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7918 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7919 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7920 checkUnnamed2062(o.userRolePermissionGroups); | |
| 7921 } | |
| 7922 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7923 } | |
| 7924 | |
| 7925 buildUnnamed2063() { | |
| 7926 var o = new core.List<api.UserRolePermission>(); | |
| 7927 o.add(buildUserRolePermission()); | |
| 7928 o.add(buildUserRolePermission()); | |
| 7929 return o; | |
| 7930 } | |
| 7931 | |
| 7932 checkUnnamed2063(core.List<api.UserRolePermission> o) { | |
| 7933 unittest.expect(o, unittest.hasLength(2)); | |
| 7934 checkUserRolePermission(o[0]); | |
| 7935 checkUserRolePermission(o[1]); | |
| 7936 } | |
| 7937 | |
| 7938 core.int buildCounterUserRolePermissionsListResponse = 0; | |
| 7939 buildUserRolePermissionsListResponse() { | |
| 7940 var o = new api.UserRolePermissionsListResponse(); | |
| 7941 buildCounterUserRolePermissionsListResponse++; | |
| 7942 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7943 o.kind = "foo"; | |
| 7944 o.userRolePermissions = buildUnnamed2063(); | |
| 7945 } | |
| 7946 buildCounterUserRolePermissionsListResponse--; | |
| 7947 return o; | |
| 7948 } | |
| 7949 | |
| 7950 checkUserRolePermissionsListResponse(api.UserRolePermissionsListResponse o) { | |
| 7951 buildCounterUserRolePermissionsListResponse++; | |
| 7952 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7953 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7954 checkUnnamed2063(o.userRolePermissions); | |
| 7955 } | |
| 7956 buildCounterUserRolePermissionsListResponse--; | |
| 7957 } | |
| 7958 | |
| 7959 buildUnnamed2064() { | |
| 7960 var o = new core.List<api.UserRole>(); | |
| 7961 o.add(buildUserRole()); | |
| 7962 o.add(buildUserRole()); | |
| 7963 return o; | |
| 7964 } | |
| 7965 | |
| 7966 checkUnnamed2064(core.List<api.UserRole> o) { | |
| 7967 unittest.expect(o, unittest.hasLength(2)); | |
| 7968 checkUserRole(o[0]); | |
| 7969 checkUserRole(o[1]); | |
| 7970 } | |
| 7971 | |
| 7972 core.int buildCounterUserRolesListResponse = 0; | |
| 7973 buildUserRolesListResponse() { | |
| 7974 var o = new api.UserRolesListResponse(); | |
| 7975 buildCounterUserRolesListResponse++; | |
| 7976 if (buildCounterUserRolesListResponse < 3) { | |
| 7977 o.kind = "foo"; | |
| 7978 o.nextPageToken = "foo"; | |
| 7979 o.userRoles = buildUnnamed2064(); | |
| 7980 } | |
| 7981 buildCounterUserRolesListResponse--; | |
| 7982 return o; | |
| 7983 } | |
| 7984 | |
| 7985 checkUserRolesListResponse(api.UserRolesListResponse o) { | |
| 7986 buildCounterUserRolesListResponse++; | |
| 7987 if (buildCounterUserRolesListResponse < 3) { | |
| 7988 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7989 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7990 checkUnnamed2064(o.userRoles); | |
| 7991 } | |
| 7992 buildCounterUserRolesListResponse--; | |
| 7993 } | |
| 7994 | |
| 7995 buildUnnamed2065() { | |
| 7996 var o = new core.List<core.String>(); | |
| 7997 o.add("foo"); | |
| 7998 o.add("foo"); | |
| 7999 return o; | |
| 8000 } | |
| 8001 | |
| 8002 checkUnnamed2065(core.List<core.String> o) { | |
| 8003 unittest.expect(o, unittest.hasLength(2)); | |
| 8004 unittest.expect(o[0], unittest.equals('foo')); | |
| 8005 unittest.expect(o[1], unittest.equals('foo')); | |
| 8006 } | |
| 8007 | |
| 8008 buildUnnamed2066() { | |
| 8009 var o = new core.List<core.String>(); | |
| 8010 o.add("foo"); | |
| 8011 o.add("foo"); | |
| 8012 return o; | |
| 8013 } | |
| 8014 | |
| 8015 checkUnnamed2066(core.List<core.String> o) { | |
| 8016 unittest.expect(o, unittest.hasLength(2)); | |
| 8017 unittest.expect(o[0], unittest.equals('foo')); | |
| 8018 unittest.expect(o[1], unittest.equals('foo')); | |
| 8019 } | |
| 8020 | |
| 8021 buildUnnamed2067() { | |
| 8022 var o = new core.List<core.String>(); | |
| 8023 o.add("foo"); | |
| 8024 o.add("foo"); | |
| 8025 return o; | |
| 8026 } | |
| 8027 | |
| 8028 checkUnnamed2067(core.List<core.String> o) { | |
| 8029 unittest.expect(o, unittest.hasLength(2)); | |
| 8030 unittest.expect(o[0], unittest.equals('foo')); | |
| 8031 unittest.expect(o[1], unittest.equals('foo')); | |
| 8032 } | |
| 8033 | |
| 8034 buildUnnamed2068() { | |
| 8035 var o = new core.List<core.String>(); | |
| 8036 o.add("foo"); | |
| 8037 o.add("foo"); | |
| 8038 return o; | |
| 8039 } | |
| 8040 | |
| 8041 checkUnnamed2068(core.List<core.String> o) { | |
| 8042 unittest.expect(o, unittest.hasLength(2)); | |
| 8043 unittest.expect(o[0], unittest.equals('foo')); | |
| 8044 unittest.expect(o[1], unittest.equals('foo')); | |
| 8045 } | |
| 8046 | |
| 8047 buildUnnamed2069() { | |
| 8048 var o = new core.List<core.String>(); | |
| 8049 o.add("foo"); | |
| 8050 o.add("foo"); | |
| 8051 return o; | |
| 8052 } | |
| 8053 | |
| 8054 checkUnnamed2069(core.List<core.String> o) { | |
| 8055 unittest.expect(o, unittest.hasLength(2)); | |
| 8056 unittest.expect(o[0], unittest.equals('foo')); | |
| 8057 unittest.expect(o[1], unittest.equals('foo')); | |
| 8058 } | |
| 8059 | |
| 8060 buildUnnamed2070() { | |
| 8061 var o = new core.List<core.String>(); | |
| 8062 o.add("foo"); | |
| 8063 o.add("foo"); | |
| 8064 return o; | |
| 8065 } | |
| 8066 | |
| 8067 checkUnnamed2070(core.List<core.String> o) { | |
| 8068 unittest.expect(o, unittest.hasLength(2)); | |
| 8069 unittest.expect(o[0], unittest.equals('foo')); | |
| 8070 unittest.expect(o[1], unittest.equals('foo')); | |
| 8071 } | |
| 8072 | |
| 8073 buildUnnamed2071() { | |
| 8074 var o = new core.List<core.String>(); | |
| 8075 o.add("foo"); | |
| 8076 o.add("foo"); | |
| 8077 return o; | |
| 8078 } | |
| 8079 | |
| 8080 checkUnnamed2071(core.List<core.String> o) { | |
| 8081 unittest.expect(o, unittest.hasLength(2)); | |
| 8082 unittest.expect(o[0], unittest.equals('foo')); | |
| 8083 unittest.expect(o[1], unittest.equals('foo')); | |
| 8084 } | |
| 8085 | |
| 8086 buildUnnamed2072() { | |
| 8087 var o = new core.List<core.String>(); | |
| 8088 o.add("foo"); | |
| 8089 o.add("foo"); | |
| 8090 return o; | |
| 8091 } | |
| 8092 | |
| 8093 checkUnnamed2072(core.List<core.String> o) { | |
| 8094 unittest.expect(o, unittest.hasLength(2)); | |
| 8095 unittest.expect(o[0], unittest.equals('foo')); | |
| 8096 unittest.expect(o[1], unittest.equals('foo')); | |
| 8097 } | |
| 8098 | |
| 8099 buildUnnamed2073() { | |
| 8100 var o = new core.List<core.String>(); | |
| 8101 o.add("foo"); | |
| 8102 o.add("foo"); | |
| 8103 return o; | |
| 8104 } | |
| 8105 | |
| 8106 checkUnnamed2073(core.List<core.String> o) { | |
| 8107 unittest.expect(o, unittest.hasLength(2)); | |
| 8108 unittest.expect(o[0], unittest.equals('foo')); | |
| 8109 unittest.expect(o[1], unittest.equals('foo')); | |
| 8110 } | |
| 8111 | |
| 8112 buildUnnamed2074() { | |
| 8113 var o = new core.List<core.String>(); | |
| 8114 o.add("foo"); | |
| 8115 o.add("foo"); | |
| 8116 return o; | |
| 8117 } | |
| 8118 | |
| 8119 checkUnnamed2074(core.List<core.String> o) { | |
| 8120 unittest.expect(o, unittest.hasLength(2)); | |
| 8121 unittest.expect(o[0], unittest.equals('foo')); | |
| 8122 unittest.expect(o[1], unittest.equals('foo')); | |
| 8123 } | |
| 8124 | |
| 8125 buildUnnamed2075() { | |
| 8126 var o = new core.List<core.String>(); | |
| 8127 o.add("foo"); | |
| 8128 o.add("foo"); | |
| 8129 return o; | |
| 8130 } | |
| 8131 | |
| 8132 checkUnnamed2075(core.List<core.String> o) { | |
| 8133 unittest.expect(o, unittest.hasLength(2)); | |
| 8134 unittest.expect(o[0], unittest.equals('foo')); | |
| 8135 unittest.expect(o[1], unittest.equals('foo')); | |
| 8136 } | |
| 8137 | |
| 8138 buildUnnamed2076() { | |
| 8139 var o = new core.List<core.String>(); | |
| 8140 o.add("foo"); | |
| 8141 o.add("foo"); | |
| 8142 return o; | |
| 8143 } | |
| 8144 | |
| 8145 checkUnnamed2076(core.List<core.String> o) { | |
| 8146 unittest.expect(o, unittest.hasLength(2)); | |
| 8147 unittest.expect(o[0], unittest.equals('foo')); | |
| 8148 unittest.expect(o[1], unittest.equals('foo')); | |
| 8149 } | |
| 8150 | |
| 8151 buildUnnamed2077() { | |
| 8152 var o = new core.List<core.String>(); | |
| 8153 o.add("foo"); | |
| 8154 o.add("foo"); | |
| 8155 return o; | |
| 8156 } | |
| 8157 | |
| 8158 checkUnnamed2077(core.List<core.String> o) { | |
| 8159 unittest.expect(o, unittest.hasLength(2)); | |
| 8160 unittest.expect(o[0], unittest.equals('foo')); | |
| 8161 unittest.expect(o[1], unittest.equals('foo')); | |
| 8162 } | |
| 8163 | |
| 8164 buildUnnamed2078() { | |
| 8165 var o = new core.List<core.String>(); | |
| 8166 o.add("foo"); | |
| 8167 o.add("foo"); | |
| 8168 return o; | |
| 8169 } | |
| 8170 | |
| 8171 checkUnnamed2078(core.List<core.String> o) { | |
| 8172 unittest.expect(o, unittest.hasLength(2)); | |
| 8173 unittest.expect(o[0], unittest.equals('foo')); | |
| 8174 unittest.expect(o[1], unittest.equals('foo')); | |
| 8175 } | |
| 8176 | |
| 8177 buildUnnamed2079() { | |
| 8178 var o = new core.List<core.String>(); | |
| 8179 o.add("foo"); | |
| 8180 o.add("foo"); | |
| 8181 return o; | |
| 8182 } | |
| 8183 | |
| 8184 checkUnnamed2079(core.List<core.String> o) { | |
| 8185 unittest.expect(o, unittest.hasLength(2)); | |
| 8186 unittest.expect(o[0], unittest.equals('foo')); | |
| 8187 unittest.expect(o[1], unittest.equals('foo')); | |
| 8188 } | |
| 8189 | |
| 8190 buildUnnamed2080() { | |
| 8191 var o = new core.List<core.String>(); | |
| 8192 o.add("foo"); | |
| 8193 o.add("foo"); | |
| 8194 return o; | |
| 8195 } | |
| 8196 | |
| 8197 checkUnnamed2080(core.List<core.String> o) { | |
| 8198 unittest.expect(o, unittest.hasLength(2)); | |
| 8199 unittest.expect(o[0], unittest.equals('foo')); | |
| 8200 unittest.expect(o[1], unittest.equals('foo')); | |
| 8201 } | |
| 8202 | |
| 8203 buildUnnamed2081() { | |
| 8204 var o = new core.List<core.String>(); | |
| 8205 o.add("foo"); | |
| 8206 o.add("foo"); | |
| 8207 return o; | |
| 8208 } | |
| 8209 | |
| 8210 checkUnnamed2081(core.List<core.String> o) { | |
| 8211 unittest.expect(o, unittest.hasLength(2)); | |
| 8212 unittest.expect(o[0], unittest.equals('foo')); | |
| 8213 unittest.expect(o[1], unittest.equals('foo')); | |
| 8214 } | |
| 8215 | |
| 8216 buildUnnamed2082() { | |
| 8217 var o = new core.List<core.String>(); | |
| 8218 o.add("foo"); | |
| 8219 o.add("foo"); | |
| 8220 return o; | |
| 8221 } | |
| 8222 | |
| 8223 checkUnnamed2082(core.List<core.String> o) { | |
| 8224 unittest.expect(o, unittest.hasLength(2)); | |
| 8225 unittest.expect(o[0], unittest.equals('foo')); | |
| 8226 unittest.expect(o[1], unittest.equals('foo')); | |
| 8227 } | |
| 8228 | |
| 8229 buildUnnamed2083() { | |
| 8230 var o = new core.List<core.String>(); | |
| 8231 o.add("foo"); | |
| 8232 o.add("foo"); | |
| 8233 return o; | |
| 8234 } | |
| 8235 | |
| 8236 checkUnnamed2083(core.List<core.String> o) { | |
| 8237 unittest.expect(o, unittest.hasLength(2)); | |
| 8238 unittest.expect(o[0], unittest.equals('foo')); | |
| 8239 unittest.expect(o[1], unittest.equals('foo')); | |
| 8240 } | |
| 8241 | |
| 8242 buildUnnamed2084() { | |
| 8243 var o = new core.List<core.String>(); | |
| 8244 o.add("foo"); | |
| 8245 o.add("foo"); | |
| 8246 return o; | |
| 8247 } | |
| 8248 | |
| 8249 checkUnnamed2084(core.List<core.String> o) { | |
| 8250 unittest.expect(o, unittest.hasLength(2)); | |
| 8251 unittest.expect(o[0], unittest.equals('foo')); | |
| 8252 unittest.expect(o[1], unittest.equals('foo')); | |
| 8253 } | |
| 8254 | |
| 8255 buildUnnamed2085() { | |
| 8256 var o = new core.List<core.String>(); | |
| 8257 o.add("foo"); | |
| 8258 o.add("foo"); | |
| 8259 return o; | |
| 8260 } | |
| 8261 | |
| 8262 checkUnnamed2085(core.List<core.String> o) { | |
| 8263 unittest.expect(o, unittest.hasLength(2)); | |
| 8264 unittest.expect(o[0], unittest.equals('foo')); | |
| 8265 unittest.expect(o[1], unittest.equals('foo')); | |
| 8266 } | |
| 8267 | |
| 8268 buildUnnamed2086() { | |
| 8269 var o = new core.List<core.String>(); | |
| 8270 o.add("foo"); | |
| 8271 o.add("foo"); | |
| 8272 return o; | |
| 8273 } | |
| 8274 | |
| 8275 checkUnnamed2086(core.List<core.String> o) { | |
| 8276 unittest.expect(o, unittest.hasLength(2)); | |
| 8277 unittest.expect(o[0], unittest.equals('foo')); | |
| 8278 unittest.expect(o[1], unittest.equals('foo')); | |
| 8279 } | |
| 8280 | |
| 8281 buildUnnamed2087() { | |
| 8282 var o = new core.List<core.String>(); | |
| 8283 o.add("foo"); | |
| 8284 o.add("foo"); | |
| 8285 return o; | |
| 8286 } | |
| 8287 | |
| 8288 checkUnnamed2087(core.List<core.String> o) { | |
| 8289 unittest.expect(o, unittest.hasLength(2)); | |
| 8290 unittest.expect(o[0], unittest.equals('foo')); | |
| 8291 unittest.expect(o[1], unittest.equals('foo')); | |
| 8292 } | |
| 8293 | |
| 8294 buildUnnamed2088() { | |
| 8295 var o = new core.List<core.String>(); | |
| 8296 o.add("foo"); | |
| 8297 o.add("foo"); | |
| 8298 return o; | |
| 8299 } | |
| 8300 | |
| 8301 checkUnnamed2088(core.List<core.String> o) { | |
| 8302 unittest.expect(o, unittest.hasLength(2)); | |
| 8303 unittest.expect(o[0], unittest.equals('foo')); | |
| 8304 unittest.expect(o[1], unittest.equals('foo')); | |
| 8305 } | |
| 8306 | |
| 8307 buildUnnamed2089() { | |
| 8308 var o = new core.List<core.String>(); | |
| 8309 o.add("foo"); | |
| 8310 o.add("foo"); | |
| 8311 return o; | |
| 8312 } | |
| 8313 | |
| 8314 checkUnnamed2089(core.List<core.String> o) { | |
| 8315 unittest.expect(o, unittest.hasLength(2)); | |
| 8316 unittest.expect(o[0], unittest.equals('foo')); | |
| 8317 unittest.expect(o[1], unittest.equals('foo')); | |
| 8318 } | |
| 8319 | |
| 8320 buildUnnamed2090() { | |
| 8321 var o = new core.List<core.String>(); | |
| 8322 o.add("foo"); | |
| 8323 o.add("foo"); | |
| 8324 return o; | |
| 8325 } | |
| 8326 | |
| 8327 checkUnnamed2090(core.List<core.String> o) { | |
| 8328 unittest.expect(o, unittest.hasLength(2)); | |
| 8329 unittest.expect(o[0], unittest.equals('foo')); | |
| 8330 unittest.expect(o[1], unittest.equals('foo')); | |
| 8331 } | |
| 8332 | |
| 8333 buildUnnamed2091() { | |
| 8334 var o = new core.List<core.String>(); | |
| 8335 o.add("foo"); | |
| 8336 o.add("foo"); | |
| 8337 return o; | |
| 8338 } | |
| 8339 | |
| 8340 checkUnnamed2091(core.List<core.String> o) { | |
| 8341 unittest.expect(o, unittest.hasLength(2)); | |
| 8342 unittest.expect(o[0], unittest.equals('foo')); | |
| 8343 unittest.expect(o[1], unittest.equals('foo')); | |
| 8344 } | |
| 8345 | |
| 8346 buildUnnamed2092() { | |
| 8347 var o = new core.List<core.String>(); | |
| 8348 o.add("foo"); | |
| 8349 o.add("foo"); | |
| 8350 return o; | |
| 8351 } | |
| 8352 | |
| 8353 checkUnnamed2092(core.List<core.String> o) { | |
| 8354 unittest.expect(o, unittest.hasLength(2)); | |
| 8355 unittest.expect(o[0], unittest.equals('foo')); | |
| 8356 unittest.expect(o[1], unittest.equals('foo')); | |
| 8357 } | |
| 8358 | |
| 8359 buildUnnamed2093() { | |
| 8360 var o = new core.List<core.String>(); | |
| 8361 o.add("foo"); | |
| 8362 o.add("foo"); | |
| 8363 return o; | |
| 8364 } | |
| 8365 | |
| 8366 checkUnnamed2093(core.List<core.String> o) { | |
| 8367 unittest.expect(o, unittest.hasLength(2)); | |
| 8368 unittest.expect(o[0], unittest.equals('foo')); | |
| 8369 unittest.expect(o[1], unittest.equals('foo')); | |
| 8370 } | |
| 8371 | |
| 8372 buildUnnamed2094() { | |
| 8373 var o = new core.List<core.String>(); | |
| 8374 o.add("foo"); | |
| 8375 o.add("foo"); | |
| 8376 return o; | |
| 8377 } | |
| 8378 | |
| 8379 checkUnnamed2094(core.List<core.String> o) { | |
| 8380 unittest.expect(o, unittest.hasLength(2)); | |
| 8381 unittest.expect(o[0], unittest.equals('foo')); | |
| 8382 unittest.expect(o[1], unittest.equals('foo')); | |
| 8383 } | |
| 8384 | |
| 8385 buildUnnamed2095() { | |
| 8386 var o = new core.List<core.String>(); | |
| 8387 o.add("foo"); | |
| 8388 o.add("foo"); | |
| 8389 return o; | |
| 8390 } | |
| 8391 | |
| 8392 checkUnnamed2095(core.List<core.String> o) { | |
| 8393 unittest.expect(o, unittest.hasLength(2)); | |
| 8394 unittest.expect(o[0], unittest.equals('foo')); | |
| 8395 unittest.expect(o[1], unittest.equals('foo')); | |
| 8396 } | |
| 8397 | |
| 8398 buildUnnamed2096() { | |
| 8399 var o = new core.List<core.String>(); | |
| 8400 o.add("foo"); | |
| 8401 o.add("foo"); | |
| 8402 return o; | |
| 8403 } | |
| 8404 | |
| 8405 checkUnnamed2096(core.List<core.String> o) { | |
| 8406 unittest.expect(o, unittest.hasLength(2)); | |
| 8407 unittest.expect(o[0], unittest.equals('foo')); | |
| 8408 unittest.expect(o[1], unittest.equals('foo')); | |
| 8409 } | |
| 8410 | |
| 8411 buildUnnamed2097() { | |
| 8412 var o = new core.List<core.String>(); | |
| 8413 o.add("foo"); | |
| 8414 o.add("foo"); | |
| 8415 return o; | |
| 8416 } | |
| 8417 | |
| 8418 checkUnnamed2097(core.List<core.String> o) { | |
| 8419 unittest.expect(o, unittest.hasLength(2)); | |
| 8420 unittest.expect(o[0], unittest.equals('foo')); | |
| 8421 unittest.expect(o[1], unittest.equals('foo')); | |
| 8422 } | |
| 8423 | |
| 8424 buildUnnamed2098() { | |
| 8425 var o = new core.List<core.String>(); | |
| 8426 o.add("foo"); | |
| 8427 o.add("foo"); | |
| 8428 return o; | |
| 8429 } | |
| 8430 | |
| 8431 checkUnnamed2098(core.List<core.String> o) { | |
| 8432 unittest.expect(o, unittest.hasLength(2)); | |
| 8433 unittest.expect(o[0], unittest.equals('foo')); | |
| 8434 unittest.expect(o[1], unittest.equals('foo')); | |
| 8435 } | |
| 8436 | |
| 8437 buildUnnamed2099() { | |
| 8438 var o = new core.List<core.String>(); | |
| 8439 o.add("foo"); | |
| 8440 o.add("foo"); | |
| 8441 return o; | |
| 8442 } | |
| 8443 | |
| 8444 checkUnnamed2099(core.List<core.String> o) { | |
| 8445 unittest.expect(o, unittest.hasLength(2)); | |
| 8446 unittest.expect(o[0], unittest.equals('foo')); | |
| 8447 unittest.expect(o[1], unittest.equals('foo')); | |
| 8448 } | |
| 8449 | |
| 8450 buildUnnamed2100() { | |
| 8451 var o = new core.List<core.String>(); | |
| 8452 o.add("foo"); | |
| 8453 o.add("foo"); | |
| 8454 return o; | |
| 8455 } | |
| 8456 | |
| 8457 checkUnnamed2100(core.List<core.String> o) { | |
| 8458 unittest.expect(o, unittest.hasLength(2)); | |
| 8459 unittest.expect(o[0], unittest.equals('foo')); | |
| 8460 unittest.expect(o[1], unittest.equals('foo')); | |
| 8461 } | |
| 8462 | |
| 8463 buildUnnamed2101() { | |
| 8464 var o = new core.List<core.String>(); | |
| 8465 o.add("foo"); | |
| 8466 o.add("foo"); | |
| 8467 return o; | |
| 8468 } | |
| 8469 | |
| 8470 checkUnnamed2101(core.List<core.String> o) { | |
| 8471 unittest.expect(o, unittest.hasLength(2)); | |
| 8472 unittest.expect(o[0], unittest.equals('foo')); | |
| 8473 unittest.expect(o[1], unittest.equals('foo')); | |
| 8474 } | |
| 8475 | |
| 8476 buildUnnamed2102() { | |
| 8477 var o = new core.List<core.String>(); | |
| 8478 o.add("foo"); | |
| 8479 o.add("foo"); | |
| 8480 return o; | |
| 8481 } | |
| 8482 | |
| 8483 checkUnnamed2102(core.List<core.String> o) { | |
| 8484 unittest.expect(o, unittest.hasLength(2)); | |
| 8485 unittest.expect(o[0], unittest.equals('foo')); | |
| 8486 unittest.expect(o[1], unittest.equals('foo')); | |
| 8487 } | |
| 8488 | |
| 8489 buildUnnamed2103() { | |
| 8490 var o = new core.List<core.String>(); | |
| 8491 o.add("foo"); | |
| 8492 o.add("foo"); | |
| 8493 return o; | |
| 8494 } | |
| 8495 | |
| 8496 checkUnnamed2103(core.List<core.String> o) { | |
| 8497 unittest.expect(o, unittest.hasLength(2)); | |
| 8498 unittest.expect(o[0], unittest.equals('foo')); | |
| 8499 unittest.expect(o[1], unittest.equals('foo')); | |
| 8500 } | |
| 8501 | |
| 8502 buildUnnamed2104() { | |
| 8503 var o = new core.List<core.String>(); | |
| 8504 o.add("foo"); | |
| 8505 o.add("foo"); | |
| 8506 return o; | |
| 8507 } | |
| 8508 | |
| 8509 checkUnnamed2104(core.List<core.String> o) { | |
| 8510 unittest.expect(o, unittest.hasLength(2)); | |
| 8511 unittest.expect(o[0], unittest.equals('foo')); | |
| 8512 unittest.expect(o[1], unittest.equals('foo')); | |
| 8513 } | |
| 8514 | |
| 8515 buildUnnamed2105() { | |
| 8516 var o = new core.List<core.String>(); | |
| 8517 o.add("foo"); | |
| 8518 o.add("foo"); | |
| 8519 return o; | |
| 8520 } | |
| 8521 | |
| 8522 checkUnnamed2105(core.List<core.String> o) { | |
| 8523 unittest.expect(o, unittest.hasLength(2)); | |
| 8524 unittest.expect(o[0], unittest.equals('foo')); | |
| 8525 unittest.expect(o[1], unittest.equals('foo')); | |
| 8526 } | |
| 8527 | |
| 8528 buildUnnamed2106() { | |
| 8529 var o = new core.List<core.String>(); | |
| 8530 o.add("foo"); | |
| 8531 o.add("foo"); | |
| 8532 return o; | |
| 8533 } | |
| 8534 | |
| 8535 checkUnnamed2106(core.List<core.String> o) { | |
| 8536 unittest.expect(o, unittest.hasLength(2)); | |
| 8537 unittest.expect(o[0], unittest.equals('foo')); | |
| 8538 unittest.expect(o[1], unittest.equals('foo')); | |
| 8539 } | |
| 8540 | |
| 8541 buildUnnamed2107() { | |
| 8542 var o = new core.List<core.String>(); | |
| 8543 o.add("foo"); | |
| 8544 o.add("foo"); | |
| 8545 return o; | |
| 8546 } | |
| 8547 | |
| 8548 checkUnnamed2107(core.List<core.String> o) { | |
| 8549 unittest.expect(o, unittest.hasLength(2)); | |
| 8550 unittest.expect(o[0], unittest.equals('foo')); | |
| 8551 unittest.expect(o[1], unittest.equals('foo')); | |
| 8552 } | |
| 8553 | |
| 8554 buildUnnamed2108() { | |
| 8555 var o = new core.List<core.String>(); | |
| 8556 o.add("foo"); | |
| 8557 o.add("foo"); | |
| 8558 return o; | |
| 8559 } | |
| 8560 | |
| 8561 checkUnnamed2108(core.List<core.String> o) { | |
| 8562 unittest.expect(o, unittest.hasLength(2)); | |
| 8563 unittest.expect(o[0], unittest.equals('foo')); | |
| 8564 unittest.expect(o[1], unittest.equals('foo')); | |
| 8565 } | |
| 8566 | |
| 8567 buildUnnamed2109() { | |
| 8568 var o = new core.List<core.String>(); | |
| 8569 o.add("foo"); | |
| 8570 o.add("foo"); | |
| 8571 return o; | |
| 8572 } | |
| 8573 | |
| 8574 checkUnnamed2109(core.List<core.String> o) { | |
| 8575 unittest.expect(o, unittest.hasLength(2)); | |
| 8576 unittest.expect(o[0], unittest.equals('foo')); | |
| 8577 unittest.expect(o[1], unittest.equals('foo')); | |
| 8578 } | |
| 8579 | |
| 8580 buildUnnamed2110() { | |
| 8581 var o = new core.List<core.String>(); | |
| 8582 o.add("foo"); | |
| 8583 o.add("foo"); | |
| 8584 return o; | |
| 8585 } | |
| 8586 | |
| 8587 checkUnnamed2110(core.List<core.String> o) { | |
| 8588 unittest.expect(o, unittest.hasLength(2)); | |
| 8589 unittest.expect(o[0], unittest.equals('foo')); | |
| 8590 unittest.expect(o[1], unittest.equals('foo')); | |
| 8591 } | |
| 8592 | |
| 8593 buildUnnamed2111() { | |
| 8594 var o = new core.List<core.String>(); | |
| 8595 o.add("foo"); | |
| 8596 o.add("foo"); | |
| 8597 return o; | |
| 8598 } | |
| 8599 | |
| 8600 checkUnnamed2111(core.List<core.String> o) { | |
| 8601 unittest.expect(o, unittest.hasLength(2)); | |
| 8602 unittest.expect(o[0], unittest.equals('foo')); | |
| 8603 unittest.expect(o[1], unittest.equals('foo')); | |
| 8604 } | |
| 8605 | |
| 8606 buildUnnamed2112() { | |
| 8607 var o = new core.List<core.String>(); | |
| 8608 o.add("foo"); | |
| 8609 o.add("foo"); | |
| 8610 return o; | |
| 8611 } | |
| 8612 | |
| 8613 checkUnnamed2112(core.List<core.String> o) { | |
| 8614 unittest.expect(o, unittest.hasLength(2)); | |
| 8615 unittest.expect(o[0], unittest.equals('foo')); | |
| 8616 unittest.expect(o[1], unittest.equals('foo')); | |
| 8617 } | |
| 8618 | |
| 8619 buildUnnamed2113() { | |
| 8620 var o = new core.List<core.String>(); | |
| 8621 o.add("foo"); | |
| 8622 o.add("foo"); | |
| 8623 return o; | |
| 8624 } | |
| 8625 | |
| 8626 checkUnnamed2113(core.List<core.String> o) { | |
| 8627 unittest.expect(o, unittest.hasLength(2)); | |
| 8628 unittest.expect(o[0], unittest.equals('foo')); | |
| 8629 unittest.expect(o[1], unittest.equals('foo')); | |
| 8630 } | |
| 8631 | |
| 8632 buildUnnamed2114() { | |
| 8633 var o = new core.List<core.String>(); | |
| 8634 o.add("foo"); | |
| 8635 o.add("foo"); | |
| 8636 return o; | |
| 8637 } | |
| 8638 | |
| 8639 checkUnnamed2114(core.List<core.String> o) { | |
| 8640 unittest.expect(o, unittest.hasLength(2)); | |
| 8641 unittest.expect(o[0], unittest.equals('foo')); | |
| 8642 unittest.expect(o[1], unittest.equals('foo')); | |
| 8643 } | |
| 8644 | |
| 8645 buildUnnamed2115() { | |
| 8646 var o = new core.List<core.String>(); | |
| 8647 o.add("foo"); | |
| 8648 o.add("foo"); | |
| 8649 return o; | |
| 8650 } | |
| 8651 | |
| 8652 checkUnnamed2115(core.List<core.String> o) { | |
| 8653 unittest.expect(o, unittest.hasLength(2)); | |
| 8654 unittest.expect(o[0], unittest.equals('foo')); | |
| 8655 unittest.expect(o[1], unittest.equals('foo')); | |
| 8656 } | |
| 8657 | |
| 8658 buildUnnamed2116() { | |
| 8659 var o = new core.List<core.String>(); | |
| 8660 o.add("foo"); | |
| 8661 o.add("foo"); | |
| 8662 return o; | |
| 8663 } | |
| 8664 | |
| 8665 checkUnnamed2116(core.List<core.String> o) { | |
| 8666 unittest.expect(o, unittest.hasLength(2)); | |
| 8667 unittest.expect(o[0], unittest.equals('foo')); | |
| 8668 unittest.expect(o[1], unittest.equals('foo')); | |
| 8669 } | |
| 8670 | |
| 8671 buildUnnamed2117() { | |
| 8672 var o = new core.List<core.String>(); | |
| 8673 o.add("foo"); | |
| 8674 o.add("foo"); | |
| 8675 return o; | |
| 8676 } | |
| 8677 | |
| 8678 checkUnnamed2117(core.List<core.String> o) { | |
| 8679 unittest.expect(o, unittest.hasLength(2)); | |
| 8680 unittest.expect(o[0], unittest.equals('foo')); | |
| 8681 unittest.expect(o[1], unittest.equals('foo')); | |
| 8682 } | |
| 8683 | |
| 8684 buildUnnamed2118() { | |
| 8685 var o = new core.List<core.String>(); | |
| 8686 o.add("foo"); | |
| 8687 o.add("foo"); | |
| 8688 return o; | |
| 8689 } | |
| 8690 | |
| 8691 checkUnnamed2118(core.List<core.String> o) { | |
| 8692 unittest.expect(o, unittest.hasLength(2)); | |
| 8693 unittest.expect(o[0], unittest.equals('foo')); | |
| 8694 unittest.expect(o[1], unittest.equals('foo')); | |
| 8695 } | |
| 8696 | |
| 8697 buildUnnamed2119() { | |
| 8698 var o = new core.List<core.String>(); | |
| 8699 o.add("foo"); | |
| 8700 o.add("foo"); | |
| 8701 return o; | |
| 8702 } | |
| 8703 | |
| 8704 checkUnnamed2119(core.List<core.String> o) { | |
| 8705 unittest.expect(o, unittest.hasLength(2)); | |
| 8706 unittest.expect(o[0], unittest.equals('foo')); | |
| 8707 unittest.expect(o[1], unittest.equals('foo')); | |
| 8708 } | |
| 8709 | |
| 8710 buildUnnamed2120() { | |
| 8711 var o = new core.List<core.String>(); | |
| 8712 o.add("foo"); | |
| 8713 o.add("foo"); | |
| 8714 return o; | |
| 8715 } | |
| 8716 | |
| 8717 checkUnnamed2120(core.List<core.String> o) { | |
| 8718 unittest.expect(o, unittest.hasLength(2)); | |
| 8719 unittest.expect(o[0], unittest.equals('foo')); | |
| 8720 unittest.expect(o[1], unittest.equals('foo')); | |
| 8721 } | |
| 8722 | |
| 8723 buildUnnamed2121() { | |
| 8724 var o = new core.List<core.String>(); | |
| 8725 o.add("foo"); | |
| 8726 o.add("foo"); | |
| 8727 return o; | |
| 8728 } | |
| 8729 | |
| 8730 checkUnnamed2121(core.List<core.String> o) { | |
| 8731 unittest.expect(o, unittest.hasLength(2)); | |
| 8732 unittest.expect(o[0], unittest.equals('foo')); | |
| 8733 unittest.expect(o[1], unittest.equals('foo')); | |
| 8734 } | |
| 8735 | |
| 8736 buildUnnamed2122() { | |
| 8737 var o = new core.List<core.String>(); | |
| 8738 o.add("foo"); | |
| 8739 o.add("foo"); | |
| 8740 return o; | |
| 8741 } | |
| 8742 | |
| 8743 checkUnnamed2122(core.List<core.String> o) { | |
| 8744 unittest.expect(o, unittest.hasLength(2)); | |
| 8745 unittest.expect(o[0], unittest.equals('foo')); | |
| 8746 unittest.expect(o[1], unittest.equals('foo')); | |
| 8747 } | |
| 8748 | |
| 8749 buildUnnamed2123() { | |
| 8750 var o = new core.List<core.String>(); | |
| 8751 o.add("foo"); | |
| 8752 o.add("foo"); | |
| 8753 return o; | |
| 8754 } | |
| 8755 | |
| 8756 checkUnnamed2123(core.List<core.String> o) { | |
| 8757 unittest.expect(o, unittest.hasLength(2)); | |
| 8758 unittest.expect(o[0], unittest.equals('foo')); | |
| 8759 unittest.expect(o[1], unittest.equals('foo')); | |
| 8760 } | |
| 8761 | |
| 8762 buildUnnamed2124() { | |
| 8763 var o = new core.List<core.String>(); | |
| 8764 o.add("foo"); | |
| 8765 o.add("foo"); | |
| 8766 return o; | |
| 8767 } | |
| 8768 | |
| 8769 checkUnnamed2124(core.List<core.String> o) { | |
| 8770 unittest.expect(o, unittest.hasLength(2)); | |
| 8771 unittest.expect(o[0], unittest.equals('foo')); | |
| 8772 unittest.expect(o[1], unittest.equals('foo')); | |
| 8773 } | |
| 8774 | |
| 8775 buildUnnamed2125() { | |
| 8776 var o = new core.List<core.String>(); | |
| 8777 o.add("foo"); | |
| 8778 o.add("foo"); | |
| 8779 return o; | |
| 8780 } | |
| 8781 | |
| 8782 checkUnnamed2125(core.List<core.String> o) { | |
| 8783 unittest.expect(o, unittest.hasLength(2)); | |
| 8784 unittest.expect(o[0], unittest.equals('foo')); | |
| 8785 unittest.expect(o[1], unittest.equals('foo')); | |
| 8786 } | |
| 8787 | |
| 8788 buildUnnamed2126() { | |
| 8789 var o = new core.List<core.String>(); | |
| 8790 o.add("foo"); | |
| 8791 o.add("foo"); | |
| 8792 return o; | |
| 8793 } | |
| 8794 | |
| 8795 checkUnnamed2126(core.List<core.String> o) { | |
| 8796 unittest.expect(o, unittest.hasLength(2)); | |
| 8797 unittest.expect(o[0], unittest.equals('foo')); | |
| 8798 unittest.expect(o[1], unittest.equals('foo')); | |
| 8799 } | |
| 8800 | |
| 8801 buildUnnamed2127() { | |
| 8802 var o = new core.List<core.String>(); | |
| 8803 o.add("foo"); | |
| 8804 o.add("foo"); | |
| 8805 return o; | |
| 8806 } | |
| 8807 | |
| 8808 checkUnnamed2127(core.List<core.String> o) { | |
| 8809 unittest.expect(o, unittest.hasLength(2)); | |
| 8810 unittest.expect(o[0], unittest.equals('foo')); | |
| 8811 unittest.expect(o[1], unittest.equals('foo')); | |
| 8812 } | |
| 8813 | |
| 8814 buildUnnamed2128() { | |
| 8815 var o = new core.List<core.String>(); | |
| 8816 o.add("foo"); | |
| 8817 o.add("foo"); | |
| 8818 return o; | |
| 8819 } | |
| 8820 | |
| 8821 checkUnnamed2128(core.List<core.String> o) { | |
| 8822 unittest.expect(o, unittest.hasLength(2)); | |
| 8823 unittest.expect(o[0], unittest.equals('foo')); | |
| 8824 unittest.expect(o[1], unittest.equals('foo')); | |
| 8825 } | |
| 8826 | |
| 8827 buildUnnamed2129() { | |
| 8828 var o = new core.List<core.String>(); | |
| 8829 o.add("foo"); | |
| 8830 o.add("foo"); | |
| 8831 return o; | |
| 8832 } | |
| 8833 | |
| 8834 checkUnnamed2129(core.List<core.String> o) { | |
| 8835 unittest.expect(o, unittest.hasLength(2)); | |
| 8836 unittest.expect(o[0], unittest.equals('foo')); | |
| 8837 unittest.expect(o[1], unittest.equals('foo')); | |
| 8838 } | |
| 8839 | |
| 8840 buildUnnamed2130() { | |
| 8841 var o = new core.List<core.String>(); | |
| 8842 o.add("foo"); | |
| 8843 o.add("foo"); | |
| 8844 return o; | |
| 8845 } | |
| 8846 | |
| 8847 checkUnnamed2130(core.List<core.String> o) { | |
| 8848 unittest.expect(o, unittest.hasLength(2)); | |
| 8849 unittest.expect(o[0], unittest.equals('foo')); | |
| 8850 unittest.expect(o[1], unittest.equals('foo')); | |
| 8851 } | |
| 8852 | |
| 8853 buildUnnamed2131() { | |
| 8854 var o = new core.List<core.String>(); | |
| 8855 o.add("foo"); | |
| 8856 o.add("foo"); | |
| 8857 return o; | |
| 8858 } | |
| 8859 | |
| 8860 checkUnnamed2131(core.List<core.String> o) { | |
| 8861 unittest.expect(o, unittest.hasLength(2)); | |
| 8862 unittest.expect(o[0], unittest.equals('foo')); | |
| 8863 unittest.expect(o[1], unittest.equals('foo')); | |
| 8864 } | |
| 8865 | |
| 8866 buildUnnamed2132() { | |
| 8867 var o = new core.List<core.String>(); | |
| 8868 o.add("foo"); | |
| 8869 o.add("foo"); | |
| 8870 return o; | |
| 8871 } | |
| 8872 | |
| 8873 checkUnnamed2132(core.List<core.String> o) { | |
| 8874 unittest.expect(o, unittest.hasLength(2)); | |
| 8875 unittest.expect(o[0], unittest.equals('foo')); | |
| 8876 unittest.expect(o[1], unittest.equals('foo')); | |
| 8877 } | |
| 8878 | |
| 8879 buildUnnamed2133() { | |
| 8880 var o = new core.List<core.String>(); | |
| 8881 o.add("foo"); | |
| 8882 o.add("foo"); | |
| 8883 return o; | |
| 8884 } | |
| 8885 | |
| 8886 checkUnnamed2133(core.List<core.String> o) { | |
| 8887 unittest.expect(o, unittest.hasLength(2)); | |
| 8888 unittest.expect(o[0], unittest.equals('foo')); | |
| 8889 unittest.expect(o[1], unittest.equals('foo')); | |
| 8890 } | |
| 8891 | |
| 8892 buildUnnamed2134() { | |
| 8893 var o = new core.List<core.String>(); | |
| 8894 o.add("foo"); | |
| 8895 o.add("foo"); | |
| 8896 return o; | |
| 8897 } | |
| 8898 | |
| 8899 checkUnnamed2134(core.List<core.String> o) { | |
| 8900 unittest.expect(o, unittest.hasLength(2)); | |
| 8901 unittest.expect(o[0], unittest.equals('foo')); | |
| 8902 unittest.expect(o[1], unittest.equals('foo')); | |
| 8903 } | |
| 8904 | |
| 8905 buildUnnamed2135() { | |
| 8906 var o = new core.List<core.String>(); | |
| 8907 o.add("foo"); | |
| 8908 o.add("foo"); | |
| 8909 return o; | |
| 8910 } | |
| 8911 | |
| 8912 checkUnnamed2135(core.List<core.String> o) { | |
| 8913 unittest.expect(o, unittest.hasLength(2)); | |
| 8914 unittest.expect(o[0], unittest.equals('foo')); | |
| 8915 unittest.expect(o[1], unittest.equals('foo')); | |
| 8916 } | |
| 8917 | |
| 8918 buildUnnamed2136() { | |
| 8919 var o = new core.List<core.String>(); | |
| 8920 o.add("foo"); | |
| 8921 o.add("foo"); | |
| 8922 return o; | |
| 8923 } | |
| 8924 | |
| 8925 checkUnnamed2136(core.List<core.String> o) { | |
| 8926 unittest.expect(o, unittest.hasLength(2)); | |
| 8927 unittest.expect(o[0], unittest.equals('foo')); | |
| 8928 unittest.expect(o[1], unittest.equals('foo')); | |
| 8929 } | |
| 8930 | |
| 8931 buildUnnamed2137() { | |
| 8932 var o = new core.List<core.String>(); | |
| 8933 o.add("foo"); | |
| 8934 o.add("foo"); | |
| 8935 return o; | |
| 8936 } | |
| 8937 | |
| 8938 checkUnnamed2137(core.List<core.String> o) { | |
| 8939 unittest.expect(o, unittest.hasLength(2)); | |
| 8940 unittest.expect(o[0], unittest.equals('foo')); | |
| 8941 unittest.expect(o[1], unittest.equals('foo')); | |
| 8942 } | |
| 8943 | |
| 8944 buildUnnamed2138() { | |
| 8945 var o = new core.List<core.String>(); | |
| 8946 o.add("foo"); | |
| 8947 o.add("foo"); | |
| 8948 return o; | |
| 8949 } | |
| 8950 | |
| 8951 checkUnnamed2138(core.List<core.String> o) { | |
| 8952 unittest.expect(o, unittest.hasLength(2)); | |
| 8953 unittest.expect(o[0], unittest.equals('foo')); | |
| 8954 unittest.expect(o[1], unittest.equals('foo')); | |
| 8955 } | |
| 8956 | |
| 8957 buildUnnamed2139() { | |
| 8958 var o = new core.List<core.String>(); | |
| 8959 o.add("foo"); | |
| 8960 o.add("foo"); | |
| 8961 return o; | |
| 8962 } | |
| 8963 | |
| 8964 checkUnnamed2139(core.List<core.String> o) { | |
| 8965 unittest.expect(o, unittest.hasLength(2)); | |
| 8966 unittest.expect(o[0], unittest.equals('foo')); | |
| 8967 unittest.expect(o[1], unittest.equals('foo')); | |
| 8968 } | |
| 8969 | |
| 8970 buildUnnamed2140() { | |
| 8971 var o = new core.List<core.String>(); | |
| 8972 o.add("foo"); | |
| 8973 o.add("foo"); | |
| 8974 return o; | |
| 8975 } | |
| 8976 | |
| 8977 checkUnnamed2140(core.List<core.String> o) { | |
| 8978 unittest.expect(o, unittest.hasLength(2)); | |
| 8979 unittest.expect(o[0], unittest.equals('foo')); | |
| 8980 unittest.expect(o[1], unittest.equals('foo')); | |
| 8981 } | |
| 8982 | |
| 8983 buildUnnamed2141() { | |
| 8984 var o = new core.List<core.String>(); | |
| 8985 o.add("foo"); | |
| 8986 o.add("foo"); | |
| 8987 return o; | |
| 8988 } | |
| 8989 | |
| 8990 checkUnnamed2141(core.List<core.String> o) { | |
| 8991 unittest.expect(o, unittest.hasLength(2)); | |
| 8992 unittest.expect(o[0], unittest.equals('foo')); | |
| 8993 unittest.expect(o[1], unittest.equals('foo')); | |
| 8994 } | |
| 8995 | |
| 8996 buildUnnamed2142() { | |
| 8997 var o = new core.List<core.String>(); | |
| 8998 o.add("foo"); | |
| 8999 o.add("foo"); | |
| 9000 return o; | |
| 9001 } | |
| 9002 | |
| 9003 checkUnnamed2142(core.List<core.String> o) { | |
| 9004 unittest.expect(o, unittest.hasLength(2)); | |
| 9005 unittest.expect(o[0], unittest.equals('foo')); | |
| 9006 unittest.expect(o[1], unittest.equals('foo')); | |
| 9007 } | |
| 9008 | |
| 9009 buildUnnamed2143() { | |
| 9010 var o = new core.List<core.String>(); | |
| 9011 o.add("foo"); | |
| 9012 o.add("foo"); | |
| 9013 return o; | |
| 9014 } | |
| 9015 | |
| 9016 checkUnnamed2143(core.List<core.String> o) { | |
| 9017 unittest.expect(o, unittest.hasLength(2)); | |
| 9018 unittest.expect(o[0], unittest.equals('foo')); | |
| 9019 unittest.expect(o[1], unittest.equals('foo')); | |
| 9020 } | |
| 9021 | |
| 9022 buildUnnamed2144() { | |
| 9023 var o = new core.List<core.String>(); | |
| 9024 o.add("foo"); | |
| 9025 o.add("foo"); | |
| 9026 return o; | |
| 9027 } | |
| 9028 | |
| 9029 checkUnnamed2144(core.List<core.String> o) { | |
| 9030 unittest.expect(o, unittest.hasLength(2)); | |
| 9031 unittest.expect(o[0], unittest.equals('foo')); | |
| 9032 unittest.expect(o[1], unittest.equals('foo')); | |
| 9033 } | |
| 9034 | |
| 9035 buildUnnamed2145() { | |
| 9036 var o = new core.List<core.String>(); | |
| 9037 o.add("foo"); | |
| 9038 o.add("foo"); | |
| 9039 return o; | |
| 9040 } | |
| 9041 | |
| 9042 checkUnnamed2145(core.List<core.String> o) { | |
| 9043 unittest.expect(o, unittest.hasLength(2)); | |
| 9044 unittest.expect(o[0], unittest.equals('foo')); | |
| 9045 unittest.expect(o[1], unittest.equals('foo')); | |
| 9046 } | |
| 9047 | |
| 9048 buildUnnamed2146() { | |
| 9049 var o = new core.List<core.String>(); | |
| 9050 o.add("foo"); | |
| 9051 o.add("foo"); | |
| 9052 return o; | |
| 9053 } | |
| 9054 | |
| 9055 checkUnnamed2146(core.List<core.String> o) { | |
| 9056 unittest.expect(o, unittest.hasLength(2)); | |
| 9057 unittest.expect(o[0], unittest.equals('foo')); | |
| 9058 unittest.expect(o[1], unittest.equals('foo')); | |
| 9059 } | |
| 9060 | |
| 9061 buildUnnamed2147() { | |
| 9062 var o = new core.List<core.String>(); | |
| 9063 o.add("foo"); | |
| 9064 o.add("foo"); | |
| 9065 return o; | |
| 9066 } | |
| 9067 | |
| 9068 checkUnnamed2147(core.List<core.String> o) { | |
| 9069 unittest.expect(o, unittest.hasLength(2)); | |
| 9070 unittest.expect(o[0], unittest.equals('foo')); | |
| 9071 unittest.expect(o[1], unittest.equals('foo')); | |
| 9072 } | |
| 9073 | |
| 9074 buildUnnamed2148() { | |
| 9075 var o = new core.List<core.String>(); | |
| 9076 o.add("foo"); | |
| 9077 o.add("foo"); | |
| 9078 return o; | |
| 9079 } | |
| 9080 | |
| 9081 checkUnnamed2148(core.List<core.String> o) { | |
| 9082 unittest.expect(o, unittest.hasLength(2)); | |
| 9083 unittest.expect(o[0], unittest.equals('foo')); | |
| 9084 unittest.expect(o[1], unittest.equals('foo')); | |
| 9085 } | |
| 9086 | |
| 9087 buildUnnamed2149() { | |
| 9088 var o = new core.List<core.String>(); | |
| 9089 o.add("foo"); | |
| 9090 o.add("foo"); | |
| 9091 return o; | |
| 9092 } | |
| 9093 | |
| 9094 checkUnnamed2149(core.List<core.String> o) { | |
| 9095 unittest.expect(o, unittest.hasLength(2)); | |
| 9096 unittest.expect(o[0], unittest.equals('foo')); | |
| 9097 unittest.expect(o[1], unittest.equals('foo')); | |
| 9098 } | |
| 9099 | |
| 9100 buildUnnamed2150() { | |
| 9101 var o = new core.List<core.String>(); | |
| 9102 o.add("foo"); | |
| 9103 o.add("foo"); | |
| 9104 return o; | |
| 9105 } | |
| 9106 | |
| 9107 checkUnnamed2150(core.List<core.String> o) { | |
| 9108 unittest.expect(o, unittest.hasLength(2)); | |
| 9109 unittest.expect(o[0], unittest.equals('foo')); | |
| 9110 unittest.expect(o[1], unittest.equals('foo')); | |
| 9111 } | |
| 9112 | |
| 9113 | |
| 9114 main() { | |
| 9115 unittest.group("obj-schema-Account", () { | |
| 9116 unittest.test("to-json--from-json", () { | |
| 9117 var o = buildAccount(); | |
| 9118 var od = new api.Account.fromJson(o.toJson()); | |
| 9119 checkAccount(od); | |
| 9120 }); | |
| 9121 }); | |
| 9122 | |
| 9123 | |
| 9124 unittest.group("obj-schema-AccountActiveAdSummary", () { | |
| 9125 unittest.test("to-json--from-json", () { | |
| 9126 var o = buildAccountActiveAdSummary(); | |
| 9127 var od = new api.AccountActiveAdSummary.fromJson(o.toJson()); | |
| 9128 checkAccountActiveAdSummary(od); | |
| 9129 }); | |
| 9130 }); | |
| 9131 | |
| 9132 | |
| 9133 unittest.group("obj-schema-AccountPermission", () { | |
| 9134 unittest.test("to-json--from-json", () { | |
| 9135 var o = buildAccountPermission(); | |
| 9136 var od = new api.AccountPermission.fromJson(o.toJson()); | |
| 9137 checkAccountPermission(od); | |
| 9138 }); | |
| 9139 }); | |
| 9140 | |
| 9141 | |
| 9142 unittest.group("obj-schema-AccountPermissionGroup", () { | |
| 9143 unittest.test("to-json--from-json", () { | |
| 9144 var o = buildAccountPermissionGroup(); | |
| 9145 var od = new api.AccountPermissionGroup.fromJson(o.toJson()); | |
| 9146 checkAccountPermissionGroup(od); | |
| 9147 }); | |
| 9148 }); | |
| 9149 | |
| 9150 | |
| 9151 unittest.group("obj-schema-AccountPermissionGroupsListResponse", () { | |
| 9152 unittest.test("to-json--from-json", () { | |
| 9153 var o = buildAccountPermissionGroupsListResponse(); | |
| 9154 var od = new api.AccountPermissionGroupsListResponse.fromJson(o.toJson()); | |
| 9155 checkAccountPermissionGroupsListResponse(od); | |
| 9156 }); | |
| 9157 }); | |
| 9158 | |
| 9159 | |
| 9160 unittest.group("obj-schema-AccountPermissionsListResponse", () { | |
| 9161 unittest.test("to-json--from-json", () { | |
| 9162 var o = buildAccountPermissionsListResponse(); | |
| 9163 var od = new api.AccountPermissionsListResponse.fromJson(o.toJson()); | |
| 9164 checkAccountPermissionsListResponse(od); | |
| 9165 }); | |
| 9166 }); | |
| 9167 | |
| 9168 | |
| 9169 unittest.group("obj-schema-AccountUserProfile", () { | |
| 9170 unittest.test("to-json--from-json", () { | |
| 9171 var o = buildAccountUserProfile(); | |
| 9172 var od = new api.AccountUserProfile.fromJson(o.toJson()); | |
| 9173 checkAccountUserProfile(od); | |
| 9174 }); | |
| 9175 }); | |
| 9176 | |
| 9177 | |
| 9178 unittest.group("obj-schema-AccountUserProfilesListResponse", () { | |
| 9179 unittest.test("to-json--from-json", () { | |
| 9180 var o = buildAccountUserProfilesListResponse(); | |
| 9181 var od = new api.AccountUserProfilesListResponse.fromJson(o.toJson()); | |
| 9182 checkAccountUserProfilesListResponse(od); | |
| 9183 }); | |
| 9184 }); | |
| 9185 | |
| 9186 | |
| 9187 unittest.group("obj-schema-AccountsListResponse", () { | |
| 9188 unittest.test("to-json--from-json", () { | |
| 9189 var o = buildAccountsListResponse(); | |
| 9190 var od = new api.AccountsListResponse.fromJson(o.toJson()); | |
| 9191 checkAccountsListResponse(od); | |
| 9192 }); | |
| 9193 }); | |
| 9194 | |
| 9195 | |
| 9196 unittest.group("obj-schema-Activities", () { | |
| 9197 unittest.test("to-json--from-json", () { | |
| 9198 var o = buildActivities(); | |
| 9199 var od = new api.Activities.fromJson(o.toJson()); | |
| 9200 checkActivities(od); | |
| 9201 }); | |
| 9202 }); | |
| 9203 | |
| 9204 | |
| 9205 unittest.group("obj-schema-Ad", () { | |
| 9206 unittest.test("to-json--from-json", () { | |
| 9207 var o = buildAd(); | |
| 9208 var od = new api.Ad.fromJson(o.toJson()); | |
| 9209 checkAd(od); | |
| 9210 }); | |
| 9211 }); | |
| 9212 | |
| 9213 | |
| 9214 unittest.group("obj-schema-AdSlot", () { | |
| 9215 unittest.test("to-json--from-json", () { | |
| 9216 var o = buildAdSlot(); | |
| 9217 var od = new api.AdSlot.fromJson(o.toJson()); | |
| 9218 checkAdSlot(od); | |
| 9219 }); | |
| 9220 }); | |
| 9221 | |
| 9222 | |
| 9223 unittest.group("obj-schema-AdsListResponse", () { | |
| 9224 unittest.test("to-json--from-json", () { | |
| 9225 var o = buildAdsListResponse(); | |
| 9226 var od = new api.AdsListResponse.fromJson(o.toJson()); | |
| 9227 checkAdsListResponse(od); | |
| 9228 }); | |
| 9229 }); | |
| 9230 | |
| 9231 | |
| 9232 unittest.group("obj-schema-Advertiser", () { | |
| 9233 unittest.test("to-json--from-json", () { | |
| 9234 var o = buildAdvertiser(); | |
| 9235 var od = new api.Advertiser.fromJson(o.toJson()); | |
| 9236 checkAdvertiser(od); | |
| 9237 }); | |
| 9238 }); | |
| 9239 | |
| 9240 | |
| 9241 unittest.group("obj-schema-AdvertiserGroup", () { | |
| 9242 unittest.test("to-json--from-json", () { | |
| 9243 var o = buildAdvertiserGroup(); | |
| 9244 var od = new api.AdvertiserGroup.fromJson(o.toJson()); | |
| 9245 checkAdvertiserGroup(od); | |
| 9246 }); | |
| 9247 }); | |
| 9248 | |
| 9249 | |
| 9250 unittest.group("obj-schema-AdvertiserGroupsListResponse", () { | |
| 9251 unittest.test("to-json--from-json", () { | |
| 9252 var o = buildAdvertiserGroupsListResponse(); | |
| 9253 var od = new api.AdvertiserGroupsListResponse.fromJson(o.toJson()); | |
| 9254 checkAdvertiserGroupsListResponse(od); | |
| 9255 }); | |
| 9256 }); | |
| 9257 | |
| 9258 | |
| 9259 unittest.group("obj-schema-AdvertisersListResponse", () { | |
| 9260 unittest.test("to-json--from-json", () { | |
| 9261 var o = buildAdvertisersListResponse(); | |
| 9262 var od = new api.AdvertisersListResponse.fromJson(o.toJson()); | |
| 9263 checkAdvertisersListResponse(od); | |
| 9264 }); | |
| 9265 }); | |
| 9266 | |
| 9267 | |
| 9268 unittest.group("obj-schema-AudienceSegment", () { | |
| 9269 unittest.test("to-json--from-json", () { | |
| 9270 var o = buildAudienceSegment(); | |
| 9271 var od = new api.AudienceSegment.fromJson(o.toJson()); | |
| 9272 checkAudienceSegment(od); | |
| 9273 }); | |
| 9274 }); | |
| 9275 | |
| 9276 | |
| 9277 unittest.group("obj-schema-AudienceSegmentGroup", () { | |
| 9278 unittest.test("to-json--from-json", () { | |
| 9279 var o = buildAudienceSegmentGroup(); | |
| 9280 var od = new api.AudienceSegmentGroup.fromJson(o.toJson()); | |
| 9281 checkAudienceSegmentGroup(od); | |
| 9282 }); | |
| 9283 }); | |
| 9284 | |
| 9285 | |
| 9286 unittest.group("obj-schema-Browser", () { | |
| 9287 unittest.test("to-json--from-json", () { | |
| 9288 var o = buildBrowser(); | |
| 9289 var od = new api.Browser.fromJson(o.toJson()); | |
| 9290 checkBrowser(od); | |
| 9291 }); | |
| 9292 }); | |
| 9293 | |
| 9294 | |
| 9295 unittest.group("obj-schema-BrowsersListResponse", () { | |
| 9296 unittest.test("to-json--from-json", () { | |
| 9297 var o = buildBrowsersListResponse(); | |
| 9298 var od = new api.BrowsersListResponse.fromJson(o.toJson()); | |
| 9299 checkBrowsersListResponse(od); | |
| 9300 }); | |
| 9301 }); | |
| 9302 | |
| 9303 | |
| 9304 unittest.group("obj-schema-Campaign", () { | |
| 9305 unittest.test("to-json--from-json", () { | |
| 9306 var o = buildCampaign(); | |
| 9307 var od = new api.Campaign.fromJson(o.toJson()); | |
| 9308 checkCampaign(od); | |
| 9309 }); | |
| 9310 }); | |
| 9311 | |
| 9312 | |
| 9313 unittest.group("obj-schema-CampaignCreativeAssociation", () { | |
| 9314 unittest.test("to-json--from-json", () { | |
| 9315 var o = buildCampaignCreativeAssociation(); | |
| 9316 var od = new api.CampaignCreativeAssociation.fromJson(o.toJson()); | |
| 9317 checkCampaignCreativeAssociation(od); | |
| 9318 }); | |
| 9319 }); | |
| 9320 | |
| 9321 | |
| 9322 unittest.group("obj-schema-CampaignCreativeAssociationsListResponse", () { | |
| 9323 unittest.test("to-json--from-json", () { | |
| 9324 var o = buildCampaignCreativeAssociationsListResponse(); | |
| 9325 var od = new api.CampaignCreativeAssociationsListResponse.fromJson(o.toJso
n()); | |
| 9326 checkCampaignCreativeAssociationsListResponse(od); | |
| 9327 }); | |
| 9328 }); | |
| 9329 | |
| 9330 | |
| 9331 unittest.group("obj-schema-CampaignsListResponse", () { | |
| 9332 unittest.test("to-json--from-json", () { | |
| 9333 var o = buildCampaignsListResponse(); | |
| 9334 var od = new api.CampaignsListResponse.fromJson(o.toJson()); | |
| 9335 checkCampaignsListResponse(od); | |
| 9336 }); | |
| 9337 }); | |
| 9338 | |
| 9339 | |
| 9340 unittest.group("obj-schema-ChangeLog", () { | |
| 9341 unittest.test("to-json--from-json", () { | |
| 9342 var o = buildChangeLog(); | |
| 9343 var od = new api.ChangeLog.fromJson(o.toJson()); | |
| 9344 checkChangeLog(od); | |
| 9345 }); | |
| 9346 }); | |
| 9347 | |
| 9348 | |
| 9349 unittest.group("obj-schema-ChangeLogsListResponse", () { | |
| 9350 unittest.test("to-json--from-json", () { | |
| 9351 var o = buildChangeLogsListResponse(); | |
| 9352 var od = new api.ChangeLogsListResponse.fromJson(o.toJson()); | |
| 9353 checkChangeLogsListResponse(od); | |
| 9354 }); | |
| 9355 }); | |
| 9356 | |
| 9357 | |
| 9358 unittest.group("obj-schema-CitiesListResponse", () { | |
| 9359 unittest.test("to-json--from-json", () { | |
| 9360 var o = buildCitiesListResponse(); | |
| 9361 var od = new api.CitiesListResponse.fromJson(o.toJson()); | |
| 9362 checkCitiesListResponse(od); | |
| 9363 }); | |
| 9364 }); | |
| 9365 | |
| 9366 | |
| 9367 unittest.group("obj-schema-City", () { | |
| 9368 unittest.test("to-json--from-json", () { | |
| 9369 var o = buildCity(); | |
| 9370 var od = new api.City.fromJson(o.toJson()); | |
| 9371 checkCity(od); | |
| 9372 }); | |
| 9373 }); | |
| 9374 | |
| 9375 | |
| 9376 unittest.group("obj-schema-ClickTag", () { | |
| 9377 unittest.test("to-json--from-json", () { | |
| 9378 var o = buildClickTag(); | |
| 9379 var od = new api.ClickTag.fromJson(o.toJson()); | |
| 9380 checkClickTag(od); | |
| 9381 }); | |
| 9382 }); | |
| 9383 | |
| 9384 | |
| 9385 unittest.group("obj-schema-ClickThroughUrl", () { | |
| 9386 unittest.test("to-json--from-json", () { | |
| 9387 var o = buildClickThroughUrl(); | |
| 9388 var od = new api.ClickThroughUrl.fromJson(o.toJson()); | |
| 9389 checkClickThroughUrl(od); | |
| 9390 }); | |
| 9391 }); | |
| 9392 | |
| 9393 | |
| 9394 unittest.group("obj-schema-ClickThroughUrlSuffixProperties", () { | |
| 9395 unittest.test("to-json--from-json", () { | |
| 9396 var o = buildClickThroughUrlSuffixProperties(); | |
| 9397 var od = new api.ClickThroughUrlSuffixProperties.fromJson(o.toJson()); | |
| 9398 checkClickThroughUrlSuffixProperties(od); | |
| 9399 }); | |
| 9400 }); | |
| 9401 | |
| 9402 | |
| 9403 unittest.group("obj-schema-CompanionClickThroughOverride", () { | |
| 9404 unittest.test("to-json--from-json", () { | |
| 9405 var o = buildCompanionClickThroughOverride(); | |
| 9406 var od = new api.CompanionClickThroughOverride.fromJson(o.toJson()); | |
| 9407 checkCompanionClickThroughOverride(od); | |
| 9408 }); | |
| 9409 }); | |
| 9410 | |
| 9411 | |
| 9412 unittest.group("obj-schema-CompatibleFields", () { | |
| 9413 unittest.test("to-json--from-json", () { | |
| 9414 var o = buildCompatibleFields(); | |
| 9415 var od = new api.CompatibleFields.fromJson(o.toJson()); | |
| 9416 checkCompatibleFields(od); | |
| 9417 }); | |
| 9418 }); | |
| 9419 | |
| 9420 | |
| 9421 unittest.group("obj-schema-ConnectionType", () { | |
| 9422 unittest.test("to-json--from-json", () { | |
| 9423 var o = buildConnectionType(); | |
| 9424 var od = new api.ConnectionType.fromJson(o.toJson()); | |
| 9425 checkConnectionType(od); | |
| 9426 }); | |
| 9427 }); | |
| 9428 | |
| 9429 | |
| 9430 unittest.group("obj-schema-ConnectionTypesListResponse", () { | |
| 9431 unittest.test("to-json--from-json", () { | |
| 9432 var o = buildConnectionTypesListResponse(); | |
| 9433 var od = new api.ConnectionTypesListResponse.fromJson(o.toJson()); | |
| 9434 checkConnectionTypesListResponse(od); | |
| 9435 }); | |
| 9436 }); | |
| 9437 | |
| 9438 | |
| 9439 unittest.group("obj-schema-ContentCategoriesListResponse", () { | |
| 9440 unittest.test("to-json--from-json", () { | |
| 9441 var o = buildContentCategoriesListResponse(); | |
| 9442 var od = new api.ContentCategoriesListResponse.fromJson(o.toJson()); | |
| 9443 checkContentCategoriesListResponse(od); | |
| 9444 }); | |
| 9445 }); | |
| 9446 | |
| 9447 | |
| 9448 unittest.group("obj-schema-ContentCategory", () { | |
| 9449 unittest.test("to-json--from-json", () { | |
| 9450 var o = buildContentCategory(); | |
| 9451 var od = new api.ContentCategory.fromJson(o.toJson()); | |
| 9452 checkContentCategory(od); | |
| 9453 }); | |
| 9454 }); | |
| 9455 | |
| 9456 | |
| 9457 unittest.group("obj-schema-CountriesListResponse", () { | |
| 9458 unittest.test("to-json--from-json", () { | |
| 9459 var o = buildCountriesListResponse(); | |
| 9460 var od = new api.CountriesListResponse.fromJson(o.toJson()); | |
| 9461 checkCountriesListResponse(od); | |
| 9462 }); | |
| 9463 }); | |
| 9464 | |
| 9465 | |
| 9466 unittest.group("obj-schema-Country", () { | |
| 9467 unittest.test("to-json--from-json", () { | |
| 9468 var o = buildCountry(); | |
| 9469 var od = new api.Country.fromJson(o.toJson()); | |
| 9470 checkCountry(od); | |
| 9471 }); | |
| 9472 }); | |
| 9473 | |
| 9474 | |
| 9475 unittest.group("obj-schema-Creative", () { | |
| 9476 unittest.test("to-json--from-json", () { | |
| 9477 var o = buildCreative(); | |
| 9478 var od = new api.Creative.fromJson(o.toJson()); | |
| 9479 checkCreative(od); | |
| 9480 }); | |
| 9481 }); | |
| 9482 | |
| 9483 | |
| 9484 unittest.group("obj-schema-CreativeAsset", () { | |
| 9485 unittest.test("to-json--from-json", () { | |
| 9486 var o = buildCreativeAsset(); | |
| 9487 var od = new api.CreativeAsset.fromJson(o.toJson()); | |
| 9488 checkCreativeAsset(od); | |
| 9489 }); | |
| 9490 }); | |
| 9491 | |
| 9492 | |
| 9493 unittest.group("obj-schema-CreativeAssetId", () { | |
| 9494 unittest.test("to-json--from-json", () { | |
| 9495 var o = buildCreativeAssetId(); | |
| 9496 var od = new api.CreativeAssetId.fromJson(o.toJson()); | |
| 9497 checkCreativeAssetId(od); | |
| 9498 }); | |
| 9499 }); | |
| 9500 | |
| 9501 | |
| 9502 unittest.group("obj-schema-CreativeAssetMetadata", () { | |
| 9503 unittest.test("to-json--from-json", () { | |
| 9504 var o = buildCreativeAssetMetadata(); | |
| 9505 var od = new api.CreativeAssetMetadata.fromJson(o.toJson()); | |
| 9506 checkCreativeAssetMetadata(od); | |
| 9507 }); | |
| 9508 }); | |
| 9509 | |
| 9510 | |
| 9511 unittest.group("obj-schema-CreativeAssignment", () { | |
| 9512 unittest.test("to-json--from-json", () { | |
| 9513 var o = buildCreativeAssignment(); | |
| 9514 var od = new api.CreativeAssignment.fromJson(o.toJson()); | |
| 9515 checkCreativeAssignment(od); | |
| 9516 }); | |
| 9517 }); | |
| 9518 | |
| 9519 | |
| 9520 unittest.group("obj-schema-CreativeCustomEvent", () { | |
| 9521 unittest.test("to-json--from-json", () { | |
| 9522 var o = buildCreativeCustomEvent(); | |
| 9523 var od = new api.CreativeCustomEvent.fromJson(o.toJson()); | |
| 9524 checkCreativeCustomEvent(od); | |
| 9525 }); | |
| 9526 }); | |
| 9527 | |
| 9528 | |
| 9529 unittest.group("obj-schema-CreativeField", () { | |
| 9530 unittest.test("to-json--from-json", () { | |
| 9531 var o = buildCreativeField(); | |
| 9532 var od = new api.CreativeField.fromJson(o.toJson()); | |
| 9533 checkCreativeField(od); | |
| 9534 }); | |
| 9535 }); | |
| 9536 | |
| 9537 | |
| 9538 unittest.group("obj-schema-CreativeFieldAssignment", () { | |
| 9539 unittest.test("to-json--from-json", () { | |
| 9540 var o = buildCreativeFieldAssignment(); | |
| 9541 var od = new api.CreativeFieldAssignment.fromJson(o.toJson()); | |
| 9542 checkCreativeFieldAssignment(od); | |
| 9543 }); | |
| 9544 }); | |
| 9545 | |
| 9546 | |
| 9547 unittest.group("obj-schema-CreativeFieldValue", () { | |
| 9548 unittest.test("to-json--from-json", () { | |
| 9549 var o = buildCreativeFieldValue(); | |
| 9550 var od = new api.CreativeFieldValue.fromJson(o.toJson()); | |
| 9551 checkCreativeFieldValue(od); | |
| 9552 }); | |
| 9553 }); | |
| 9554 | |
| 9555 | |
| 9556 unittest.group("obj-schema-CreativeFieldValuesListResponse", () { | |
| 9557 unittest.test("to-json--from-json", () { | |
| 9558 var o = buildCreativeFieldValuesListResponse(); | |
| 9559 var od = new api.CreativeFieldValuesListResponse.fromJson(o.toJson()); | |
| 9560 checkCreativeFieldValuesListResponse(od); | |
| 9561 }); | |
| 9562 }); | |
| 9563 | |
| 9564 | |
| 9565 unittest.group("obj-schema-CreativeFieldsListResponse", () { | |
| 9566 unittest.test("to-json--from-json", () { | |
| 9567 var o = buildCreativeFieldsListResponse(); | |
| 9568 var od = new api.CreativeFieldsListResponse.fromJson(o.toJson()); | |
| 9569 checkCreativeFieldsListResponse(od); | |
| 9570 }); | |
| 9571 }); | |
| 9572 | |
| 9573 | |
| 9574 unittest.group("obj-schema-CreativeGroup", () { | |
| 9575 unittest.test("to-json--from-json", () { | |
| 9576 var o = buildCreativeGroup(); | |
| 9577 var od = new api.CreativeGroup.fromJson(o.toJson()); | |
| 9578 checkCreativeGroup(od); | |
| 9579 }); | |
| 9580 }); | |
| 9581 | |
| 9582 | |
| 9583 unittest.group("obj-schema-CreativeGroupAssignment", () { | |
| 9584 unittest.test("to-json--from-json", () { | |
| 9585 var o = buildCreativeGroupAssignment(); | |
| 9586 var od = new api.CreativeGroupAssignment.fromJson(o.toJson()); | |
| 9587 checkCreativeGroupAssignment(od); | |
| 9588 }); | |
| 9589 }); | |
| 9590 | |
| 9591 | |
| 9592 unittest.group("obj-schema-CreativeGroupsListResponse", () { | |
| 9593 unittest.test("to-json--from-json", () { | |
| 9594 var o = buildCreativeGroupsListResponse(); | |
| 9595 var od = new api.CreativeGroupsListResponse.fromJson(o.toJson()); | |
| 9596 checkCreativeGroupsListResponse(od); | |
| 9597 }); | |
| 9598 }); | |
| 9599 | |
| 9600 | |
| 9601 unittest.group("obj-schema-CreativeOptimizationConfiguration", () { | |
| 9602 unittest.test("to-json--from-json", () { | |
| 9603 var o = buildCreativeOptimizationConfiguration(); | |
| 9604 var od = new api.CreativeOptimizationConfiguration.fromJson(o.toJson()); | |
| 9605 checkCreativeOptimizationConfiguration(od); | |
| 9606 }); | |
| 9607 }); | |
| 9608 | |
| 9609 | |
| 9610 unittest.group("obj-schema-CreativeRotation", () { | |
| 9611 unittest.test("to-json--from-json", () { | |
| 9612 var o = buildCreativeRotation(); | |
| 9613 var od = new api.CreativeRotation.fromJson(o.toJson()); | |
| 9614 checkCreativeRotation(od); | |
| 9615 }); | |
| 9616 }); | |
| 9617 | |
| 9618 | |
| 9619 unittest.group("obj-schema-CreativeSettings", () { | |
| 9620 unittest.test("to-json--from-json", () { | |
| 9621 var o = buildCreativeSettings(); | |
| 9622 var od = new api.CreativeSettings.fromJson(o.toJson()); | |
| 9623 checkCreativeSettings(od); | |
| 9624 }); | |
| 9625 }); | |
| 9626 | |
| 9627 | |
| 9628 unittest.group("obj-schema-CreativesListResponse", () { | |
| 9629 unittest.test("to-json--from-json", () { | |
| 9630 var o = buildCreativesListResponse(); | |
| 9631 var od = new api.CreativesListResponse.fromJson(o.toJson()); | |
| 9632 checkCreativesListResponse(od); | |
| 9633 }); | |
| 9634 }); | |
| 9635 | |
| 9636 | |
| 9637 unittest.group("obj-schema-CrossDimensionReachReportCompatibleFields", () { | |
| 9638 unittest.test("to-json--from-json", () { | |
| 9639 var o = buildCrossDimensionReachReportCompatibleFields(); | |
| 9640 var od = new api.CrossDimensionReachReportCompatibleFields.fromJson(o.toJs
on()); | |
| 9641 checkCrossDimensionReachReportCompatibleFields(od); | |
| 9642 }); | |
| 9643 }); | |
| 9644 | |
| 9645 | |
| 9646 unittest.group("obj-schema-CustomRichMediaEvents", () { | |
| 9647 unittest.test("to-json--from-json", () { | |
| 9648 var o = buildCustomRichMediaEvents(); | |
| 9649 var od = new api.CustomRichMediaEvents.fromJson(o.toJson()); | |
| 9650 checkCustomRichMediaEvents(od); | |
| 9651 }); | |
| 9652 }); | |
| 9653 | |
| 9654 | |
| 9655 unittest.group("obj-schema-DateRange", () { | |
| 9656 unittest.test("to-json--from-json", () { | |
| 9657 var o = buildDateRange(); | |
| 9658 var od = new api.DateRange.fromJson(o.toJson()); | |
| 9659 checkDateRange(od); | |
| 9660 }); | |
| 9661 }); | |
| 9662 | |
| 9663 | |
| 9664 unittest.group("obj-schema-DayPartTargeting", () { | |
| 9665 unittest.test("to-json--from-json", () { | |
| 9666 var o = buildDayPartTargeting(); | |
| 9667 var od = new api.DayPartTargeting.fromJson(o.toJson()); | |
| 9668 checkDayPartTargeting(od); | |
| 9669 }); | |
| 9670 }); | |
| 9671 | |
| 9672 | |
| 9673 unittest.group("obj-schema-DefaultClickThroughEventTagProperties", () { | |
| 9674 unittest.test("to-json--from-json", () { | |
| 9675 var o = buildDefaultClickThroughEventTagProperties(); | |
| 9676 var od = new api.DefaultClickThroughEventTagProperties.fromJson(o.toJson()
); | |
| 9677 checkDefaultClickThroughEventTagProperties(od); | |
| 9678 }); | |
| 9679 }); | |
| 9680 | |
| 9681 | |
| 9682 unittest.group("obj-schema-DeliverySchedule", () { | |
| 9683 unittest.test("to-json--from-json", () { | |
| 9684 var o = buildDeliverySchedule(); | |
| 9685 var od = new api.DeliverySchedule.fromJson(o.toJson()); | |
| 9686 checkDeliverySchedule(od); | |
| 9687 }); | |
| 9688 }); | |
| 9689 | |
| 9690 | |
| 9691 unittest.group("obj-schema-DfpSettings", () { | |
| 9692 unittest.test("to-json--from-json", () { | |
| 9693 var o = buildDfpSettings(); | |
| 9694 var od = new api.DfpSettings.fromJson(o.toJson()); | |
| 9695 checkDfpSettings(od); | |
| 9696 }); | |
| 9697 }); | |
| 9698 | |
| 9699 | |
| 9700 unittest.group("obj-schema-Dimension", () { | |
| 9701 unittest.test("to-json--from-json", () { | |
| 9702 var o = buildDimension(); | |
| 9703 var od = new api.Dimension.fromJson(o.toJson()); | |
| 9704 checkDimension(od); | |
| 9705 }); | |
| 9706 }); | |
| 9707 | |
| 9708 | |
| 9709 unittest.group("obj-schema-DimensionFilter", () { | |
| 9710 unittest.test("to-json--from-json", () { | |
| 9711 var o = buildDimensionFilter(); | |
| 9712 var od = new api.DimensionFilter.fromJson(o.toJson()); | |
| 9713 checkDimensionFilter(od); | |
| 9714 }); | |
| 9715 }); | |
| 9716 | |
| 9717 | |
| 9718 unittest.group("obj-schema-DimensionValue", () { | |
| 9719 unittest.test("to-json--from-json", () { | |
| 9720 var o = buildDimensionValue(); | |
| 9721 var od = new api.DimensionValue.fromJson(o.toJson()); | |
| 9722 checkDimensionValue(od); | |
| 9723 }); | |
| 9724 }); | |
| 9725 | |
| 9726 | |
| 9727 unittest.group("obj-schema-DimensionValueList", () { | |
| 9728 unittest.test("to-json--from-json", () { | |
| 9729 var o = buildDimensionValueList(); | |
| 9730 var od = new api.DimensionValueList.fromJson(o.toJson()); | |
| 9731 checkDimensionValueList(od); | |
| 9732 }); | |
| 9733 }); | |
| 9734 | |
| 9735 | |
| 9736 unittest.group("obj-schema-DimensionValueRequest", () { | |
| 9737 unittest.test("to-json--from-json", () { | |
| 9738 var o = buildDimensionValueRequest(); | |
| 9739 var od = new api.DimensionValueRequest.fromJson(o.toJson()); | |
| 9740 checkDimensionValueRequest(od); | |
| 9741 }); | |
| 9742 }); | |
| 9743 | |
| 9744 | |
| 9745 unittest.group("obj-schema-DirectorySite", () { | |
| 9746 unittest.test("to-json--from-json", () { | |
| 9747 var o = buildDirectorySite(); | |
| 9748 var od = new api.DirectorySite.fromJson(o.toJson()); | |
| 9749 checkDirectorySite(od); | |
| 9750 }); | |
| 9751 }); | |
| 9752 | |
| 9753 | |
| 9754 unittest.group("obj-schema-DirectorySiteContact", () { | |
| 9755 unittest.test("to-json--from-json", () { | |
| 9756 var o = buildDirectorySiteContact(); | |
| 9757 var od = new api.DirectorySiteContact.fromJson(o.toJson()); | |
| 9758 checkDirectorySiteContact(od); | |
| 9759 }); | |
| 9760 }); | |
| 9761 | |
| 9762 | |
| 9763 unittest.group("obj-schema-DirectorySiteContactAssignment", () { | |
| 9764 unittest.test("to-json--from-json", () { | |
| 9765 var o = buildDirectorySiteContactAssignment(); | |
| 9766 var od = new api.DirectorySiteContactAssignment.fromJson(o.toJson()); | |
| 9767 checkDirectorySiteContactAssignment(od); | |
| 9768 }); | |
| 9769 }); | |
| 9770 | |
| 9771 | |
| 9772 unittest.group("obj-schema-DirectorySiteContactsListResponse", () { | |
| 9773 unittest.test("to-json--from-json", () { | |
| 9774 var o = buildDirectorySiteContactsListResponse(); | |
| 9775 var od = new api.DirectorySiteContactsListResponse.fromJson(o.toJson()); | |
| 9776 checkDirectorySiteContactsListResponse(od); | |
| 9777 }); | |
| 9778 }); | |
| 9779 | |
| 9780 | |
| 9781 unittest.group("obj-schema-DirectorySiteSettings", () { | |
| 9782 unittest.test("to-json--from-json", () { | |
| 9783 var o = buildDirectorySiteSettings(); | |
| 9784 var od = new api.DirectorySiteSettings.fromJson(o.toJson()); | |
| 9785 checkDirectorySiteSettings(od); | |
| 9786 }); | |
| 9787 }); | |
| 9788 | |
| 9789 | |
| 9790 unittest.group("obj-schema-DirectorySitesListResponse", () { | |
| 9791 unittest.test("to-json--from-json", () { | |
| 9792 var o = buildDirectorySitesListResponse(); | |
| 9793 var od = new api.DirectorySitesListResponse.fromJson(o.toJson()); | |
| 9794 checkDirectorySitesListResponse(od); | |
| 9795 }); | |
| 9796 }); | |
| 9797 | |
| 9798 | |
| 9799 unittest.group("obj-schema-EventTag", () { | |
| 9800 unittest.test("to-json--from-json", () { | |
| 9801 var o = buildEventTag(); | |
| 9802 var od = new api.EventTag.fromJson(o.toJson()); | |
| 9803 checkEventTag(od); | |
| 9804 }); | |
| 9805 }); | |
| 9806 | |
| 9807 | |
| 9808 unittest.group("obj-schema-EventTagOverride", () { | |
| 9809 unittest.test("to-json--from-json", () { | |
| 9810 var o = buildEventTagOverride(); | |
| 9811 var od = new api.EventTagOverride.fromJson(o.toJson()); | |
| 9812 checkEventTagOverride(od); | |
| 9813 }); | |
| 9814 }); | |
| 9815 | |
| 9816 | |
| 9817 unittest.group("obj-schema-EventTagsListResponse", () { | |
| 9818 unittest.test("to-json--from-json", () { | |
| 9819 var o = buildEventTagsListResponse(); | |
| 9820 var od = new api.EventTagsListResponse.fromJson(o.toJson()); | |
| 9821 checkEventTagsListResponse(od); | |
| 9822 }); | |
| 9823 }); | |
| 9824 | |
| 9825 | |
| 9826 unittest.group("obj-schema-FileUrls", () { | |
| 9827 unittest.test("to-json--from-json", () { | |
| 9828 var o = buildFileUrls(); | |
| 9829 var od = new api.FileUrls.fromJson(o.toJson()); | |
| 9830 checkFileUrls(od); | |
| 9831 }); | |
| 9832 }); | |
| 9833 | |
| 9834 | |
| 9835 unittest.group("obj-schema-File", () { | |
| 9836 unittest.test("to-json--from-json", () { | |
| 9837 var o = buildFile(); | |
| 9838 var od = new api.File.fromJson(o.toJson()); | |
| 9839 checkFile(od); | |
| 9840 }); | |
| 9841 }); | |
| 9842 | |
| 9843 | |
| 9844 unittest.group("obj-schema-FileList", () { | |
| 9845 unittest.test("to-json--from-json", () { | |
| 9846 var o = buildFileList(); | |
| 9847 var od = new api.FileList.fromJson(o.toJson()); | |
| 9848 checkFileList(od); | |
| 9849 }); | |
| 9850 }); | |
| 9851 | |
| 9852 | |
| 9853 unittest.group("obj-schema-Flight", () { | |
| 9854 unittest.test("to-json--from-json", () { | |
| 9855 var o = buildFlight(); | |
| 9856 var od = new api.Flight.fromJson(o.toJson()); | |
| 9857 checkFlight(od); | |
| 9858 }); | |
| 9859 }); | |
| 9860 | |
| 9861 | |
| 9862 unittest.group("obj-schema-FloodlightActivitiesGenerateTagResponse", () { | |
| 9863 unittest.test("to-json--from-json", () { | |
| 9864 var o = buildFloodlightActivitiesGenerateTagResponse(); | |
| 9865 var od = new api.FloodlightActivitiesGenerateTagResponse.fromJson(o.toJson
()); | |
| 9866 checkFloodlightActivitiesGenerateTagResponse(od); | |
| 9867 }); | |
| 9868 }); | |
| 9869 | |
| 9870 | |
| 9871 unittest.group("obj-schema-FloodlightActivitiesListResponse", () { | |
| 9872 unittest.test("to-json--from-json", () { | |
| 9873 var o = buildFloodlightActivitiesListResponse(); | |
| 9874 var od = new api.FloodlightActivitiesListResponse.fromJson(o.toJson()); | |
| 9875 checkFloodlightActivitiesListResponse(od); | |
| 9876 }); | |
| 9877 }); | |
| 9878 | |
| 9879 | |
| 9880 unittest.group("obj-schema-FloodlightActivity", () { | |
| 9881 unittest.test("to-json--from-json", () { | |
| 9882 var o = buildFloodlightActivity(); | |
| 9883 var od = new api.FloodlightActivity.fromJson(o.toJson()); | |
| 9884 checkFloodlightActivity(od); | |
| 9885 }); | |
| 9886 }); | |
| 9887 | |
| 9888 | |
| 9889 unittest.group("obj-schema-FloodlightActivityDynamicTag", () { | |
| 9890 unittest.test("to-json--from-json", () { | |
| 9891 var o = buildFloodlightActivityDynamicTag(); | |
| 9892 var od = new api.FloodlightActivityDynamicTag.fromJson(o.toJson()); | |
| 9893 checkFloodlightActivityDynamicTag(od); | |
| 9894 }); | |
| 9895 }); | |
| 9896 | |
| 9897 | |
| 9898 unittest.group("obj-schema-FloodlightActivityGroup", () { | |
| 9899 unittest.test("to-json--from-json", () { | |
| 9900 var o = buildFloodlightActivityGroup(); | |
| 9901 var od = new api.FloodlightActivityGroup.fromJson(o.toJson()); | |
| 9902 checkFloodlightActivityGroup(od); | |
| 9903 }); | |
| 9904 }); | |
| 9905 | |
| 9906 | |
| 9907 unittest.group("obj-schema-FloodlightActivityGroupsListResponse", () { | |
| 9908 unittest.test("to-json--from-json", () { | |
| 9909 var o = buildFloodlightActivityGroupsListResponse(); | |
| 9910 var od = new api.FloodlightActivityGroupsListResponse.fromJson(o.toJson())
; | |
| 9911 checkFloodlightActivityGroupsListResponse(od); | |
| 9912 }); | |
| 9913 }); | |
| 9914 | |
| 9915 | |
| 9916 unittest.group("obj-schema-FloodlightActivityPublisherDynamicTag", () { | |
| 9917 unittest.test("to-json--from-json", () { | |
| 9918 var o = buildFloodlightActivityPublisherDynamicTag(); | |
| 9919 var od = new api.FloodlightActivityPublisherDynamicTag.fromJson(o.toJson()
); | |
| 9920 checkFloodlightActivityPublisherDynamicTag(od); | |
| 9921 }); | |
| 9922 }); | |
| 9923 | |
| 9924 | |
| 9925 unittest.group("obj-schema-FloodlightConfiguration", () { | |
| 9926 unittest.test("to-json--from-json", () { | |
| 9927 var o = buildFloodlightConfiguration(); | |
| 9928 var od = new api.FloodlightConfiguration.fromJson(o.toJson()); | |
| 9929 checkFloodlightConfiguration(od); | |
| 9930 }); | |
| 9931 }); | |
| 9932 | |
| 9933 | |
| 9934 unittest.group("obj-schema-FloodlightConfigurationsListResponse", () { | |
| 9935 unittest.test("to-json--from-json", () { | |
| 9936 var o = buildFloodlightConfigurationsListResponse(); | |
| 9937 var od = new api.FloodlightConfigurationsListResponse.fromJson(o.toJson())
; | |
| 9938 checkFloodlightConfigurationsListResponse(od); | |
| 9939 }); | |
| 9940 }); | |
| 9941 | |
| 9942 | |
| 9943 unittest.group("obj-schema-FloodlightReportCompatibleFields", () { | |
| 9944 unittest.test("to-json--from-json", () { | |
| 9945 var o = buildFloodlightReportCompatibleFields(); | |
| 9946 var od = new api.FloodlightReportCompatibleFields.fromJson(o.toJson()); | |
| 9947 checkFloodlightReportCompatibleFields(od); | |
| 9948 }); | |
| 9949 }); | |
| 9950 | |
| 9951 | |
| 9952 unittest.group("obj-schema-FrequencyCap", () { | |
| 9953 unittest.test("to-json--from-json", () { | |
| 9954 var o = buildFrequencyCap(); | |
| 9955 var od = new api.FrequencyCap.fromJson(o.toJson()); | |
| 9956 checkFrequencyCap(od); | |
| 9957 }); | |
| 9958 }); | |
| 9959 | |
| 9960 | |
| 9961 unittest.group("obj-schema-FsCommand", () { | |
| 9962 unittest.test("to-json--from-json", () { | |
| 9963 var o = buildFsCommand(); | |
| 9964 var od = new api.FsCommand.fromJson(o.toJson()); | |
| 9965 checkFsCommand(od); | |
| 9966 }); | |
| 9967 }); | |
| 9968 | |
| 9969 | |
| 9970 unittest.group("obj-schema-GeoTargeting", () { | |
| 9971 unittest.test("to-json--from-json", () { | |
| 9972 var o = buildGeoTargeting(); | |
| 9973 var od = new api.GeoTargeting.fromJson(o.toJson()); | |
| 9974 checkGeoTargeting(od); | |
| 9975 }); | |
| 9976 }); | |
| 9977 | |
| 9978 | |
| 9979 unittest.group("obj-schema-InventoryItem", () { | |
| 9980 unittest.test("to-json--from-json", () { | |
| 9981 var o = buildInventoryItem(); | |
| 9982 var od = new api.InventoryItem.fromJson(o.toJson()); | |
| 9983 checkInventoryItem(od); | |
| 9984 }); | |
| 9985 }); | |
| 9986 | |
| 9987 | |
| 9988 unittest.group("obj-schema-InventoryItemsListResponse", () { | |
| 9989 unittest.test("to-json--from-json", () { | |
| 9990 var o = buildInventoryItemsListResponse(); | |
| 9991 var od = new api.InventoryItemsListResponse.fromJson(o.toJson()); | |
| 9992 checkInventoryItemsListResponse(od); | |
| 9993 }); | |
| 9994 }); | |
| 9995 | |
| 9996 | |
| 9997 unittest.group("obj-schema-KeyValueTargetingExpression", () { | |
| 9998 unittest.test("to-json--from-json", () { | |
| 9999 var o = buildKeyValueTargetingExpression(); | |
| 10000 var od = new api.KeyValueTargetingExpression.fromJson(o.toJson()); | |
| 10001 checkKeyValueTargetingExpression(od); | |
| 10002 }); | |
| 10003 }); | |
| 10004 | |
| 10005 | |
| 10006 unittest.group("obj-schema-LandingPage", () { | |
| 10007 unittest.test("to-json--from-json", () { | |
| 10008 var o = buildLandingPage(); | |
| 10009 var od = new api.LandingPage.fromJson(o.toJson()); | |
| 10010 checkLandingPage(od); | |
| 10011 }); | |
| 10012 }); | |
| 10013 | |
| 10014 | |
| 10015 unittest.group("obj-schema-LandingPagesListResponse", () { | |
| 10016 unittest.test("to-json--from-json", () { | |
| 10017 var o = buildLandingPagesListResponse(); | |
| 10018 var od = new api.LandingPagesListResponse.fromJson(o.toJson()); | |
| 10019 checkLandingPagesListResponse(od); | |
| 10020 }); | |
| 10021 }); | |
| 10022 | |
| 10023 | |
| 10024 unittest.group("obj-schema-LastModifiedInfo", () { | |
| 10025 unittest.test("to-json--from-json", () { | |
| 10026 var o = buildLastModifiedInfo(); | |
| 10027 var od = new api.LastModifiedInfo.fromJson(o.toJson()); | |
| 10028 checkLastModifiedInfo(od); | |
| 10029 }); | |
| 10030 }); | |
| 10031 | |
| 10032 | |
| 10033 unittest.group("obj-schema-ListPopulationClause", () { | |
| 10034 unittest.test("to-json--from-json", () { | |
| 10035 var o = buildListPopulationClause(); | |
| 10036 var od = new api.ListPopulationClause.fromJson(o.toJson()); | |
| 10037 checkListPopulationClause(od); | |
| 10038 }); | |
| 10039 }); | |
| 10040 | |
| 10041 | |
| 10042 unittest.group("obj-schema-ListPopulationRule", () { | |
| 10043 unittest.test("to-json--from-json", () { | |
| 10044 var o = buildListPopulationRule(); | |
| 10045 var od = new api.ListPopulationRule.fromJson(o.toJson()); | |
| 10046 checkListPopulationRule(od); | |
| 10047 }); | |
| 10048 }); | |
| 10049 | |
| 10050 | |
| 10051 unittest.group("obj-schema-ListPopulationTerm", () { | |
| 10052 unittest.test("to-json--from-json", () { | |
| 10053 var o = buildListPopulationTerm(); | |
| 10054 var od = new api.ListPopulationTerm.fromJson(o.toJson()); | |
| 10055 checkListPopulationTerm(od); | |
| 10056 }); | |
| 10057 }); | |
| 10058 | |
| 10059 | |
| 10060 unittest.group("obj-schema-ListTargetingExpression", () { | |
| 10061 unittest.test("to-json--from-json", () { | |
| 10062 var o = buildListTargetingExpression(); | |
| 10063 var od = new api.ListTargetingExpression.fromJson(o.toJson()); | |
| 10064 checkListTargetingExpression(od); | |
| 10065 }); | |
| 10066 }); | |
| 10067 | |
| 10068 | |
| 10069 unittest.group("obj-schema-LookbackConfiguration", () { | |
| 10070 unittest.test("to-json--from-json", () { | |
| 10071 var o = buildLookbackConfiguration(); | |
| 10072 var od = new api.LookbackConfiguration.fromJson(o.toJson()); | |
| 10073 checkLookbackConfiguration(od); | |
| 10074 }); | |
| 10075 }); | |
| 10076 | |
| 10077 | |
| 10078 unittest.group("obj-schema-Metric", () { | |
| 10079 unittest.test("to-json--from-json", () { | |
| 10080 var o = buildMetric(); | |
| 10081 var od = new api.Metric.fromJson(o.toJson()); | |
| 10082 checkMetric(od); | |
| 10083 }); | |
| 10084 }); | |
| 10085 | |
| 10086 | |
| 10087 unittest.group("obj-schema-Metro", () { | |
| 10088 unittest.test("to-json--from-json", () { | |
| 10089 var o = buildMetro(); | |
| 10090 var od = new api.Metro.fromJson(o.toJson()); | |
| 10091 checkMetro(od); | |
| 10092 }); | |
| 10093 }); | |
| 10094 | |
| 10095 | |
| 10096 unittest.group("obj-schema-MetrosListResponse", () { | |
| 10097 unittest.test("to-json--from-json", () { | |
| 10098 var o = buildMetrosListResponse(); | |
| 10099 var od = new api.MetrosListResponse.fromJson(o.toJson()); | |
| 10100 checkMetrosListResponse(od); | |
| 10101 }); | |
| 10102 }); | |
| 10103 | |
| 10104 | |
| 10105 unittest.group("obj-schema-MobileCarrier", () { | |
| 10106 unittest.test("to-json--from-json", () { | |
| 10107 var o = buildMobileCarrier(); | |
| 10108 var od = new api.MobileCarrier.fromJson(o.toJson()); | |
| 10109 checkMobileCarrier(od); | |
| 10110 }); | |
| 10111 }); | |
| 10112 | |
| 10113 | |
| 10114 unittest.group("obj-schema-MobileCarriersListResponse", () { | |
| 10115 unittest.test("to-json--from-json", () { | |
| 10116 var o = buildMobileCarriersListResponse(); | |
| 10117 var od = new api.MobileCarriersListResponse.fromJson(o.toJson()); | |
| 10118 checkMobileCarriersListResponse(od); | |
| 10119 }); | |
| 10120 }); | |
| 10121 | |
| 10122 | |
| 10123 unittest.group("obj-schema-ObjectFilter", () { | |
| 10124 unittest.test("to-json--from-json", () { | |
| 10125 var o = buildObjectFilter(); | |
| 10126 var od = new api.ObjectFilter.fromJson(o.toJson()); | |
| 10127 checkObjectFilter(od); | |
| 10128 }); | |
| 10129 }); | |
| 10130 | |
| 10131 | |
| 10132 unittest.group("obj-schema-OffsetPosition", () { | |
| 10133 unittest.test("to-json--from-json", () { | |
| 10134 var o = buildOffsetPosition(); | |
| 10135 var od = new api.OffsetPosition.fromJson(o.toJson()); | |
| 10136 checkOffsetPosition(od); | |
| 10137 }); | |
| 10138 }); | |
| 10139 | |
| 10140 | |
| 10141 unittest.group("obj-schema-OmnitureSettings", () { | |
| 10142 unittest.test("to-json--from-json", () { | |
| 10143 var o = buildOmnitureSettings(); | |
| 10144 var od = new api.OmnitureSettings.fromJson(o.toJson()); | |
| 10145 checkOmnitureSettings(od); | |
| 10146 }); | |
| 10147 }); | |
| 10148 | |
| 10149 | |
| 10150 unittest.group("obj-schema-OperatingSystem", () { | |
| 10151 unittest.test("to-json--from-json", () { | |
| 10152 var o = buildOperatingSystem(); | |
| 10153 var od = new api.OperatingSystem.fromJson(o.toJson()); | |
| 10154 checkOperatingSystem(od); | |
| 10155 }); | |
| 10156 }); | |
| 10157 | |
| 10158 | |
| 10159 unittest.group("obj-schema-OperatingSystemVersion", () { | |
| 10160 unittest.test("to-json--from-json", () { | |
| 10161 var o = buildOperatingSystemVersion(); | |
| 10162 var od = new api.OperatingSystemVersion.fromJson(o.toJson()); | |
| 10163 checkOperatingSystemVersion(od); | |
| 10164 }); | |
| 10165 }); | |
| 10166 | |
| 10167 | |
| 10168 unittest.group("obj-schema-OperatingSystemVersionsListResponse", () { | |
| 10169 unittest.test("to-json--from-json", () { | |
| 10170 var o = buildOperatingSystemVersionsListResponse(); | |
| 10171 var od = new api.OperatingSystemVersionsListResponse.fromJson(o.toJson()); | |
| 10172 checkOperatingSystemVersionsListResponse(od); | |
| 10173 }); | |
| 10174 }); | |
| 10175 | |
| 10176 | |
| 10177 unittest.group("obj-schema-OperatingSystemsListResponse", () { | |
| 10178 unittest.test("to-json--from-json", () { | |
| 10179 var o = buildOperatingSystemsListResponse(); | |
| 10180 var od = new api.OperatingSystemsListResponse.fromJson(o.toJson()); | |
| 10181 checkOperatingSystemsListResponse(od); | |
| 10182 }); | |
| 10183 }); | |
| 10184 | |
| 10185 | |
| 10186 unittest.group("obj-schema-OptimizationActivity", () { | |
| 10187 unittest.test("to-json--from-json", () { | |
| 10188 var o = buildOptimizationActivity(); | |
| 10189 var od = new api.OptimizationActivity.fromJson(o.toJson()); | |
| 10190 checkOptimizationActivity(od); | |
| 10191 }); | |
| 10192 }); | |
| 10193 | |
| 10194 | |
| 10195 unittest.group("obj-schema-Order", () { | |
| 10196 unittest.test("to-json--from-json", () { | |
| 10197 var o = buildOrder(); | |
| 10198 var od = new api.Order.fromJson(o.toJson()); | |
| 10199 checkOrder(od); | |
| 10200 }); | |
| 10201 }); | |
| 10202 | |
| 10203 | |
| 10204 unittest.group("obj-schema-OrderContact", () { | |
| 10205 unittest.test("to-json--from-json", () { | |
| 10206 var o = buildOrderContact(); | |
| 10207 var od = new api.OrderContact.fromJson(o.toJson()); | |
| 10208 checkOrderContact(od); | |
| 10209 }); | |
| 10210 }); | |
| 10211 | |
| 10212 | |
| 10213 unittest.group("obj-schema-OrderDocument", () { | |
| 10214 unittest.test("to-json--from-json", () { | |
| 10215 var o = buildOrderDocument(); | |
| 10216 var od = new api.OrderDocument.fromJson(o.toJson()); | |
| 10217 checkOrderDocument(od); | |
| 10218 }); | |
| 10219 }); | |
| 10220 | |
| 10221 | |
| 10222 unittest.group("obj-schema-OrderDocumentsListResponse", () { | |
| 10223 unittest.test("to-json--from-json", () { | |
| 10224 var o = buildOrderDocumentsListResponse(); | |
| 10225 var od = new api.OrderDocumentsListResponse.fromJson(o.toJson()); | |
| 10226 checkOrderDocumentsListResponse(od); | |
| 10227 }); | |
| 10228 }); | |
| 10229 | |
| 10230 | |
| 10231 unittest.group("obj-schema-OrdersListResponse", () { | |
| 10232 unittest.test("to-json--from-json", () { | |
| 10233 var o = buildOrdersListResponse(); | |
| 10234 var od = new api.OrdersListResponse.fromJson(o.toJson()); | |
| 10235 checkOrdersListResponse(od); | |
| 10236 }); | |
| 10237 }); | |
| 10238 | |
| 10239 | |
| 10240 unittest.group("obj-schema-PathToConversionReportCompatibleFields", () { | |
| 10241 unittest.test("to-json--from-json", () { | |
| 10242 var o = buildPathToConversionReportCompatibleFields(); | |
| 10243 var od = new api.PathToConversionReportCompatibleFields.fromJson(o.toJson(
)); | |
| 10244 checkPathToConversionReportCompatibleFields(od); | |
| 10245 }); | |
| 10246 }); | |
| 10247 | |
| 10248 | |
| 10249 unittest.group("obj-schema-Placement", () { | |
| 10250 unittest.test("to-json--from-json", () { | |
| 10251 var o = buildPlacement(); | |
| 10252 var od = new api.Placement.fromJson(o.toJson()); | |
| 10253 checkPlacement(od); | |
| 10254 }); | |
| 10255 }); | |
| 10256 | |
| 10257 | |
| 10258 unittest.group("obj-schema-PlacementAssignment", () { | |
| 10259 unittest.test("to-json--from-json", () { | |
| 10260 var o = buildPlacementAssignment(); | |
| 10261 var od = new api.PlacementAssignment.fromJson(o.toJson()); | |
| 10262 checkPlacementAssignment(od); | |
| 10263 }); | |
| 10264 }); | |
| 10265 | |
| 10266 | |
| 10267 unittest.group("obj-schema-PlacementGroup", () { | |
| 10268 unittest.test("to-json--from-json", () { | |
| 10269 var o = buildPlacementGroup(); | |
| 10270 var od = new api.PlacementGroup.fromJson(o.toJson()); | |
| 10271 checkPlacementGroup(od); | |
| 10272 }); | |
| 10273 }); | |
| 10274 | |
| 10275 | |
| 10276 unittest.group("obj-schema-PlacementGroupsListResponse", () { | |
| 10277 unittest.test("to-json--from-json", () { | |
| 10278 var o = buildPlacementGroupsListResponse(); | |
| 10279 var od = new api.PlacementGroupsListResponse.fromJson(o.toJson()); | |
| 10280 checkPlacementGroupsListResponse(od); | |
| 10281 }); | |
| 10282 }); | |
| 10283 | |
| 10284 | |
| 10285 unittest.group("obj-schema-PlacementStrategiesListResponse", () { | |
| 10286 unittest.test("to-json--from-json", () { | |
| 10287 var o = buildPlacementStrategiesListResponse(); | |
| 10288 var od = new api.PlacementStrategiesListResponse.fromJson(o.toJson()); | |
| 10289 checkPlacementStrategiesListResponse(od); | |
| 10290 }); | |
| 10291 }); | |
| 10292 | |
| 10293 | |
| 10294 unittest.group("obj-schema-PlacementStrategy", () { | |
| 10295 unittest.test("to-json--from-json", () { | |
| 10296 var o = buildPlacementStrategy(); | |
| 10297 var od = new api.PlacementStrategy.fromJson(o.toJson()); | |
| 10298 checkPlacementStrategy(od); | |
| 10299 }); | |
| 10300 }); | |
| 10301 | |
| 10302 | |
| 10303 unittest.group("obj-schema-PlacementTag", () { | |
| 10304 unittest.test("to-json--from-json", () { | |
| 10305 var o = buildPlacementTag(); | |
| 10306 var od = new api.PlacementTag.fromJson(o.toJson()); | |
| 10307 checkPlacementTag(od); | |
| 10308 }); | |
| 10309 }); | |
| 10310 | |
| 10311 | |
| 10312 unittest.group("obj-schema-PlacementsGenerateTagsResponse", () { | |
| 10313 unittest.test("to-json--from-json", () { | |
| 10314 var o = buildPlacementsGenerateTagsResponse(); | |
| 10315 var od = new api.PlacementsGenerateTagsResponse.fromJson(o.toJson()); | |
| 10316 checkPlacementsGenerateTagsResponse(od); | |
| 10317 }); | |
| 10318 }); | |
| 10319 | |
| 10320 | |
| 10321 unittest.group("obj-schema-PlacementsListResponse", () { | |
| 10322 unittest.test("to-json--from-json", () { | |
| 10323 var o = buildPlacementsListResponse(); | |
| 10324 var od = new api.PlacementsListResponse.fromJson(o.toJson()); | |
| 10325 checkPlacementsListResponse(od); | |
| 10326 }); | |
| 10327 }); | |
| 10328 | |
| 10329 | |
| 10330 unittest.group("obj-schema-PlatformType", () { | |
| 10331 unittest.test("to-json--from-json", () { | |
| 10332 var o = buildPlatformType(); | |
| 10333 var od = new api.PlatformType.fromJson(o.toJson()); | |
| 10334 checkPlatformType(od); | |
| 10335 }); | |
| 10336 }); | |
| 10337 | |
| 10338 | |
| 10339 unittest.group("obj-schema-PlatformTypesListResponse", () { | |
| 10340 unittest.test("to-json--from-json", () { | |
| 10341 var o = buildPlatformTypesListResponse(); | |
| 10342 var od = new api.PlatformTypesListResponse.fromJson(o.toJson()); | |
| 10343 checkPlatformTypesListResponse(od); | |
| 10344 }); | |
| 10345 }); | |
| 10346 | |
| 10347 | |
| 10348 unittest.group("obj-schema-PopupWindowProperties", () { | |
| 10349 unittest.test("to-json--from-json", () { | |
| 10350 var o = buildPopupWindowProperties(); | |
| 10351 var od = new api.PopupWindowProperties.fromJson(o.toJson()); | |
| 10352 checkPopupWindowProperties(od); | |
| 10353 }); | |
| 10354 }); | |
| 10355 | |
| 10356 | |
| 10357 unittest.group("obj-schema-PostalCode", () { | |
| 10358 unittest.test("to-json--from-json", () { | |
| 10359 var o = buildPostalCode(); | |
| 10360 var od = new api.PostalCode.fromJson(o.toJson()); | |
| 10361 checkPostalCode(od); | |
| 10362 }); | |
| 10363 }); | |
| 10364 | |
| 10365 | |
| 10366 unittest.group("obj-schema-PostalCodesListResponse", () { | |
| 10367 unittest.test("to-json--from-json", () { | |
| 10368 var o = buildPostalCodesListResponse(); | |
| 10369 var od = new api.PostalCodesListResponse.fromJson(o.toJson()); | |
| 10370 checkPostalCodesListResponse(od); | |
| 10371 }); | |
| 10372 }); | |
| 10373 | |
| 10374 | |
| 10375 unittest.group("obj-schema-Pricing", () { | |
| 10376 unittest.test("to-json--from-json", () { | |
| 10377 var o = buildPricing(); | |
| 10378 var od = new api.Pricing.fromJson(o.toJson()); | |
| 10379 checkPricing(od); | |
| 10380 }); | |
| 10381 }); | |
| 10382 | |
| 10383 | |
| 10384 unittest.group("obj-schema-PricingSchedule", () { | |
| 10385 unittest.test("to-json--from-json", () { | |
| 10386 var o = buildPricingSchedule(); | |
| 10387 var od = new api.PricingSchedule.fromJson(o.toJson()); | |
| 10388 checkPricingSchedule(od); | |
| 10389 }); | |
| 10390 }); | |
| 10391 | |
| 10392 | |
| 10393 unittest.group("obj-schema-PricingSchedulePricingPeriod", () { | |
| 10394 unittest.test("to-json--from-json", () { | |
| 10395 var o = buildPricingSchedulePricingPeriod(); | |
| 10396 var od = new api.PricingSchedulePricingPeriod.fromJson(o.toJson()); | |
| 10397 checkPricingSchedulePricingPeriod(od); | |
| 10398 }); | |
| 10399 }); | |
| 10400 | |
| 10401 | |
| 10402 unittest.group("obj-schema-Project", () { | |
| 10403 unittest.test("to-json--from-json", () { | |
| 10404 var o = buildProject(); | |
| 10405 var od = new api.Project.fromJson(o.toJson()); | |
| 10406 checkProject(od); | |
| 10407 }); | |
| 10408 }); | |
| 10409 | |
| 10410 | |
| 10411 unittest.group("obj-schema-ProjectsListResponse", () { | |
| 10412 unittest.test("to-json--from-json", () { | |
| 10413 var o = buildProjectsListResponse(); | |
| 10414 var od = new api.ProjectsListResponse.fromJson(o.toJson()); | |
| 10415 checkProjectsListResponse(od); | |
| 10416 }); | |
| 10417 }); | |
| 10418 | |
| 10419 | |
| 10420 unittest.group("obj-schema-ReachReportCompatibleFields", () { | |
| 10421 unittest.test("to-json--from-json", () { | |
| 10422 var o = buildReachReportCompatibleFields(); | |
| 10423 var od = new api.ReachReportCompatibleFields.fromJson(o.toJson()); | |
| 10424 checkReachReportCompatibleFields(od); | |
| 10425 }); | |
| 10426 }); | |
| 10427 | |
| 10428 | |
| 10429 unittest.group("obj-schema-Recipient", () { | |
| 10430 unittest.test("to-json--from-json", () { | |
| 10431 var o = buildRecipient(); | |
| 10432 var od = new api.Recipient.fromJson(o.toJson()); | |
| 10433 checkRecipient(od); | |
| 10434 }); | |
| 10435 }); | |
| 10436 | |
| 10437 | |
| 10438 unittest.group("obj-schema-Region", () { | |
| 10439 unittest.test("to-json--from-json", () { | |
| 10440 var o = buildRegion(); | |
| 10441 var od = new api.Region.fromJson(o.toJson()); | |
| 10442 checkRegion(od); | |
| 10443 }); | |
| 10444 }); | |
| 10445 | |
| 10446 | |
| 10447 unittest.group("obj-schema-RegionsListResponse", () { | |
| 10448 unittest.test("to-json--from-json", () { | |
| 10449 var o = buildRegionsListResponse(); | |
| 10450 var od = new api.RegionsListResponse.fromJson(o.toJson()); | |
| 10451 checkRegionsListResponse(od); | |
| 10452 }); | |
| 10453 }); | |
| 10454 | |
| 10455 | |
| 10456 unittest.group("obj-schema-RemarketingList", () { | |
| 10457 unittest.test("to-json--from-json", () { | |
| 10458 var o = buildRemarketingList(); | |
| 10459 var od = new api.RemarketingList.fromJson(o.toJson()); | |
| 10460 checkRemarketingList(od); | |
| 10461 }); | |
| 10462 }); | |
| 10463 | |
| 10464 | |
| 10465 unittest.group("obj-schema-RemarketingListShare", () { | |
| 10466 unittest.test("to-json--from-json", () { | |
| 10467 var o = buildRemarketingListShare(); | |
| 10468 var od = new api.RemarketingListShare.fromJson(o.toJson()); | |
| 10469 checkRemarketingListShare(od); | |
| 10470 }); | |
| 10471 }); | |
| 10472 | |
| 10473 | |
| 10474 unittest.group("obj-schema-RemarketingListsListResponse", () { | |
| 10475 unittest.test("to-json--from-json", () { | |
| 10476 var o = buildRemarketingListsListResponse(); | |
| 10477 var od = new api.RemarketingListsListResponse.fromJson(o.toJson()); | |
| 10478 checkRemarketingListsListResponse(od); | |
| 10479 }); | |
| 10480 }); | |
| 10481 | |
| 10482 | |
| 10483 unittest.group("obj-schema-ReportCriteria", () { | |
| 10484 unittest.test("to-json--from-json", () { | |
| 10485 var o = buildReportCriteria(); | |
| 10486 var od = new api.ReportCriteria.fromJson(o.toJson()); | |
| 10487 checkReportCriteria(od); | |
| 10488 }); | |
| 10489 }); | |
| 10490 | |
| 10491 | |
| 10492 unittest.group("obj-schema-ReportCrossDimensionReachCriteria", () { | |
| 10493 unittest.test("to-json--from-json", () { | |
| 10494 var o = buildReportCrossDimensionReachCriteria(); | |
| 10495 var od = new api.ReportCrossDimensionReachCriteria.fromJson(o.toJson()); | |
| 10496 checkReportCrossDimensionReachCriteria(od); | |
| 10497 }); | |
| 10498 }); | |
| 10499 | |
| 10500 | |
| 10501 unittest.group("obj-schema-ReportDelivery", () { | |
| 10502 unittest.test("to-json--from-json", () { | |
| 10503 var o = buildReportDelivery(); | |
| 10504 var od = new api.ReportDelivery.fromJson(o.toJson()); | |
| 10505 checkReportDelivery(od); | |
| 10506 }); | |
| 10507 }); | |
| 10508 | |
| 10509 | |
| 10510 unittest.group("obj-schema-ReportFloodlightCriteriaReportProperties", () { | |
| 10511 unittest.test("to-json--from-json", () { | |
| 10512 var o = buildReportFloodlightCriteriaReportProperties(); | |
| 10513 var od = new api.ReportFloodlightCriteriaReportProperties.fromJson(o.toJso
n()); | |
| 10514 checkReportFloodlightCriteriaReportProperties(od); | |
| 10515 }); | |
| 10516 }); | |
| 10517 | |
| 10518 | |
| 10519 unittest.group("obj-schema-ReportFloodlightCriteria", () { | |
| 10520 unittest.test("to-json--from-json", () { | |
| 10521 var o = buildReportFloodlightCriteria(); | |
| 10522 var od = new api.ReportFloodlightCriteria.fromJson(o.toJson()); | |
| 10523 checkReportFloodlightCriteria(od); | |
| 10524 }); | |
| 10525 }); | |
| 10526 | |
| 10527 | |
| 10528 unittest.group("obj-schema-ReportPathToConversionCriteriaReportProperties", ()
{ | |
| 10529 unittest.test("to-json--from-json", () { | |
| 10530 var o = buildReportPathToConversionCriteriaReportProperties(); | |
| 10531 var od = new api.ReportPathToConversionCriteriaReportProperties.fromJson(o
.toJson()); | |
| 10532 checkReportPathToConversionCriteriaReportProperties(od); | |
| 10533 }); | |
| 10534 }); | |
| 10535 | |
| 10536 | |
| 10537 unittest.group("obj-schema-ReportPathToConversionCriteria", () { | |
| 10538 unittest.test("to-json--from-json", () { | |
| 10539 var o = buildReportPathToConversionCriteria(); | |
| 10540 var od = new api.ReportPathToConversionCriteria.fromJson(o.toJson()); | |
| 10541 checkReportPathToConversionCriteria(od); | |
| 10542 }); | |
| 10543 }); | |
| 10544 | |
| 10545 | |
| 10546 unittest.group("obj-schema-ReportReachCriteria", () { | |
| 10547 unittest.test("to-json--from-json", () { | |
| 10548 var o = buildReportReachCriteria(); | |
| 10549 var od = new api.ReportReachCriteria.fromJson(o.toJson()); | |
| 10550 checkReportReachCriteria(od); | |
| 10551 }); | |
| 10552 }); | |
| 10553 | |
| 10554 | |
| 10555 unittest.group("obj-schema-ReportSchedule", () { | |
| 10556 unittest.test("to-json--from-json", () { | |
| 10557 var o = buildReportSchedule(); | |
| 10558 var od = new api.ReportSchedule.fromJson(o.toJson()); | |
| 10559 checkReportSchedule(od); | |
| 10560 }); | |
| 10561 }); | |
| 10562 | |
| 10563 | |
| 10564 unittest.group("obj-schema-Report", () { | |
| 10565 unittest.test("to-json--from-json", () { | |
| 10566 var o = buildReport(); | |
| 10567 var od = new api.Report.fromJson(o.toJson()); | |
| 10568 checkReport(od); | |
| 10569 }); | |
| 10570 }); | |
| 10571 | |
| 10572 | |
| 10573 unittest.group("obj-schema-ReportCompatibleFields", () { | |
| 10574 unittest.test("to-json--from-json", () { | |
| 10575 var o = buildReportCompatibleFields(); | |
| 10576 var od = new api.ReportCompatibleFields.fromJson(o.toJson()); | |
| 10577 checkReportCompatibleFields(od); | |
| 10578 }); | |
| 10579 }); | |
| 10580 | |
| 10581 | |
| 10582 unittest.group("obj-schema-ReportList", () { | |
| 10583 unittest.test("to-json--from-json", () { | |
| 10584 var o = buildReportList(); | |
| 10585 var od = new api.ReportList.fromJson(o.toJson()); | |
| 10586 checkReportList(od); | |
| 10587 }); | |
| 10588 }); | |
| 10589 | |
| 10590 | |
| 10591 unittest.group("obj-schema-ReportsConfiguration", () { | |
| 10592 unittest.test("to-json--from-json", () { | |
| 10593 var o = buildReportsConfiguration(); | |
| 10594 var od = new api.ReportsConfiguration.fromJson(o.toJson()); | |
| 10595 checkReportsConfiguration(od); | |
| 10596 }); | |
| 10597 }); | |
| 10598 | |
| 10599 | |
| 10600 unittest.group("obj-schema-RichMediaExitOverride", () { | |
| 10601 unittest.test("to-json--from-json", () { | |
| 10602 var o = buildRichMediaExitOverride(); | |
| 10603 var od = new api.RichMediaExitOverride.fromJson(o.toJson()); | |
| 10604 checkRichMediaExitOverride(od); | |
| 10605 }); | |
| 10606 }); | |
| 10607 | |
| 10608 | |
| 10609 unittest.group("obj-schema-Site", () { | |
| 10610 unittest.test("to-json--from-json", () { | |
| 10611 var o = buildSite(); | |
| 10612 var od = new api.Site.fromJson(o.toJson()); | |
| 10613 checkSite(od); | |
| 10614 }); | |
| 10615 }); | |
| 10616 | |
| 10617 | |
| 10618 unittest.group("obj-schema-SiteContact", () { | |
| 10619 unittest.test("to-json--from-json", () { | |
| 10620 var o = buildSiteContact(); | |
| 10621 var od = new api.SiteContact.fromJson(o.toJson()); | |
| 10622 checkSiteContact(od); | |
| 10623 }); | |
| 10624 }); | |
| 10625 | |
| 10626 | |
| 10627 unittest.group("obj-schema-SiteSettings", () { | |
| 10628 unittest.test("to-json--from-json", () { | |
| 10629 var o = buildSiteSettings(); | |
| 10630 var od = new api.SiteSettings.fromJson(o.toJson()); | |
| 10631 checkSiteSettings(od); | |
| 10632 }); | |
| 10633 }); | |
| 10634 | |
| 10635 | |
| 10636 unittest.group("obj-schema-SitesListResponse", () { | |
| 10637 unittest.test("to-json--from-json", () { | |
| 10638 var o = buildSitesListResponse(); | |
| 10639 var od = new api.SitesListResponse.fromJson(o.toJson()); | |
| 10640 checkSitesListResponse(od); | |
| 10641 }); | |
| 10642 }); | |
| 10643 | |
| 10644 | |
| 10645 unittest.group("obj-schema-Size", () { | |
| 10646 unittest.test("to-json--from-json", () { | |
| 10647 var o = buildSize(); | |
| 10648 var od = new api.Size.fromJson(o.toJson()); | |
| 10649 checkSize(od); | |
| 10650 }); | |
| 10651 }); | |
| 10652 | |
| 10653 | |
| 10654 unittest.group("obj-schema-SizesListResponse", () { | |
| 10655 unittest.test("to-json--from-json", () { | |
| 10656 var o = buildSizesListResponse(); | |
| 10657 var od = new api.SizesListResponse.fromJson(o.toJson()); | |
| 10658 checkSizesListResponse(od); | |
| 10659 }); | |
| 10660 }); | |
| 10661 | |
| 10662 | |
| 10663 unittest.group("obj-schema-SortedDimension", () { | |
| 10664 unittest.test("to-json--from-json", () { | |
| 10665 var o = buildSortedDimension(); | |
| 10666 var od = new api.SortedDimension.fromJson(o.toJson()); | |
| 10667 checkSortedDimension(od); | |
| 10668 }); | |
| 10669 }); | |
| 10670 | |
| 10671 | |
| 10672 unittest.group("obj-schema-Subaccount", () { | |
| 10673 unittest.test("to-json--from-json", () { | |
| 10674 var o = buildSubaccount(); | |
| 10675 var od = new api.Subaccount.fromJson(o.toJson()); | |
| 10676 checkSubaccount(od); | |
| 10677 }); | |
| 10678 }); | |
| 10679 | |
| 10680 | |
| 10681 unittest.group("obj-schema-SubaccountsListResponse", () { | |
| 10682 unittest.test("to-json--from-json", () { | |
| 10683 var o = buildSubaccountsListResponse(); | |
| 10684 var od = new api.SubaccountsListResponse.fromJson(o.toJson()); | |
| 10685 checkSubaccountsListResponse(od); | |
| 10686 }); | |
| 10687 }); | |
| 10688 | |
| 10689 | |
| 10690 unittest.group("obj-schema-TagData", () { | |
| 10691 unittest.test("to-json--from-json", () { | |
| 10692 var o = buildTagData(); | |
| 10693 var od = new api.TagData.fromJson(o.toJson()); | |
| 10694 checkTagData(od); | |
| 10695 }); | |
| 10696 }); | |
| 10697 | |
| 10698 | |
| 10699 unittest.group("obj-schema-TagSetting", () { | |
| 10700 unittest.test("to-json--from-json", () { | |
| 10701 var o = buildTagSetting(); | |
| 10702 var od = new api.TagSetting.fromJson(o.toJson()); | |
| 10703 checkTagSetting(od); | |
| 10704 }); | |
| 10705 }); | |
| 10706 | |
| 10707 | |
| 10708 unittest.group("obj-schema-TagSettings", () { | |
| 10709 unittest.test("to-json--from-json", () { | |
| 10710 var o = buildTagSettings(); | |
| 10711 var od = new api.TagSettings.fromJson(o.toJson()); | |
| 10712 checkTagSettings(od); | |
| 10713 }); | |
| 10714 }); | |
| 10715 | |
| 10716 | |
| 10717 unittest.group("obj-schema-TargetWindow", () { | |
| 10718 unittest.test("to-json--from-json", () { | |
| 10719 var o = buildTargetWindow(); | |
| 10720 var od = new api.TargetWindow.fromJson(o.toJson()); | |
| 10721 checkTargetWindow(od); | |
| 10722 }); | |
| 10723 }); | |
| 10724 | |
| 10725 | |
| 10726 unittest.group("obj-schema-TargetableRemarketingList", () { | |
| 10727 unittest.test("to-json--from-json", () { | |
| 10728 var o = buildTargetableRemarketingList(); | |
| 10729 var od = new api.TargetableRemarketingList.fromJson(o.toJson()); | |
| 10730 checkTargetableRemarketingList(od); | |
| 10731 }); | |
| 10732 }); | |
| 10733 | |
| 10734 | |
| 10735 unittest.group("obj-schema-TargetableRemarketingListsListResponse", () { | |
| 10736 unittest.test("to-json--from-json", () { | |
| 10737 var o = buildTargetableRemarketingListsListResponse(); | |
| 10738 var od = new api.TargetableRemarketingListsListResponse.fromJson(o.toJson(
)); | |
| 10739 checkTargetableRemarketingListsListResponse(od); | |
| 10740 }); | |
| 10741 }); | |
| 10742 | |
| 10743 | |
| 10744 unittest.group("obj-schema-TechnologyTargeting", () { | |
| 10745 unittest.test("to-json--from-json", () { | |
| 10746 var o = buildTechnologyTargeting(); | |
| 10747 var od = new api.TechnologyTargeting.fromJson(o.toJson()); | |
| 10748 checkTechnologyTargeting(od); | |
| 10749 }); | |
| 10750 }); | |
| 10751 | |
| 10752 | |
| 10753 unittest.group("obj-schema-ThirdPartyAuthenticationToken", () { | |
| 10754 unittest.test("to-json--from-json", () { | |
| 10755 var o = buildThirdPartyAuthenticationToken(); | |
| 10756 var od = new api.ThirdPartyAuthenticationToken.fromJson(o.toJson()); | |
| 10757 checkThirdPartyAuthenticationToken(od); | |
| 10758 }); | |
| 10759 }); | |
| 10760 | |
| 10761 | |
| 10762 unittest.group("obj-schema-ThirdPartyTrackingUrl", () { | |
| 10763 unittest.test("to-json--from-json", () { | |
| 10764 var o = buildThirdPartyTrackingUrl(); | |
| 10765 var od = new api.ThirdPartyTrackingUrl.fromJson(o.toJson()); | |
| 10766 checkThirdPartyTrackingUrl(od); | |
| 10767 }); | |
| 10768 }); | |
| 10769 | |
| 10770 | |
| 10771 unittest.group("obj-schema-UserDefinedVariableConfiguration", () { | |
| 10772 unittest.test("to-json--from-json", () { | |
| 10773 var o = buildUserDefinedVariableConfiguration(); | |
| 10774 var od = new api.UserDefinedVariableConfiguration.fromJson(o.toJson()); | |
| 10775 checkUserDefinedVariableConfiguration(od); | |
| 10776 }); | |
| 10777 }); | |
| 10778 | |
| 10779 | |
| 10780 unittest.group("obj-schema-UserProfile", () { | |
| 10781 unittest.test("to-json--from-json", () { | |
| 10782 var o = buildUserProfile(); | |
| 10783 var od = new api.UserProfile.fromJson(o.toJson()); | |
| 10784 checkUserProfile(od); | |
| 10785 }); | |
| 10786 }); | |
| 10787 | |
| 10788 | |
| 10789 unittest.group("obj-schema-UserProfileList", () { | |
| 10790 unittest.test("to-json--from-json", () { | |
| 10791 var o = buildUserProfileList(); | |
| 10792 var od = new api.UserProfileList.fromJson(o.toJson()); | |
| 10793 checkUserProfileList(od); | |
| 10794 }); | |
| 10795 }); | |
| 10796 | |
| 10797 | |
| 10798 unittest.group("obj-schema-UserRole", () { | |
| 10799 unittest.test("to-json--from-json", () { | |
| 10800 var o = buildUserRole(); | |
| 10801 var od = new api.UserRole.fromJson(o.toJson()); | |
| 10802 checkUserRole(od); | |
| 10803 }); | |
| 10804 }); | |
| 10805 | |
| 10806 | |
| 10807 unittest.group("obj-schema-UserRolePermission", () { | |
| 10808 unittest.test("to-json--from-json", () { | |
| 10809 var o = buildUserRolePermission(); | |
| 10810 var od = new api.UserRolePermission.fromJson(o.toJson()); | |
| 10811 checkUserRolePermission(od); | |
| 10812 }); | |
| 10813 }); | |
| 10814 | |
| 10815 | |
| 10816 unittest.group("obj-schema-UserRolePermissionGroup", () { | |
| 10817 unittest.test("to-json--from-json", () { | |
| 10818 var o = buildUserRolePermissionGroup(); | |
| 10819 var od = new api.UserRolePermissionGroup.fromJson(o.toJson()); | |
| 10820 checkUserRolePermissionGroup(od); | |
| 10821 }); | |
| 10822 }); | |
| 10823 | |
| 10824 | |
| 10825 unittest.group("obj-schema-UserRolePermissionGroupsListResponse", () { | |
| 10826 unittest.test("to-json--from-json", () { | |
| 10827 var o = buildUserRolePermissionGroupsListResponse(); | |
| 10828 var od = new api.UserRolePermissionGroupsListResponse.fromJson(o.toJson())
; | |
| 10829 checkUserRolePermissionGroupsListResponse(od); | |
| 10830 }); | |
| 10831 }); | |
| 10832 | |
| 10833 | |
| 10834 unittest.group("obj-schema-UserRolePermissionsListResponse", () { | |
| 10835 unittest.test("to-json--from-json", () { | |
| 10836 var o = buildUserRolePermissionsListResponse(); | |
| 10837 var od = new api.UserRolePermissionsListResponse.fromJson(o.toJson()); | |
| 10838 checkUserRolePermissionsListResponse(od); | |
| 10839 }); | |
| 10840 }); | |
| 10841 | |
| 10842 | |
| 10843 unittest.group("obj-schema-UserRolesListResponse", () { | |
| 10844 unittest.test("to-json--from-json", () { | |
| 10845 var o = buildUserRolesListResponse(); | |
| 10846 var od = new api.UserRolesListResponse.fromJson(o.toJson()); | |
| 10847 checkUserRolesListResponse(od); | |
| 10848 }); | |
| 10849 }); | |
| 10850 | |
| 10851 | |
| 10852 unittest.group("resource-AccountActiveAdSummariesResourceApi", () { | |
| 10853 unittest.test("method--get", () { | |
| 10854 | |
| 10855 var mock = new HttpServerMock(); | |
| 10856 api.AccountActiveAdSummariesResourceApi res = new api.DfareportingApi(mock
).accountActiveAdSummaries; | |
| 10857 var arg_profileId = "foo"; | |
| 10858 var arg_summaryAccountId = "foo"; | |
| 10859 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10860 var path = (req.url).path; | |
| 10861 var pathOffset = 0; | |
| 10862 var index; | |
| 10863 var subPart; | |
| 10864 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10865 pathOffset += 1; | |
| 10866 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 10867 pathOffset += 18; | |
| 10868 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10869 pathOffset += 13; | |
| 10870 index = path.indexOf("/accountActiveAdSummaries/", pathOffset); | |
| 10871 unittest.expect(index >= 0, unittest.isTrue); | |
| 10872 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10873 pathOffset = index; | |
| 10874 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10875 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/accountActiveAdSummaries/")); | |
| 10876 pathOffset += 26; | |
| 10877 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10878 pathOffset = path.length; | |
| 10879 unittest.expect(subPart, unittest.equals("$arg_summaryAccountId")); | |
| 10880 | |
| 10881 var query = (req.url).query; | |
| 10882 var queryOffset = 0; | |
| 10883 var queryMap = {}; | |
| 10884 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10885 parseBool(n) { | |
| 10886 if (n == "true") return true; | |
| 10887 if (n == "false") return false; | |
| 10888 if (n == null) return null; | |
| 10889 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10890 } | |
| 10891 if (query.length > 0) { | |
| 10892 for (var part in query.split("&")) { | |
| 10893 var keyvalue = part.split("="); | |
| 10894 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10895 } | |
| 10896 } | |
| 10897 | |
| 10898 | |
| 10899 var h = { | |
| 10900 "content-type" : "application/json; charset=utf-8", | |
| 10901 }; | |
| 10902 var resp = convert.JSON.encode(buildAccountActiveAdSummary()); | |
| 10903 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10904 }), true); | |
| 10905 res.get(arg_profileId, arg_summaryAccountId).then(unittest.expectAsync(((a
pi.AccountActiveAdSummary response) { | |
| 10906 checkAccountActiveAdSummary(response); | |
| 10907 }))); | |
| 10908 }); | |
| 10909 | |
| 10910 }); | |
| 10911 | |
| 10912 | |
| 10913 unittest.group("resource-AccountPermissionGroupsResourceApi", () { | |
| 10914 unittest.test("method--get", () { | |
| 10915 | |
| 10916 var mock = new HttpServerMock(); | |
| 10917 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10918 var arg_profileId = "foo"; | |
| 10919 var arg_id = "foo"; | |
| 10920 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10921 var path = (req.url).path; | |
| 10922 var pathOffset = 0; | |
| 10923 var index; | |
| 10924 var subPart; | |
| 10925 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10926 pathOffset += 1; | |
| 10927 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 10928 pathOffset += 18; | |
| 10929 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10930 pathOffset += 13; | |
| 10931 index = path.indexOf("/accountPermissionGroups/", pathOffset); | |
| 10932 unittest.expect(index >= 0, unittest.isTrue); | |
| 10933 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10934 pathOffset = index; | |
| 10935 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10936 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/accountPermissionGroups/")); | |
| 10937 pathOffset += 25; | |
| 10938 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10939 pathOffset = path.length; | |
| 10940 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 10941 | |
| 10942 var query = (req.url).query; | |
| 10943 var queryOffset = 0; | |
| 10944 var queryMap = {}; | |
| 10945 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10946 parseBool(n) { | |
| 10947 if (n == "true") return true; | |
| 10948 if (n == "false") return false; | |
| 10949 if (n == null) return null; | |
| 10950 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10951 } | |
| 10952 if (query.length > 0) { | |
| 10953 for (var part in query.split("&")) { | |
| 10954 var keyvalue = part.split("="); | |
| 10955 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10956 } | |
| 10957 } | |
| 10958 | |
| 10959 | |
| 10960 var h = { | |
| 10961 "content-type" : "application/json; charset=utf-8", | |
| 10962 }; | |
| 10963 var resp = convert.JSON.encode(buildAccountPermissionGroup()); | |
| 10964 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10965 }), true); | |
| 10966 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
issionGroup response) { | |
| 10967 checkAccountPermissionGroup(response); | |
| 10968 }))); | |
| 10969 }); | |
| 10970 | |
| 10971 unittest.test("method--list", () { | |
| 10972 | |
| 10973 var mock = new HttpServerMock(); | |
| 10974 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10975 var arg_profileId = "foo"; | |
| 10976 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10977 var path = (req.url).path; | |
| 10978 var pathOffset = 0; | |
| 10979 var index; | |
| 10980 var subPart; | |
| 10981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10982 pathOffset += 1; | |
| 10983 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 10984 pathOffset += 18; | |
| 10985 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10986 pathOffset += 13; | |
| 10987 index = path.indexOf("/accountPermissionGroups", pathOffset); | |
| 10988 unittest.expect(index >= 0, unittest.isTrue); | |
| 10989 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10990 pathOffset = index; | |
| 10991 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10992 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/accountPermissionGroups")); | |
| 10993 pathOffset += 24; | |
| 10994 | |
| 10995 var query = (req.url).query; | |
| 10996 var queryOffset = 0; | |
| 10997 var queryMap = {}; | |
| 10998 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10999 parseBool(n) { | |
| 11000 if (n == "true") return true; | |
| 11001 if (n == "false") return false; | |
| 11002 if (n == null) return null; | |
| 11003 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11004 } | |
| 11005 if (query.length > 0) { | |
| 11006 for (var part in query.split("&")) { | |
| 11007 var keyvalue = part.split("="); | |
| 11008 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11009 } | |
| 11010 } | |
| 11011 | |
| 11012 | |
| 11013 var h = { | |
| 11014 "content-type" : "application/json; charset=utf-8", | |
| 11015 }; | |
| 11016 var resp = convert.JSON.encode(buildAccountPermissionGroupsListResponse(
)); | |
| 11017 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11018 }), true); | |
| 11019 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissionG
roupsListResponse response) { | |
| 11020 checkAccountPermissionGroupsListResponse(response); | |
| 11021 }))); | |
| 11022 }); | |
| 11023 | |
| 11024 }); | |
| 11025 | |
| 11026 | |
| 11027 unittest.group("resource-AccountPermissionsResourceApi", () { | |
| 11028 unittest.test("method--get", () { | |
| 11029 | |
| 11030 var mock = new HttpServerMock(); | |
| 11031 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11032 var arg_profileId = "foo"; | |
| 11033 var arg_id = "foo"; | |
| 11034 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11035 var path = (req.url).path; | |
| 11036 var pathOffset = 0; | |
| 11037 var index; | |
| 11038 var subPart; | |
| 11039 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11040 pathOffset += 1; | |
| 11041 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11042 pathOffset += 18; | |
| 11043 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11044 pathOffset += 13; | |
| 11045 index = path.indexOf("/accountPermissions/", pathOffset); | |
| 11046 unittest.expect(index >= 0, unittest.isTrue); | |
| 11047 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11048 pathOffset = index; | |
| 11049 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11050 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountPermissions/")); | |
| 11051 pathOffset += 20; | |
| 11052 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11053 pathOffset = path.length; | |
| 11054 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11055 | |
| 11056 var query = (req.url).query; | |
| 11057 var queryOffset = 0; | |
| 11058 var queryMap = {}; | |
| 11059 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11060 parseBool(n) { | |
| 11061 if (n == "true") return true; | |
| 11062 if (n == "false") return false; | |
| 11063 if (n == null) return null; | |
| 11064 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11065 } | |
| 11066 if (query.length > 0) { | |
| 11067 for (var part in query.split("&")) { | |
| 11068 var keyvalue = part.split("="); | |
| 11069 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11070 } | |
| 11071 } | |
| 11072 | |
| 11073 | |
| 11074 var h = { | |
| 11075 "content-type" : "application/json; charset=utf-8", | |
| 11076 }; | |
| 11077 var resp = convert.JSON.encode(buildAccountPermission()); | |
| 11078 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11079 }), true); | |
| 11080 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
ission response) { | |
| 11081 checkAccountPermission(response); | |
| 11082 }))); | |
| 11083 }); | |
| 11084 | |
| 11085 unittest.test("method--list", () { | |
| 11086 | |
| 11087 var mock = new HttpServerMock(); | |
| 11088 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11089 var arg_profileId = "foo"; | |
| 11090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11091 var path = (req.url).path; | |
| 11092 var pathOffset = 0; | |
| 11093 var index; | |
| 11094 var subPart; | |
| 11095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11096 pathOffset += 1; | |
| 11097 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11098 pathOffset += 18; | |
| 11099 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11100 pathOffset += 13; | |
| 11101 index = path.indexOf("/accountPermissions", pathOffset); | |
| 11102 unittest.expect(index >= 0, unittest.isTrue); | |
| 11103 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11104 pathOffset = index; | |
| 11105 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11106 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/accountPermissions")); | |
| 11107 pathOffset += 19; | |
| 11108 | |
| 11109 var query = (req.url).query; | |
| 11110 var queryOffset = 0; | |
| 11111 var queryMap = {}; | |
| 11112 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11113 parseBool(n) { | |
| 11114 if (n == "true") return true; | |
| 11115 if (n == "false") return false; | |
| 11116 if (n == null) return null; | |
| 11117 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11118 } | |
| 11119 if (query.length > 0) { | |
| 11120 for (var part in query.split("&")) { | |
| 11121 var keyvalue = part.split("="); | |
| 11122 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11123 } | |
| 11124 } | |
| 11125 | |
| 11126 | |
| 11127 var h = { | |
| 11128 "content-type" : "application/json; charset=utf-8", | |
| 11129 }; | |
| 11130 var resp = convert.JSON.encode(buildAccountPermissionsListResponse()); | |
| 11131 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11132 }), true); | |
| 11133 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissions
ListResponse response) { | |
| 11134 checkAccountPermissionsListResponse(response); | |
| 11135 }))); | |
| 11136 }); | |
| 11137 | |
| 11138 }); | |
| 11139 | |
| 11140 | |
| 11141 unittest.group("resource-AccountUserProfilesResourceApi", () { | |
| 11142 unittest.test("method--get", () { | |
| 11143 | |
| 11144 var mock = new HttpServerMock(); | |
| 11145 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11146 var arg_profileId = "foo"; | |
| 11147 var arg_id = "foo"; | |
| 11148 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11149 var path = (req.url).path; | |
| 11150 var pathOffset = 0; | |
| 11151 var index; | |
| 11152 var subPart; | |
| 11153 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11154 pathOffset += 1; | |
| 11155 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11156 pathOffset += 18; | |
| 11157 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11158 pathOffset += 13; | |
| 11159 index = path.indexOf("/accountUserProfiles/", pathOffset); | |
| 11160 unittest.expect(index >= 0, unittest.isTrue); | |
| 11161 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11162 pathOffset = index; | |
| 11163 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11164 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/accountUserProfiles/")); | |
| 11165 pathOffset += 21; | |
| 11166 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11167 pathOffset = path.length; | |
| 11168 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11169 | |
| 11170 var query = (req.url).query; | |
| 11171 var queryOffset = 0; | |
| 11172 var queryMap = {}; | |
| 11173 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11174 parseBool(n) { | |
| 11175 if (n == "true") return true; | |
| 11176 if (n == "false") return false; | |
| 11177 if (n == null) return null; | |
| 11178 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11179 } | |
| 11180 if (query.length > 0) { | |
| 11181 for (var part in query.split("&")) { | |
| 11182 var keyvalue = part.split("="); | |
| 11183 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11184 } | |
| 11185 } | |
| 11186 | |
| 11187 | |
| 11188 var h = { | |
| 11189 "content-type" : "application/json; charset=utf-8", | |
| 11190 }; | |
| 11191 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11192 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11193 }), true); | |
| 11194 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountUser
Profile response) { | |
| 11195 checkAccountUserProfile(response); | |
| 11196 }))); | |
| 11197 }); | |
| 11198 | |
| 11199 unittest.test("method--insert", () { | |
| 11200 | |
| 11201 var mock = new HttpServerMock(); | |
| 11202 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11203 var arg_request = buildAccountUserProfile(); | |
| 11204 var arg_profileId = "foo"; | |
| 11205 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11206 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11207 checkAccountUserProfile(obj); | |
| 11208 | |
| 11209 var path = (req.url).path; | |
| 11210 var pathOffset = 0; | |
| 11211 var index; | |
| 11212 var subPart; | |
| 11213 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11214 pathOffset += 1; | |
| 11215 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11216 pathOffset += 18; | |
| 11217 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11218 pathOffset += 13; | |
| 11219 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11220 unittest.expect(index >= 0, unittest.isTrue); | |
| 11221 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11222 pathOffset = index; | |
| 11223 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11224 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11225 pathOffset += 20; | |
| 11226 | |
| 11227 var query = (req.url).query; | |
| 11228 var queryOffset = 0; | |
| 11229 var queryMap = {}; | |
| 11230 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11231 parseBool(n) { | |
| 11232 if (n == "true") return true; | |
| 11233 if (n == "false") return false; | |
| 11234 if (n == null) return null; | |
| 11235 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11236 } | |
| 11237 if (query.length > 0) { | |
| 11238 for (var part in query.split("&")) { | |
| 11239 var keyvalue = part.split("="); | |
| 11240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11241 } | |
| 11242 } | |
| 11243 | |
| 11244 | |
| 11245 var h = { | |
| 11246 "content-type" : "application/json; charset=utf-8", | |
| 11247 }; | |
| 11248 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11249 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11250 }), true); | |
| 11251 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11252 checkAccountUserProfile(response); | |
| 11253 }))); | |
| 11254 }); | |
| 11255 | |
| 11256 unittest.test("method--list", () { | |
| 11257 | |
| 11258 var mock = new HttpServerMock(); | |
| 11259 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11260 var arg_profileId = "foo"; | |
| 11261 var arg_active = true; | |
| 11262 var arg_ids = buildUnnamed2065(); | |
| 11263 var arg_maxResults = 42; | |
| 11264 var arg_pageToken = "foo"; | |
| 11265 var arg_searchString = "foo"; | |
| 11266 var arg_sortField = "foo"; | |
| 11267 var arg_sortOrder = "foo"; | |
| 11268 var arg_subaccountId = "foo"; | |
| 11269 var arg_userRoleId = "foo"; | |
| 11270 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11271 var path = (req.url).path; | |
| 11272 var pathOffset = 0; | |
| 11273 var index; | |
| 11274 var subPart; | |
| 11275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11276 pathOffset += 1; | |
| 11277 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11278 pathOffset += 18; | |
| 11279 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11280 pathOffset += 13; | |
| 11281 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11282 unittest.expect(index >= 0, unittest.isTrue); | |
| 11283 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11284 pathOffset = index; | |
| 11285 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11286 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11287 pathOffset += 20; | |
| 11288 | |
| 11289 var query = (req.url).query; | |
| 11290 var queryOffset = 0; | |
| 11291 var queryMap = {}; | |
| 11292 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11293 parseBool(n) { | |
| 11294 if (n == "true") return true; | |
| 11295 if (n == "false") return false; | |
| 11296 if (n == null) return null; | |
| 11297 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11298 } | |
| 11299 if (query.length > 0) { | |
| 11300 for (var part in query.split("&")) { | |
| 11301 var keyvalue = part.split("="); | |
| 11302 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11303 } | |
| 11304 } | |
| 11305 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11306 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11307 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11308 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11309 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11310 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11311 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11312 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 11313 unittest.expect(queryMap["userRoleId"].first, unittest.equals(arg_userRo
leId)); | |
| 11314 | |
| 11315 | |
| 11316 var h = { | |
| 11317 "content-type" : "application/json; charset=utf-8", | |
| 11318 }; | |
| 11319 var resp = convert.JSON.encode(buildAccountUserProfilesListResponse()); | |
| 11320 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11321 }), true); | |
| 11322 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) { | |
| 11323 checkAccountUserProfilesListResponse(response); | |
| 11324 }))); | |
| 11325 }); | |
| 11326 | |
| 11327 unittest.test("method--patch", () { | |
| 11328 | |
| 11329 var mock = new HttpServerMock(); | |
| 11330 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11331 var arg_request = buildAccountUserProfile(); | |
| 11332 var arg_profileId = "foo"; | |
| 11333 var arg_id = "foo"; | |
| 11334 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11335 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11336 checkAccountUserProfile(obj); | |
| 11337 | |
| 11338 var path = (req.url).path; | |
| 11339 var pathOffset = 0; | |
| 11340 var index; | |
| 11341 var subPart; | |
| 11342 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11343 pathOffset += 1; | |
| 11344 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11345 pathOffset += 18; | |
| 11346 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11347 pathOffset += 13; | |
| 11348 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11349 unittest.expect(index >= 0, unittest.isTrue); | |
| 11350 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11351 pathOffset = index; | |
| 11352 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11353 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11354 pathOffset += 20; | |
| 11355 | |
| 11356 var query = (req.url).query; | |
| 11357 var queryOffset = 0; | |
| 11358 var queryMap = {}; | |
| 11359 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11360 parseBool(n) { | |
| 11361 if (n == "true") return true; | |
| 11362 if (n == "false") return false; | |
| 11363 if (n == null) return null; | |
| 11364 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11365 } | |
| 11366 if (query.length > 0) { | |
| 11367 for (var part in query.split("&")) { | |
| 11368 var keyvalue = part.split("="); | |
| 11369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11370 } | |
| 11371 } | |
| 11372 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11373 | |
| 11374 | |
| 11375 var h = { | |
| 11376 "content-type" : "application/json; charset=utf-8", | |
| 11377 }; | |
| 11378 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11379 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11380 }), true); | |
| 11381 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AccountUserProfile response) { | |
| 11382 checkAccountUserProfile(response); | |
| 11383 }))); | |
| 11384 }); | |
| 11385 | |
| 11386 unittest.test("method--update", () { | |
| 11387 | |
| 11388 var mock = new HttpServerMock(); | |
| 11389 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11390 var arg_request = buildAccountUserProfile(); | |
| 11391 var arg_profileId = "foo"; | |
| 11392 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11393 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11394 checkAccountUserProfile(obj); | |
| 11395 | |
| 11396 var path = (req.url).path; | |
| 11397 var pathOffset = 0; | |
| 11398 var index; | |
| 11399 var subPart; | |
| 11400 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11401 pathOffset += 1; | |
| 11402 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11403 pathOffset += 18; | |
| 11404 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11405 pathOffset += 13; | |
| 11406 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11407 unittest.expect(index >= 0, unittest.isTrue); | |
| 11408 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11409 pathOffset = index; | |
| 11410 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11411 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11412 pathOffset += 20; | |
| 11413 | |
| 11414 var query = (req.url).query; | |
| 11415 var queryOffset = 0; | |
| 11416 var queryMap = {}; | |
| 11417 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11418 parseBool(n) { | |
| 11419 if (n == "true") return true; | |
| 11420 if (n == "false") return false; | |
| 11421 if (n == null) return null; | |
| 11422 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11423 } | |
| 11424 if (query.length > 0) { | |
| 11425 for (var part in query.split("&")) { | |
| 11426 var keyvalue = part.split("="); | |
| 11427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11428 } | |
| 11429 } | |
| 11430 | |
| 11431 | |
| 11432 var h = { | |
| 11433 "content-type" : "application/json; charset=utf-8", | |
| 11434 }; | |
| 11435 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11436 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11437 }), true); | |
| 11438 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11439 checkAccountUserProfile(response); | |
| 11440 }))); | |
| 11441 }); | |
| 11442 | |
| 11443 }); | |
| 11444 | |
| 11445 | |
| 11446 unittest.group("resource-AccountsResourceApi", () { | |
| 11447 unittest.test("method--get", () { | |
| 11448 | |
| 11449 var mock = new HttpServerMock(); | |
| 11450 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11451 var arg_profileId = "foo"; | |
| 11452 var arg_id = "foo"; | |
| 11453 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11454 var path = (req.url).path; | |
| 11455 var pathOffset = 0; | |
| 11456 var index; | |
| 11457 var subPart; | |
| 11458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11459 pathOffset += 1; | |
| 11460 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11461 pathOffset += 18; | |
| 11462 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11463 pathOffset += 13; | |
| 11464 index = path.indexOf("/accounts/", pathOffset); | |
| 11465 unittest.expect(index >= 0, unittest.isTrue); | |
| 11466 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11467 pathOffset = index; | |
| 11468 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11469 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/accounts/")); | |
| 11470 pathOffset += 10; | |
| 11471 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11472 pathOffset = path.length; | |
| 11473 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11474 | |
| 11475 var query = (req.url).query; | |
| 11476 var queryOffset = 0; | |
| 11477 var queryMap = {}; | |
| 11478 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11479 parseBool(n) { | |
| 11480 if (n == "true") return true; | |
| 11481 if (n == "false") return false; | |
| 11482 if (n == null) return null; | |
| 11483 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11484 } | |
| 11485 if (query.length > 0) { | |
| 11486 for (var part in query.split("&")) { | |
| 11487 var keyvalue = part.split("="); | |
| 11488 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11489 } | |
| 11490 } | |
| 11491 | |
| 11492 | |
| 11493 var h = { | |
| 11494 "content-type" : "application/json; charset=utf-8", | |
| 11495 }; | |
| 11496 var resp = convert.JSON.encode(buildAccount()); | |
| 11497 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11498 }), true); | |
| 11499 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Account res
ponse) { | |
| 11500 checkAccount(response); | |
| 11501 }))); | |
| 11502 }); | |
| 11503 | |
| 11504 unittest.test("method--list", () { | |
| 11505 | |
| 11506 var mock = new HttpServerMock(); | |
| 11507 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11508 var arg_profileId = "foo"; | |
| 11509 var arg_active = true; | |
| 11510 var arg_ids = buildUnnamed2066(); | |
| 11511 var arg_maxResults = 42; | |
| 11512 var arg_pageToken = "foo"; | |
| 11513 var arg_searchString = "foo"; | |
| 11514 var arg_sortField = "foo"; | |
| 11515 var arg_sortOrder = "foo"; | |
| 11516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11517 var path = (req.url).path; | |
| 11518 var pathOffset = 0; | |
| 11519 var index; | |
| 11520 var subPart; | |
| 11521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11522 pathOffset += 1; | |
| 11523 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11524 pathOffset += 18; | |
| 11525 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11526 pathOffset += 13; | |
| 11527 index = path.indexOf("/accounts", pathOffset); | |
| 11528 unittest.expect(index >= 0, unittest.isTrue); | |
| 11529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11530 pathOffset = index; | |
| 11531 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11532 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11533 pathOffset += 9; | |
| 11534 | |
| 11535 var query = (req.url).query; | |
| 11536 var queryOffset = 0; | |
| 11537 var queryMap = {}; | |
| 11538 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11539 parseBool(n) { | |
| 11540 if (n == "true") return true; | |
| 11541 if (n == "false") return false; | |
| 11542 if (n == null) return null; | |
| 11543 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11544 } | |
| 11545 if (query.length > 0) { | |
| 11546 for (var part in query.split("&")) { | |
| 11547 var keyvalue = part.split("="); | |
| 11548 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11549 } | |
| 11550 } | |
| 11551 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11552 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11553 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11554 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11555 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11556 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11557 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11558 | |
| 11559 | |
| 11560 var h = { | |
| 11561 "content-type" : "application/json; charset=utf-8", | |
| 11562 }; | |
| 11563 var resp = convert.JSON.encode(buildAccountsListResponse()); | |
| 11564 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11565 }), true); | |
| 11566 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) { | |
| 11567 checkAccountsListResponse(response); | |
| 11568 }))); | |
| 11569 }); | |
| 11570 | |
| 11571 unittest.test("method--patch", () { | |
| 11572 | |
| 11573 var mock = new HttpServerMock(); | |
| 11574 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11575 var arg_request = buildAccount(); | |
| 11576 var arg_profileId = "foo"; | |
| 11577 var arg_id = "foo"; | |
| 11578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11579 var obj = new api.Account.fromJson(json); | |
| 11580 checkAccount(obj); | |
| 11581 | |
| 11582 var path = (req.url).path; | |
| 11583 var pathOffset = 0; | |
| 11584 var index; | |
| 11585 var subPart; | |
| 11586 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11587 pathOffset += 1; | |
| 11588 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11589 pathOffset += 18; | |
| 11590 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11591 pathOffset += 13; | |
| 11592 index = path.indexOf("/accounts", pathOffset); | |
| 11593 unittest.expect(index >= 0, unittest.isTrue); | |
| 11594 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11595 pathOffset = index; | |
| 11596 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11597 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11598 pathOffset += 9; | |
| 11599 | |
| 11600 var query = (req.url).query; | |
| 11601 var queryOffset = 0; | |
| 11602 var queryMap = {}; | |
| 11603 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11604 parseBool(n) { | |
| 11605 if (n == "true") return true; | |
| 11606 if (n == "false") return false; | |
| 11607 if (n == null) return null; | |
| 11608 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11609 } | |
| 11610 if (query.length > 0) { | |
| 11611 for (var part in query.split("&")) { | |
| 11612 var keyvalue = part.split("="); | |
| 11613 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11614 } | |
| 11615 } | |
| 11616 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11617 | |
| 11618 | |
| 11619 var h = { | |
| 11620 "content-type" : "application/json; charset=utf-8", | |
| 11621 }; | |
| 11622 var resp = convert.JSON.encode(buildAccount()); | |
| 11623 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11624 }), true); | |
| 11625 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Account response) { | |
| 11626 checkAccount(response); | |
| 11627 }))); | |
| 11628 }); | |
| 11629 | |
| 11630 unittest.test("method--update", () { | |
| 11631 | |
| 11632 var mock = new HttpServerMock(); | |
| 11633 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11634 var arg_request = buildAccount(); | |
| 11635 var arg_profileId = "foo"; | |
| 11636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11637 var obj = new api.Account.fromJson(json); | |
| 11638 checkAccount(obj); | |
| 11639 | |
| 11640 var path = (req.url).path; | |
| 11641 var pathOffset = 0; | |
| 11642 var index; | |
| 11643 var subPart; | |
| 11644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11645 pathOffset += 1; | |
| 11646 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11647 pathOffset += 18; | |
| 11648 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11649 pathOffset += 13; | |
| 11650 index = path.indexOf("/accounts", pathOffset); | |
| 11651 unittest.expect(index >= 0, unittest.isTrue); | |
| 11652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11653 pathOffset = index; | |
| 11654 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11655 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11656 pathOffset += 9; | |
| 11657 | |
| 11658 var query = (req.url).query; | |
| 11659 var queryOffset = 0; | |
| 11660 var queryMap = {}; | |
| 11661 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11662 parseBool(n) { | |
| 11663 if (n == "true") return true; | |
| 11664 if (n == "false") return false; | |
| 11665 if (n == null) return null; | |
| 11666 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11667 } | |
| 11668 if (query.length > 0) { | |
| 11669 for (var part in query.split("&")) { | |
| 11670 var keyvalue = part.split("="); | |
| 11671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11672 } | |
| 11673 } | |
| 11674 | |
| 11675 | |
| 11676 var h = { | |
| 11677 "content-type" : "application/json; charset=utf-8", | |
| 11678 }; | |
| 11679 var resp = convert.JSON.encode(buildAccount()); | |
| 11680 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11681 }), true); | |
| 11682 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ount response) { | |
| 11683 checkAccount(response); | |
| 11684 }))); | |
| 11685 }); | |
| 11686 | |
| 11687 }); | |
| 11688 | |
| 11689 | |
| 11690 unittest.group("resource-AdsResourceApi", () { | |
| 11691 unittest.test("method--get", () { | |
| 11692 | |
| 11693 var mock = new HttpServerMock(); | |
| 11694 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11695 var arg_profileId = "foo"; | |
| 11696 var arg_id = "foo"; | |
| 11697 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11698 var path = (req.url).path; | |
| 11699 var pathOffset = 0; | |
| 11700 var index; | |
| 11701 var subPart; | |
| 11702 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11703 pathOffset += 1; | |
| 11704 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11705 pathOffset += 18; | |
| 11706 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11707 pathOffset += 13; | |
| 11708 index = path.indexOf("/ads/", pathOffset); | |
| 11709 unittest.expect(index >= 0, unittest.isTrue); | |
| 11710 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11711 pathOffset = index; | |
| 11712 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11713 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/ads/")); | |
| 11714 pathOffset += 5; | |
| 11715 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11716 pathOffset = path.length; | |
| 11717 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11718 | |
| 11719 var query = (req.url).query; | |
| 11720 var queryOffset = 0; | |
| 11721 var queryMap = {}; | |
| 11722 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11723 parseBool(n) { | |
| 11724 if (n == "true") return true; | |
| 11725 if (n == "false") return false; | |
| 11726 if (n == null) return null; | |
| 11727 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11728 } | |
| 11729 if (query.length > 0) { | |
| 11730 for (var part in query.split("&")) { | |
| 11731 var keyvalue = part.split("="); | |
| 11732 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11733 } | |
| 11734 } | |
| 11735 | |
| 11736 | |
| 11737 var h = { | |
| 11738 "content-type" : "application/json; charset=utf-8", | |
| 11739 }; | |
| 11740 var resp = convert.JSON.encode(buildAd()); | |
| 11741 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11742 }), true); | |
| 11743 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Ad response
) { | |
| 11744 checkAd(response); | |
| 11745 }))); | |
| 11746 }); | |
| 11747 | |
| 11748 unittest.test("method--insert", () { | |
| 11749 | |
| 11750 var mock = new HttpServerMock(); | |
| 11751 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11752 var arg_request = buildAd(); | |
| 11753 var arg_profileId = "foo"; | |
| 11754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11755 var obj = new api.Ad.fromJson(json); | |
| 11756 checkAd(obj); | |
| 11757 | |
| 11758 var path = (req.url).path; | |
| 11759 var pathOffset = 0; | |
| 11760 var index; | |
| 11761 var subPart; | |
| 11762 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11763 pathOffset += 1; | |
| 11764 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11765 pathOffset += 18; | |
| 11766 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11767 pathOffset += 13; | |
| 11768 index = path.indexOf("/ads", pathOffset); | |
| 11769 unittest.expect(index >= 0, unittest.isTrue); | |
| 11770 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11771 pathOffset = index; | |
| 11772 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11773 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11774 pathOffset += 4; | |
| 11775 | |
| 11776 var query = (req.url).query; | |
| 11777 var queryOffset = 0; | |
| 11778 var queryMap = {}; | |
| 11779 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11780 parseBool(n) { | |
| 11781 if (n == "true") return true; | |
| 11782 if (n == "false") return false; | |
| 11783 if (n == null) return null; | |
| 11784 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11785 } | |
| 11786 if (query.length > 0) { | |
| 11787 for (var part in query.split("&")) { | |
| 11788 var keyvalue = part.split("="); | |
| 11789 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11790 } | |
| 11791 } | |
| 11792 | |
| 11793 | |
| 11794 var h = { | |
| 11795 "content-type" : "application/json; charset=utf-8", | |
| 11796 }; | |
| 11797 var resp = convert.JSON.encode(buildAd()); | |
| 11798 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11799 }), true); | |
| 11800 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 11801 checkAd(response); | |
| 11802 }))); | |
| 11803 }); | |
| 11804 | |
| 11805 unittest.test("method--list", () { | |
| 11806 | |
| 11807 var mock = new HttpServerMock(); | |
| 11808 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11809 var arg_profileId = "foo"; | |
| 11810 var arg_active = true; | |
| 11811 var arg_advertiserId = "foo"; | |
| 11812 var arg_archived = true; | |
| 11813 var arg_audienceSegmentIds = buildUnnamed2067(); | |
| 11814 var arg_campaignIds = buildUnnamed2068(); | |
| 11815 var arg_compatibility = "foo"; | |
| 11816 var arg_creativeIds = buildUnnamed2069(); | |
| 11817 var arg_creativeOptimizationConfigurationIds = buildUnnamed2070(); | |
| 11818 var arg_creativeType = "foo"; | |
| 11819 var arg_dynamicClickTracker = true; | |
| 11820 var arg_ids = buildUnnamed2071(); | |
| 11821 var arg_landingPageIds = buildUnnamed2072(); | |
| 11822 var arg_maxResults = 42; | |
| 11823 var arg_overriddenEventTagId = "foo"; | |
| 11824 var arg_pageToken = "foo"; | |
| 11825 var arg_placementIds = buildUnnamed2073(); | |
| 11826 var arg_remarketingListIds = buildUnnamed2074(); | |
| 11827 var arg_searchString = "foo"; | |
| 11828 var arg_sizeIds = buildUnnamed2075(); | |
| 11829 var arg_sortField = "foo"; | |
| 11830 var arg_sortOrder = "foo"; | |
| 11831 var arg_sslCompliant = true; | |
| 11832 var arg_sslRequired = true; | |
| 11833 var arg_type = buildUnnamed2076(); | |
| 11834 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11835 var path = (req.url).path; | |
| 11836 var pathOffset = 0; | |
| 11837 var index; | |
| 11838 var subPart; | |
| 11839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11840 pathOffset += 1; | |
| 11841 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11842 pathOffset += 18; | |
| 11843 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11844 pathOffset += 13; | |
| 11845 index = path.indexOf("/ads", pathOffset); | |
| 11846 unittest.expect(index >= 0, unittest.isTrue); | |
| 11847 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11848 pathOffset = index; | |
| 11849 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11850 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11851 pathOffset += 4; | |
| 11852 | |
| 11853 var query = (req.url).query; | |
| 11854 var queryOffset = 0; | |
| 11855 var queryMap = {}; | |
| 11856 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11857 parseBool(n) { | |
| 11858 if (n == "true") return true; | |
| 11859 if (n == "false") return false; | |
| 11860 if (n == null) return null; | |
| 11861 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11862 } | |
| 11863 if (query.length > 0) { | |
| 11864 for (var part in query.split("&")) { | |
| 11865 var keyvalue = part.split("="); | |
| 11866 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11867 } | |
| 11868 } | |
| 11869 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11870 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 11871 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 11872 unittest.expect(queryMap["audienceSegmentIds"], unittest.equals(arg_audi
enceSegmentIds)); | |
| 11873 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 11874 unittest.expect(queryMap["compatibility"].first, unittest.equals(arg_com
patibility)); | |
| 11875 unittest.expect(queryMap["creativeIds"], unittest.equals(arg_creativeIds
)); | |
| 11876 unittest.expect(queryMap["creativeOptimizationConfigurationIds"], unitte
st.equals(arg_creativeOptimizationConfigurationIds)); | |
| 11877 unittest.expect(queryMap["creativeType"].first, unittest.equals(arg_crea
tiveType)); | |
| 11878 unittest.expect(queryMap["dynamicClickTracker"].first, unittest.equals("
$arg_dynamicClickTracker")); | |
| 11879 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11880 unittest.expect(queryMap["landingPageIds"], unittest.equals(arg_landingP
ageIds)); | |
| 11881 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11882 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 11883 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11884 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 11885 unittest.expect(queryMap["remarketingListIds"], unittest.equals(arg_rema
rketingListIds)); | |
| 11886 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11887 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 11888 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11889 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11890 unittest.expect(queryMap["sslCompliant"].first, unittest.equals("$arg_ss
lCompliant")); | |
| 11891 unittest.expect(queryMap["sslRequired"].first, unittest.equals("$arg_ssl
Required")); | |
| 11892 unittest.expect(queryMap["type"], unittest.equals(arg_type)); | |
| 11893 | |
| 11894 | |
| 11895 var h = { | |
| 11896 "content-type" : "application/json; charset=utf-8", | |
| 11897 }; | |
| 11898 var resp = convert.JSON.encode(buildAdsListResponse()); | |
| 11899 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11900 }), true); | |
| 11901 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) { | |
| 11902 checkAdsListResponse(response); | |
| 11903 }))); | |
| 11904 }); | |
| 11905 | |
| 11906 unittest.test("method--patch", () { | |
| 11907 | |
| 11908 var mock = new HttpServerMock(); | |
| 11909 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11910 var arg_request = buildAd(); | |
| 11911 var arg_profileId = "foo"; | |
| 11912 var arg_id = "foo"; | |
| 11913 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11914 var obj = new api.Ad.fromJson(json); | |
| 11915 checkAd(obj); | |
| 11916 | |
| 11917 var path = (req.url).path; | |
| 11918 var pathOffset = 0; | |
| 11919 var index; | |
| 11920 var subPart; | |
| 11921 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11922 pathOffset += 1; | |
| 11923 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11924 pathOffset += 18; | |
| 11925 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11926 pathOffset += 13; | |
| 11927 index = path.indexOf("/ads", pathOffset); | |
| 11928 unittest.expect(index >= 0, unittest.isTrue); | |
| 11929 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11930 pathOffset = index; | |
| 11931 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11932 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11933 pathOffset += 4; | |
| 11934 | |
| 11935 var query = (req.url).query; | |
| 11936 var queryOffset = 0; | |
| 11937 var queryMap = {}; | |
| 11938 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11939 parseBool(n) { | |
| 11940 if (n == "true") return true; | |
| 11941 if (n == "false") return false; | |
| 11942 if (n == null) return null; | |
| 11943 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11944 } | |
| 11945 if (query.length > 0) { | |
| 11946 for (var part in query.split("&")) { | |
| 11947 var keyvalue = part.split("="); | |
| 11948 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11949 } | |
| 11950 } | |
| 11951 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11952 | |
| 11953 | |
| 11954 var h = { | |
| 11955 "content-type" : "application/json; charset=utf-8", | |
| 11956 }; | |
| 11957 var resp = convert.JSON.encode(buildAd()); | |
| 11958 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11959 }), true); | |
| 11960 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Ad response) { | |
| 11961 checkAd(response); | |
| 11962 }))); | |
| 11963 }); | |
| 11964 | |
| 11965 unittest.test("method--update", () { | |
| 11966 | |
| 11967 var mock = new HttpServerMock(); | |
| 11968 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11969 var arg_request = buildAd(); | |
| 11970 var arg_profileId = "foo"; | |
| 11971 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11972 var obj = new api.Ad.fromJson(json); | |
| 11973 checkAd(obj); | |
| 11974 | |
| 11975 var path = (req.url).path; | |
| 11976 var pathOffset = 0; | |
| 11977 var index; | |
| 11978 var subPart; | |
| 11979 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11980 pathOffset += 1; | |
| 11981 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 11982 pathOffset += 18; | |
| 11983 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11984 pathOffset += 13; | |
| 11985 index = path.indexOf("/ads", pathOffset); | |
| 11986 unittest.expect(index >= 0, unittest.isTrue); | |
| 11987 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11988 pathOffset = index; | |
| 11989 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11990 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11991 pathOffset += 4; | |
| 11992 | |
| 11993 var query = (req.url).query; | |
| 11994 var queryOffset = 0; | |
| 11995 var queryMap = {}; | |
| 11996 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11997 parseBool(n) { | |
| 11998 if (n == "true") return true; | |
| 11999 if (n == "false") return false; | |
| 12000 if (n == null) return null; | |
| 12001 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12002 } | |
| 12003 if (query.length > 0) { | |
| 12004 for (var part in query.split("&")) { | |
| 12005 var keyvalue = part.split("="); | |
| 12006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12007 } | |
| 12008 } | |
| 12009 | |
| 12010 | |
| 12011 var h = { | |
| 12012 "content-type" : "application/json; charset=utf-8", | |
| 12013 }; | |
| 12014 var resp = convert.JSON.encode(buildAd()); | |
| 12015 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12016 }), true); | |
| 12017 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 12018 checkAd(response); | |
| 12019 }))); | |
| 12020 }); | |
| 12021 | |
| 12022 }); | |
| 12023 | |
| 12024 | |
| 12025 unittest.group("resource-AdvertiserGroupsResourceApi", () { | |
| 12026 unittest.test("method--delete", () { | |
| 12027 | |
| 12028 var mock = new HttpServerMock(); | |
| 12029 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12030 var arg_profileId = "foo"; | |
| 12031 var arg_id = "foo"; | |
| 12032 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12033 var path = (req.url).path; | |
| 12034 var pathOffset = 0; | |
| 12035 var index; | |
| 12036 var subPart; | |
| 12037 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12038 pathOffset += 1; | |
| 12039 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12040 pathOffset += 18; | |
| 12041 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12042 pathOffset += 13; | |
| 12043 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12044 unittest.expect(index >= 0, unittest.isTrue); | |
| 12045 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12046 pathOffset = index; | |
| 12047 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12048 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12049 pathOffset += 18; | |
| 12050 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12051 pathOffset = path.length; | |
| 12052 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12053 | |
| 12054 var query = (req.url).query; | |
| 12055 var queryOffset = 0; | |
| 12056 var queryMap = {}; | |
| 12057 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12058 parseBool(n) { | |
| 12059 if (n == "true") return true; | |
| 12060 if (n == "false") return false; | |
| 12061 if (n == null) return null; | |
| 12062 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12063 } | |
| 12064 if (query.length > 0) { | |
| 12065 for (var part in query.split("&")) { | |
| 12066 var keyvalue = part.split("="); | |
| 12067 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12068 } | |
| 12069 } | |
| 12070 | |
| 12071 | |
| 12072 var h = { | |
| 12073 "content-type" : "application/json; charset=utf-8", | |
| 12074 }; | |
| 12075 var resp = ""; | |
| 12076 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12077 }), true); | |
| 12078 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 12079 }); | |
| 12080 | |
| 12081 unittest.test("method--get", () { | |
| 12082 | |
| 12083 var mock = new HttpServerMock(); | |
| 12084 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12085 var arg_profileId = "foo"; | |
| 12086 var arg_id = "foo"; | |
| 12087 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12088 var path = (req.url).path; | |
| 12089 var pathOffset = 0; | |
| 12090 var index; | |
| 12091 var subPart; | |
| 12092 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12093 pathOffset += 1; | |
| 12094 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12095 pathOffset += 18; | |
| 12096 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12097 pathOffset += 13; | |
| 12098 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12099 unittest.expect(index >= 0, unittest.isTrue); | |
| 12100 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12101 pathOffset = index; | |
| 12102 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12103 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12104 pathOffset += 18; | |
| 12105 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12106 pathOffset = path.length; | |
| 12107 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12108 | |
| 12109 var query = (req.url).query; | |
| 12110 var queryOffset = 0; | |
| 12111 var queryMap = {}; | |
| 12112 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12113 parseBool(n) { | |
| 12114 if (n == "true") return true; | |
| 12115 if (n == "false") return false; | |
| 12116 if (n == null) return null; | |
| 12117 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12118 } | |
| 12119 if (query.length > 0) { | |
| 12120 for (var part in query.split("&")) { | |
| 12121 var keyvalue = part.split("="); | |
| 12122 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12123 } | |
| 12124 } | |
| 12125 | |
| 12126 | |
| 12127 var h = { | |
| 12128 "content-type" : "application/json; charset=utf-8", | |
| 12129 }; | |
| 12130 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12131 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12132 }), true); | |
| 12133 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AdvertiserG
roup response) { | |
| 12134 checkAdvertiserGroup(response); | |
| 12135 }))); | |
| 12136 }); | |
| 12137 | |
| 12138 unittest.test("method--insert", () { | |
| 12139 | |
| 12140 var mock = new HttpServerMock(); | |
| 12141 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12142 var arg_request = buildAdvertiserGroup(); | |
| 12143 var arg_profileId = "foo"; | |
| 12144 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12145 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12146 checkAdvertiserGroup(obj); | |
| 12147 | |
| 12148 var path = (req.url).path; | |
| 12149 var pathOffset = 0; | |
| 12150 var index; | |
| 12151 var subPart; | |
| 12152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12153 pathOffset += 1; | |
| 12154 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12155 pathOffset += 18; | |
| 12156 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12157 pathOffset += 13; | |
| 12158 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12159 unittest.expect(index >= 0, unittest.isTrue); | |
| 12160 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12161 pathOffset = index; | |
| 12162 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12163 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12164 pathOffset += 17; | |
| 12165 | |
| 12166 var query = (req.url).query; | |
| 12167 var queryOffset = 0; | |
| 12168 var queryMap = {}; | |
| 12169 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12170 parseBool(n) { | |
| 12171 if (n == "true") return true; | |
| 12172 if (n == "false") return false; | |
| 12173 if (n == null) return null; | |
| 12174 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12175 } | |
| 12176 if (query.length > 0) { | |
| 12177 for (var part in query.split("&")) { | |
| 12178 var keyvalue = part.split("="); | |
| 12179 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12180 } | |
| 12181 } | |
| 12182 | |
| 12183 | |
| 12184 var h = { | |
| 12185 "content-type" : "application/json; charset=utf-8", | |
| 12186 }; | |
| 12187 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12188 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12189 }), true); | |
| 12190 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12191 checkAdvertiserGroup(response); | |
| 12192 }))); | |
| 12193 }); | |
| 12194 | |
| 12195 unittest.test("method--list", () { | |
| 12196 | |
| 12197 var mock = new HttpServerMock(); | |
| 12198 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12199 var arg_profileId = "foo"; | |
| 12200 var arg_ids = buildUnnamed2077(); | |
| 12201 var arg_maxResults = 42; | |
| 12202 var arg_pageToken = "foo"; | |
| 12203 var arg_searchString = "foo"; | |
| 12204 var arg_sortField = "foo"; | |
| 12205 var arg_sortOrder = "foo"; | |
| 12206 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12207 var path = (req.url).path; | |
| 12208 var pathOffset = 0; | |
| 12209 var index; | |
| 12210 var subPart; | |
| 12211 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12212 pathOffset += 1; | |
| 12213 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12214 pathOffset += 18; | |
| 12215 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12216 pathOffset += 13; | |
| 12217 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12218 unittest.expect(index >= 0, unittest.isTrue); | |
| 12219 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12220 pathOffset = index; | |
| 12221 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12222 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12223 pathOffset += 17; | |
| 12224 | |
| 12225 var query = (req.url).query; | |
| 12226 var queryOffset = 0; | |
| 12227 var queryMap = {}; | |
| 12228 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12229 parseBool(n) { | |
| 12230 if (n == "true") return true; | |
| 12231 if (n == "false") return false; | |
| 12232 if (n == null) return null; | |
| 12233 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12234 } | |
| 12235 if (query.length > 0) { | |
| 12236 for (var part in query.split("&")) { | |
| 12237 var keyvalue = part.split("="); | |
| 12238 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12239 } | |
| 12240 } | |
| 12241 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12242 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12243 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12244 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12245 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12246 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12247 | |
| 12248 | |
| 12249 var h = { | |
| 12250 "content-type" : "application/json; charset=utf-8", | |
| 12251 }; | |
| 12252 var resp = convert.JSON.encode(buildAdvertiserGroupsListResponse()); | |
| 12253 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12254 }), true); | |
| 12255 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) { | |
| 12256 checkAdvertiserGroupsListResponse(response); | |
| 12257 }))); | |
| 12258 }); | |
| 12259 | |
| 12260 unittest.test("method--patch", () { | |
| 12261 | |
| 12262 var mock = new HttpServerMock(); | |
| 12263 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12264 var arg_request = buildAdvertiserGroup(); | |
| 12265 var arg_profileId = "foo"; | |
| 12266 var arg_id = "foo"; | |
| 12267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12268 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12269 checkAdvertiserGroup(obj); | |
| 12270 | |
| 12271 var path = (req.url).path; | |
| 12272 var pathOffset = 0; | |
| 12273 var index; | |
| 12274 var subPart; | |
| 12275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12276 pathOffset += 1; | |
| 12277 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12278 pathOffset += 18; | |
| 12279 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12280 pathOffset += 13; | |
| 12281 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12282 unittest.expect(index >= 0, unittest.isTrue); | |
| 12283 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12284 pathOffset = index; | |
| 12285 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12286 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12287 pathOffset += 17; | |
| 12288 | |
| 12289 var query = (req.url).query; | |
| 12290 var queryOffset = 0; | |
| 12291 var queryMap = {}; | |
| 12292 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12293 parseBool(n) { | |
| 12294 if (n == "true") return true; | |
| 12295 if (n == "false") return false; | |
| 12296 if (n == null) return null; | |
| 12297 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12298 } | |
| 12299 if (query.length > 0) { | |
| 12300 for (var part in query.split("&")) { | |
| 12301 var keyvalue = part.split("="); | |
| 12302 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12303 } | |
| 12304 } | |
| 12305 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12306 | |
| 12307 | |
| 12308 var h = { | |
| 12309 "content-type" : "application/json; charset=utf-8", | |
| 12310 }; | |
| 12311 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12312 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12313 }), true); | |
| 12314 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AdvertiserGroup response) { | |
| 12315 checkAdvertiserGroup(response); | |
| 12316 }))); | |
| 12317 }); | |
| 12318 | |
| 12319 unittest.test("method--update", () { | |
| 12320 | |
| 12321 var mock = new HttpServerMock(); | |
| 12322 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12323 var arg_request = buildAdvertiserGroup(); | |
| 12324 var arg_profileId = "foo"; | |
| 12325 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12326 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12327 checkAdvertiserGroup(obj); | |
| 12328 | |
| 12329 var path = (req.url).path; | |
| 12330 var pathOffset = 0; | |
| 12331 var index; | |
| 12332 var subPart; | |
| 12333 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12334 pathOffset += 1; | |
| 12335 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12336 pathOffset += 18; | |
| 12337 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12338 pathOffset += 13; | |
| 12339 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12340 unittest.expect(index >= 0, unittest.isTrue); | |
| 12341 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12342 pathOffset = index; | |
| 12343 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12344 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12345 pathOffset += 17; | |
| 12346 | |
| 12347 var query = (req.url).query; | |
| 12348 var queryOffset = 0; | |
| 12349 var queryMap = {}; | |
| 12350 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12351 parseBool(n) { | |
| 12352 if (n == "true") return true; | |
| 12353 if (n == "false") return false; | |
| 12354 if (n == null) return null; | |
| 12355 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12356 } | |
| 12357 if (query.length > 0) { | |
| 12358 for (var part in query.split("&")) { | |
| 12359 var keyvalue = part.split("="); | |
| 12360 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12361 } | |
| 12362 } | |
| 12363 | |
| 12364 | |
| 12365 var h = { | |
| 12366 "content-type" : "application/json; charset=utf-8", | |
| 12367 }; | |
| 12368 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12369 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12370 }), true); | |
| 12371 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12372 checkAdvertiserGroup(response); | |
| 12373 }))); | |
| 12374 }); | |
| 12375 | |
| 12376 }); | |
| 12377 | |
| 12378 | |
| 12379 unittest.group("resource-AdvertisersResourceApi", () { | |
| 12380 unittest.test("method--get", () { | |
| 12381 | |
| 12382 var mock = new HttpServerMock(); | |
| 12383 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12384 var arg_profileId = "foo"; | |
| 12385 var arg_id = "foo"; | |
| 12386 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12387 var path = (req.url).path; | |
| 12388 var pathOffset = 0; | |
| 12389 var index; | |
| 12390 var subPart; | |
| 12391 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12392 pathOffset += 1; | |
| 12393 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12394 pathOffset += 18; | |
| 12395 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12396 pathOffset += 13; | |
| 12397 index = path.indexOf("/advertisers/", pathOffset); | |
| 12398 unittest.expect(index >= 0, unittest.isTrue); | |
| 12399 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12400 pathOffset = index; | |
| 12401 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12402 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/advertisers/")); | |
| 12403 pathOffset += 13; | |
| 12404 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12405 pathOffset = path.length; | |
| 12406 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12407 | |
| 12408 var query = (req.url).query; | |
| 12409 var queryOffset = 0; | |
| 12410 var queryMap = {}; | |
| 12411 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12412 parseBool(n) { | |
| 12413 if (n == "true") return true; | |
| 12414 if (n == "false") return false; | |
| 12415 if (n == null) return null; | |
| 12416 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12417 } | |
| 12418 if (query.length > 0) { | |
| 12419 for (var part in query.split("&")) { | |
| 12420 var keyvalue = part.split("="); | |
| 12421 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12422 } | |
| 12423 } | |
| 12424 | |
| 12425 | |
| 12426 var h = { | |
| 12427 "content-type" : "application/json; charset=utf-8", | |
| 12428 }; | |
| 12429 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12430 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12431 }), true); | |
| 12432 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Advertiser
response) { | |
| 12433 checkAdvertiser(response); | |
| 12434 }))); | |
| 12435 }); | |
| 12436 | |
| 12437 unittest.test("method--insert", () { | |
| 12438 | |
| 12439 var mock = new HttpServerMock(); | |
| 12440 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12441 var arg_request = buildAdvertiser(); | |
| 12442 var arg_profileId = "foo"; | |
| 12443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12444 var obj = new api.Advertiser.fromJson(json); | |
| 12445 checkAdvertiser(obj); | |
| 12446 | |
| 12447 var path = (req.url).path; | |
| 12448 var pathOffset = 0; | |
| 12449 var index; | |
| 12450 var subPart; | |
| 12451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12452 pathOffset += 1; | |
| 12453 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12454 pathOffset += 18; | |
| 12455 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12456 pathOffset += 13; | |
| 12457 index = path.indexOf("/advertisers", pathOffset); | |
| 12458 unittest.expect(index >= 0, unittest.isTrue); | |
| 12459 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12460 pathOffset = index; | |
| 12461 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12462 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12463 pathOffset += 12; | |
| 12464 | |
| 12465 var query = (req.url).query; | |
| 12466 var queryOffset = 0; | |
| 12467 var queryMap = {}; | |
| 12468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12469 parseBool(n) { | |
| 12470 if (n == "true") return true; | |
| 12471 if (n == "false") return false; | |
| 12472 if (n == null) return null; | |
| 12473 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12474 } | |
| 12475 if (query.length > 0) { | |
| 12476 for (var part in query.split("&")) { | |
| 12477 var keyvalue = part.split("="); | |
| 12478 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12479 } | |
| 12480 } | |
| 12481 | |
| 12482 | |
| 12483 var h = { | |
| 12484 "content-type" : "application/json; charset=utf-8", | |
| 12485 }; | |
| 12486 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12487 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12488 }), true); | |
| 12489 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12490 checkAdvertiser(response); | |
| 12491 }))); | |
| 12492 }); | |
| 12493 | |
| 12494 unittest.test("method--list", () { | |
| 12495 | |
| 12496 var mock = new HttpServerMock(); | |
| 12497 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12498 var arg_profileId = "foo"; | |
| 12499 var arg_advertiserGroupIds = buildUnnamed2078(); | |
| 12500 var arg_floodlightConfigurationIds = buildUnnamed2079(); | |
| 12501 var arg_ids = buildUnnamed2080(); | |
| 12502 var arg_includeAdvertisersWithoutGroupsOnly = true; | |
| 12503 var arg_maxResults = 42; | |
| 12504 var arg_onlyParent = true; | |
| 12505 var arg_pageToken = "foo"; | |
| 12506 var arg_searchString = "foo"; | |
| 12507 var arg_sortField = "foo"; | |
| 12508 var arg_sortOrder = "foo"; | |
| 12509 var arg_status = "foo"; | |
| 12510 var arg_subaccountId = "foo"; | |
| 12511 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12512 var path = (req.url).path; | |
| 12513 var pathOffset = 0; | |
| 12514 var index; | |
| 12515 var subPart; | |
| 12516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12517 pathOffset += 1; | |
| 12518 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12519 pathOffset += 18; | |
| 12520 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12521 pathOffset += 13; | |
| 12522 index = path.indexOf("/advertisers", pathOffset); | |
| 12523 unittest.expect(index >= 0, unittest.isTrue); | |
| 12524 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12525 pathOffset = index; | |
| 12526 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12527 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12528 pathOffset += 12; | |
| 12529 | |
| 12530 var query = (req.url).query; | |
| 12531 var queryOffset = 0; | |
| 12532 var queryMap = {}; | |
| 12533 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12534 parseBool(n) { | |
| 12535 if (n == "true") return true; | |
| 12536 if (n == "false") return false; | |
| 12537 if (n == null) return null; | |
| 12538 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12539 } | |
| 12540 if (query.length > 0) { | |
| 12541 for (var part in query.split("&")) { | |
| 12542 var keyvalue = part.split("="); | |
| 12543 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12544 } | |
| 12545 } | |
| 12546 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 12547 unittest.expect(queryMap["floodlightConfigurationIds"], unittest.equals(
arg_floodlightConfigurationIds)); | |
| 12548 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12549 unittest.expect(queryMap["includeAdvertisersWithoutGroupsOnly"].first, u
nittest.equals("$arg_includeAdvertisersWithoutGroupsOnly")); | |
| 12550 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12551 unittest.expect(queryMap["onlyParent"].first, unittest.equals("$arg_only
Parent")); | |
| 12552 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12553 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12554 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12555 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12556 unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); | |
| 12557 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 12558 | |
| 12559 | |
| 12560 var h = { | |
| 12561 "content-type" : "application/json; charset=utf-8", | |
| 12562 }; | |
| 12563 var resp = convert.JSON.encode(buildAdvertisersListResponse()); | |
| 12564 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12565 }), true); | |
| 12566 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) { | |
| 12567 checkAdvertisersListResponse(response); | |
| 12568 }))); | |
| 12569 }); | |
| 12570 | |
| 12571 unittest.test("method--patch", () { | |
| 12572 | |
| 12573 var mock = new HttpServerMock(); | |
| 12574 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12575 var arg_request = buildAdvertiser(); | |
| 12576 var arg_profileId = "foo"; | |
| 12577 var arg_id = "foo"; | |
| 12578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12579 var obj = new api.Advertiser.fromJson(json); | |
| 12580 checkAdvertiser(obj); | |
| 12581 | |
| 12582 var path = (req.url).path; | |
| 12583 var pathOffset = 0; | |
| 12584 var index; | |
| 12585 var subPart; | |
| 12586 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12587 pathOffset += 1; | |
| 12588 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12589 pathOffset += 18; | |
| 12590 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12591 pathOffset += 13; | |
| 12592 index = path.indexOf("/advertisers", pathOffset); | |
| 12593 unittest.expect(index >= 0, unittest.isTrue); | |
| 12594 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12595 pathOffset = index; | |
| 12596 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12597 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12598 pathOffset += 12; | |
| 12599 | |
| 12600 var query = (req.url).query; | |
| 12601 var queryOffset = 0; | |
| 12602 var queryMap = {}; | |
| 12603 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12604 parseBool(n) { | |
| 12605 if (n == "true") return true; | |
| 12606 if (n == "false") return false; | |
| 12607 if (n == null) return null; | |
| 12608 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12609 } | |
| 12610 if (query.length > 0) { | |
| 12611 for (var part in query.split("&")) { | |
| 12612 var keyvalue = part.split("="); | |
| 12613 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12614 } | |
| 12615 } | |
| 12616 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12617 | |
| 12618 | |
| 12619 var h = { | |
| 12620 "content-type" : "application/json; charset=utf-8", | |
| 12621 }; | |
| 12622 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12623 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12624 }), true); | |
| 12625 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Advertiser response) { | |
| 12626 checkAdvertiser(response); | |
| 12627 }))); | |
| 12628 }); | |
| 12629 | |
| 12630 unittest.test("method--update", () { | |
| 12631 | |
| 12632 var mock = new HttpServerMock(); | |
| 12633 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12634 var arg_request = buildAdvertiser(); | |
| 12635 var arg_profileId = "foo"; | |
| 12636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12637 var obj = new api.Advertiser.fromJson(json); | |
| 12638 checkAdvertiser(obj); | |
| 12639 | |
| 12640 var path = (req.url).path; | |
| 12641 var pathOffset = 0; | |
| 12642 var index; | |
| 12643 var subPart; | |
| 12644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12645 pathOffset += 1; | |
| 12646 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12647 pathOffset += 18; | |
| 12648 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12649 pathOffset += 13; | |
| 12650 index = path.indexOf("/advertisers", pathOffset); | |
| 12651 unittest.expect(index >= 0, unittest.isTrue); | |
| 12652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12653 pathOffset = index; | |
| 12654 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12655 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12656 pathOffset += 12; | |
| 12657 | |
| 12658 var query = (req.url).query; | |
| 12659 var queryOffset = 0; | |
| 12660 var queryMap = {}; | |
| 12661 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12662 parseBool(n) { | |
| 12663 if (n == "true") return true; | |
| 12664 if (n == "false") return false; | |
| 12665 if (n == null) return null; | |
| 12666 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12667 } | |
| 12668 if (query.length > 0) { | |
| 12669 for (var part in query.split("&")) { | |
| 12670 var keyvalue = part.split("="); | |
| 12671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12672 } | |
| 12673 } | |
| 12674 | |
| 12675 | |
| 12676 var h = { | |
| 12677 "content-type" : "application/json; charset=utf-8", | |
| 12678 }; | |
| 12679 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12680 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12681 }), true); | |
| 12682 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12683 checkAdvertiser(response); | |
| 12684 }))); | |
| 12685 }); | |
| 12686 | |
| 12687 }); | |
| 12688 | |
| 12689 | |
| 12690 unittest.group("resource-BrowsersResourceApi", () { | |
| 12691 unittest.test("method--list", () { | |
| 12692 | |
| 12693 var mock = new HttpServerMock(); | |
| 12694 api.BrowsersResourceApi res = new api.DfareportingApi(mock).browsers; | |
| 12695 var arg_profileId = "foo"; | |
| 12696 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12697 var path = (req.url).path; | |
| 12698 var pathOffset = 0; | |
| 12699 var index; | |
| 12700 var subPart; | |
| 12701 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12702 pathOffset += 1; | |
| 12703 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12704 pathOffset += 18; | |
| 12705 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12706 pathOffset += 13; | |
| 12707 index = path.indexOf("/browsers", pathOffset); | |
| 12708 unittest.expect(index >= 0, unittest.isTrue); | |
| 12709 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12710 pathOffset = index; | |
| 12711 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12712 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/browsers")); | |
| 12713 pathOffset += 9; | |
| 12714 | |
| 12715 var query = (req.url).query; | |
| 12716 var queryOffset = 0; | |
| 12717 var queryMap = {}; | |
| 12718 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12719 parseBool(n) { | |
| 12720 if (n == "true") return true; | |
| 12721 if (n == "false") return false; | |
| 12722 if (n == null) return null; | |
| 12723 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12724 } | |
| 12725 if (query.length > 0) { | |
| 12726 for (var part in query.split("&")) { | |
| 12727 var keyvalue = part.split("="); | |
| 12728 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12729 } | |
| 12730 } | |
| 12731 | |
| 12732 | |
| 12733 var h = { | |
| 12734 "content-type" : "application/json; charset=utf-8", | |
| 12735 }; | |
| 12736 var resp = convert.JSON.encode(buildBrowsersListResponse()); | |
| 12737 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12738 }), true); | |
| 12739 res.list(arg_profileId).then(unittest.expectAsync(((api.BrowsersListRespon
se response) { | |
| 12740 checkBrowsersListResponse(response); | |
| 12741 }))); | |
| 12742 }); | |
| 12743 | |
| 12744 }); | |
| 12745 | |
| 12746 | |
| 12747 unittest.group("resource-CampaignCreativeAssociationsResourceApi", () { | |
| 12748 unittest.test("method--insert", () { | |
| 12749 | |
| 12750 var mock = new HttpServerMock(); | |
| 12751 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12752 var arg_request = buildCampaignCreativeAssociation(); | |
| 12753 var arg_profileId = "foo"; | |
| 12754 var arg_campaignId = "foo"; | |
| 12755 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12756 var obj = new api.CampaignCreativeAssociation.fromJson(json); | |
| 12757 checkCampaignCreativeAssociation(obj); | |
| 12758 | |
| 12759 var path = (req.url).path; | |
| 12760 var pathOffset = 0; | |
| 12761 var index; | |
| 12762 var subPart; | |
| 12763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12764 pathOffset += 1; | |
| 12765 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12766 pathOffset += 18; | |
| 12767 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12768 pathOffset += 13; | |
| 12769 index = path.indexOf("/campaigns/", pathOffset); | |
| 12770 unittest.expect(index >= 0, unittest.isTrue); | |
| 12771 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12772 pathOffset = index; | |
| 12773 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12774 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12775 pathOffset += 11; | |
| 12776 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12777 unittest.expect(index >= 0, unittest.isTrue); | |
| 12778 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12779 pathOffset = index; | |
| 12780 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12781 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12782 pathOffset += 29; | |
| 12783 | |
| 12784 var query = (req.url).query; | |
| 12785 var queryOffset = 0; | |
| 12786 var queryMap = {}; | |
| 12787 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12788 parseBool(n) { | |
| 12789 if (n == "true") return true; | |
| 12790 if (n == "false") return false; | |
| 12791 if (n == null) return null; | |
| 12792 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12793 } | |
| 12794 if (query.length > 0) { | |
| 12795 for (var part in query.split("&")) { | |
| 12796 var keyvalue = part.split("="); | |
| 12797 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12798 } | |
| 12799 } | |
| 12800 | |
| 12801 | |
| 12802 var h = { | |
| 12803 "content-type" : "application/json; charset=utf-8", | |
| 12804 }; | |
| 12805 var resp = convert.JSON.encode(buildCampaignCreativeAssociation()); | |
| 12806 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12807 }), true); | |
| 12808 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.CampaignCreativeAssociation response) { | |
| 12809 checkCampaignCreativeAssociation(response); | |
| 12810 }))); | |
| 12811 }); | |
| 12812 | |
| 12813 unittest.test("method--list", () { | |
| 12814 | |
| 12815 var mock = new HttpServerMock(); | |
| 12816 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12817 var arg_profileId = "foo"; | |
| 12818 var arg_campaignId = "foo"; | |
| 12819 var arg_maxResults = 42; | |
| 12820 var arg_pageToken = "foo"; | |
| 12821 var arg_sortOrder = "foo"; | |
| 12822 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12823 var path = (req.url).path; | |
| 12824 var pathOffset = 0; | |
| 12825 var index; | |
| 12826 var subPart; | |
| 12827 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12828 pathOffset += 1; | |
| 12829 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12830 pathOffset += 18; | |
| 12831 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12832 pathOffset += 13; | |
| 12833 index = path.indexOf("/campaigns/", pathOffset); | |
| 12834 unittest.expect(index >= 0, unittest.isTrue); | |
| 12835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12836 pathOffset = index; | |
| 12837 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12838 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12839 pathOffset += 11; | |
| 12840 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12841 unittest.expect(index >= 0, unittest.isTrue); | |
| 12842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12843 pathOffset = index; | |
| 12844 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12845 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12846 pathOffset += 29; | |
| 12847 | |
| 12848 var query = (req.url).query; | |
| 12849 var queryOffset = 0; | |
| 12850 var queryMap = {}; | |
| 12851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12852 parseBool(n) { | |
| 12853 if (n == "true") return true; | |
| 12854 if (n == "false") return false; | |
| 12855 if (n == null) return null; | |
| 12856 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12857 } | |
| 12858 if (query.length > 0) { | |
| 12859 for (var part in query.split("&")) { | |
| 12860 var keyvalue = part.split("="); | |
| 12861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12862 } | |
| 12863 } | |
| 12864 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12865 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12866 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12867 | |
| 12868 | |
| 12869 var h = { | |
| 12870 "content-type" : "application/json; charset=utf-8", | |
| 12871 }; | |
| 12872 var resp = convert.JSON.encode(buildCampaignCreativeAssociationsListResp
onse()); | |
| 12873 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12874 }), true); | |
| 12875 res.list(arg_profileId, arg_campaignId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Ca
mpaignCreativeAssociationsListResponse response) { | |
| 12876 checkCampaignCreativeAssociationsListResponse(response); | |
| 12877 }))); | |
| 12878 }); | |
| 12879 | |
| 12880 }); | |
| 12881 | |
| 12882 | |
| 12883 unittest.group("resource-CampaignsResourceApi", () { | |
| 12884 unittest.test("method--get", () { | |
| 12885 | |
| 12886 var mock = new HttpServerMock(); | |
| 12887 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12888 var arg_profileId = "foo"; | |
| 12889 var arg_id = "foo"; | |
| 12890 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12891 var path = (req.url).path; | |
| 12892 var pathOffset = 0; | |
| 12893 var index; | |
| 12894 var subPart; | |
| 12895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12896 pathOffset += 1; | |
| 12897 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12898 pathOffset += 18; | |
| 12899 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12900 pathOffset += 13; | |
| 12901 index = path.indexOf("/campaigns/", pathOffset); | |
| 12902 unittest.expect(index >= 0, unittest.isTrue); | |
| 12903 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12904 pathOffset = index; | |
| 12905 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12906 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12907 pathOffset += 11; | |
| 12908 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12909 pathOffset = path.length; | |
| 12910 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12911 | |
| 12912 var query = (req.url).query; | |
| 12913 var queryOffset = 0; | |
| 12914 var queryMap = {}; | |
| 12915 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12916 parseBool(n) { | |
| 12917 if (n == "true") return true; | |
| 12918 if (n == "false") return false; | |
| 12919 if (n == null) return null; | |
| 12920 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12921 } | |
| 12922 if (query.length > 0) { | |
| 12923 for (var part in query.split("&")) { | |
| 12924 var keyvalue = part.split("="); | |
| 12925 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12926 } | |
| 12927 } | |
| 12928 | |
| 12929 | |
| 12930 var h = { | |
| 12931 "content-type" : "application/json; charset=utf-8", | |
| 12932 }; | |
| 12933 var resp = convert.JSON.encode(buildCampaign()); | |
| 12934 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12935 }), true); | |
| 12936 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Campaign re
sponse) { | |
| 12937 checkCampaign(response); | |
| 12938 }))); | |
| 12939 }); | |
| 12940 | |
| 12941 unittest.test("method--insert", () { | |
| 12942 | |
| 12943 var mock = new HttpServerMock(); | |
| 12944 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12945 var arg_request = buildCampaign(); | |
| 12946 var arg_profileId = "foo"; | |
| 12947 var arg_defaultLandingPageName = "foo"; | |
| 12948 var arg_defaultLandingPageUrl = "foo"; | |
| 12949 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12950 var obj = new api.Campaign.fromJson(json); | |
| 12951 checkCampaign(obj); | |
| 12952 | |
| 12953 var path = (req.url).path; | |
| 12954 var pathOffset = 0; | |
| 12955 var index; | |
| 12956 var subPart; | |
| 12957 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12958 pathOffset += 1; | |
| 12959 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 12960 pathOffset += 18; | |
| 12961 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12962 pathOffset += 13; | |
| 12963 index = path.indexOf("/campaigns", pathOffset); | |
| 12964 unittest.expect(index >= 0, unittest.isTrue); | |
| 12965 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12966 pathOffset = index; | |
| 12967 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12968 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 12969 pathOffset += 10; | |
| 12970 | |
| 12971 var query = (req.url).query; | |
| 12972 var queryOffset = 0; | |
| 12973 var queryMap = {}; | |
| 12974 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12975 parseBool(n) { | |
| 12976 if (n == "true") return true; | |
| 12977 if (n == "false") return false; | |
| 12978 if (n == null) return null; | |
| 12979 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12980 } | |
| 12981 if (query.length > 0) { | |
| 12982 for (var part in query.split("&")) { | |
| 12983 var keyvalue = part.split("="); | |
| 12984 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12985 } | |
| 12986 } | |
| 12987 unittest.expect(queryMap["defaultLandingPageName"].first, unittest.equal
s(arg_defaultLandingPageName)); | |
| 12988 unittest.expect(queryMap["defaultLandingPageUrl"].first, unittest.equals
(arg_defaultLandingPageUrl)); | |
| 12989 | |
| 12990 | |
| 12991 var h = { | |
| 12992 "content-type" : "application/json; charset=utf-8", | |
| 12993 }; | |
| 12994 var resp = convert.JSON.encode(buildCampaign()); | |
| 12995 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12996 }), true); | |
| 12997 res.insert(arg_request, arg_profileId, arg_defaultLandingPageName, arg_def
aultLandingPageUrl).then(unittest.expectAsync(((api.Campaign response) { | |
| 12998 checkCampaign(response); | |
| 12999 }))); | |
| 13000 }); | |
| 13001 | |
| 13002 unittest.test("method--list", () { | |
| 13003 | |
| 13004 var mock = new HttpServerMock(); | |
| 13005 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13006 var arg_profileId = "foo"; | |
| 13007 var arg_advertiserGroupIds = buildUnnamed2081(); | |
| 13008 var arg_advertiserIds = buildUnnamed2082(); | |
| 13009 var arg_archived = true; | |
| 13010 var arg_atLeastOneOptimizationActivity = true; | |
| 13011 var arg_excludedIds = buildUnnamed2083(); | |
| 13012 var arg_ids = buildUnnamed2084(); | |
| 13013 var arg_maxResults = 42; | |
| 13014 var arg_overriddenEventTagId = "foo"; | |
| 13015 var arg_pageToken = "foo"; | |
| 13016 var arg_searchString = "foo"; | |
| 13017 var arg_sortField = "foo"; | |
| 13018 var arg_sortOrder = "foo"; | |
| 13019 var arg_subaccountId = "foo"; | |
| 13020 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13021 var path = (req.url).path; | |
| 13022 var pathOffset = 0; | |
| 13023 var index; | |
| 13024 var subPart; | |
| 13025 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13026 pathOffset += 1; | |
| 13027 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13028 pathOffset += 18; | |
| 13029 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13030 pathOffset += 13; | |
| 13031 index = path.indexOf("/campaigns", pathOffset); | |
| 13032 unittest.expect(index >= 0, unittest.isTrue); | |
| 13033 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13034 pathOffset = index; | |
| 13035 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13036 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13037 pathOffset += 10; | |
| 13038 | |
| 13039 var query = (req.url).query; | |
| 13040 var queryOffset = 0; | |
| 13041 var queryMap = {}; | |
| 13042 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13043 parseBool(n) { | |
| 13044 if (n == "true") return true; | |
| 13045 if (n == "false") return false; | |
| 13046 if (n == null) return null; | |
| 13047 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13048 } | |
| 13049 if (query.length > 0) { | |
| 13050 for (var part in query.split("&")) { | |
| 13051 var keyvalue = part.split("="); | |
| 13052 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13053 } | |
| 13054 } | |
| 13055 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 13056 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 13057 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 13058 unittest.expect(queryMap["atLeastOneOptimizationActivity"].first, unitte
st.equals("$arg_atLeastOneOptimizationActivity")); | |
| 13059 unittest.expect(queryMap["excludedIds"], unittest.equals(arg_excludedIds
)); | |
| 13060 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13061 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13062 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 13063 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13064 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13065 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13066 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13067 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 13068 | |
| 13069 | |
| 13070 var h = { | |
| 13071 "content-type" : "application/json; charset=utf-8", | |
| 13072 }; | |
| 13073 var resp = convert.JSON.encode(buildCampaignsListResponse()); | |
| 13074 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13075 }), true); | |
| 13076 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) { | |
| 13077 checkCampaignsListResponse(response); | |
| 13078 }))); | |
| 13079 }); | |
| 13080 | |
| 13081 unittest.test("method--patch", () { | |
| 13082 | |
| 13083 var mock = new HttpServerMock(); | |
| 13084 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13085 var arg_request = buildCampaign(); | |
| 13086 var arg_profileId = "foo"; | |
| 13087 var arg_id = "foo"; | |
| 13088 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13089 var obj = new api.Campaign.fromJson(json); | |
| 13090 checkCampaign(obj); | |
| 13091 | |
| 13092 var path = (req.url).path; | |
| 13093 var pathOffset = 0; | |
| 13094 var index; | |
| 13095 var subPart; | |
| 13096 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13097 pathOffset += 1; | |
| 13098 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13099 pathOffset += 18; | |
| 13100 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13101 pathOffset += 13; | |
| 13102 index = path.indexOf("/campaigns", pathOffset); | |
| 13103 unittest.expect(index >= 0, unittest.isTrue); | |
| 13104 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13105 pathOffset = index; | |
| 13106 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13107 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13108 pathOffset += 10; | |
| 13109 | |
| 13110 var query = (req.url).query; | |
| 13111 var queryOffset = 0; | |
| 13112 var queryMap = {}; | |
| 13113 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13114 parseBool(n) { | |
| 13115 if (n == "true") return true; | |
| 13116 if (n == "false") return false; | |
| 13117 if (n == null) return null; | |
| 13118 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13119 } | |
| 13120 if (query.length > 0) { | |
| 13121 for (var part in query.split("&")) { | |
| 13122 var keyvalue = part.split("="); | |
| 13123 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13124 } | |
| 13125 } | |
| 13126 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13127 | |
| 13128 | |
| 13129 var h = { | |
| 13130 "content-type" : "application/json; charset=utf-8", | |
| 13131 }; | |
| 13132 var resp = convert.JSON.encode(buildCampaign()); | |
| 13133 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13134 }), true); | |
| 13135 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Campaign response) { | |
| 13136 checkCampaign(response); | |
| 13137 }))); | |
| 13138 }); | |
| 13139 | |
| 13140 unittest.test("method--update", () { | |
| 13141 | |
| 13142 var mock = new HttpServerMock(); | |
| 13143 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13144 var arg_request = buildCampaign(); | |
| 13145 var arg_profileId = "foo"; | |
| 13146 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13147 var obj = new api.Campaign.fromJson(json); | |
| 13148 checkCampaign(obj); | |
| 13149 | |
| 13150 var path = (req.url).path; | |
| 13151 var pathOffset = 0; | |
| 13152 var index; | |
| 13153 var subPart; | |
| 13154 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13155 pathOffset += 1; | |
| 13156 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13157 pathOffset += 18; | |
| 13158 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13159 pathOffset += 13; | |
| 13160 index = path.indexOf("/campaigns", pathOffset); | |
| 13161 unittest.expect(index >= 0, unittest.isTrue); | |
| 13162 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13163 pathOffset = index; | |
| 13164 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13165 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13166 pathOffset += 10; | |
| 13167 | |
| 13168 var query = (req.url).query; | |
| 13169 var queryOffset = 0; | |
| 13170 var queryMap = {}; | |
| 13171 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13172 parseBool(n) { | |
| 13173 if (n == "true") return true; | |
| 13174 if (n == "false") return false; | |
| 13175 if (n == null) return null; | |
| 13176 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13177 } | |
| 13178 if (query.length > 0) { | |
| 13179 for (var part in query.split("&")) { | |
| 13180 var keyvalue = part.split("="); | |
| 13181 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13182 } | |
| 13183 } | |
| 13184 | |
| 13185 | |
| 13186 var h = { | |
| 13187 "content-type" : "application/json; charset=utf-8", | |
| 13188 }; | |
| 13189 var resp = convert.JSON.encode(buildCampaign()); | |
| 13190 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13191 }), true); | |
| 13192 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cam
paign response) { | |
| 13193 checkCampaign(response); | |
| 13194 }))); | |
| 13195 }); | |
| 13196 | |
| 13197 }); | |
| 13198 | |
| 13199 | |
| 13200 unittest.group("resource-ChangeLogsResourceApi", () { | |
| 13201 unittest.test("method--get", () { | |
| 13202 | |
| 13203 var mock = new HttpServerMock(); | |
| 13204 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13205 var arg_profileId = "foo"; | |
| 13206 var arg_id = "foo"; | |
| 13207 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13208 var path = (req.url).path; | |
| 13209 var pathOffset = 0; | |
| 13210 var index; | |
| 13211 var subPart; | |
| 13212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13213 pathOffset += 1; | |
| 13214 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13215 pathOffset += 18; | |
| 13216 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13217 pathOffset += 13; | |
| 13218 index = path.indexOf("/changeLogs/", pathOffset); | |
| 13219 unittest.expect(index >= 0, unittest.isTrue); | |
| 13220 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13221 pathOffset = index; | |
| 13222 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13223 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/changeLogs/")); | |
| 13224 pathOffset += 12; | |
| 13225 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13226 pathOffset = path.length; | |
| 13227 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13228 | |
| 13229 var query = (req.url).query; | |
| 13230 var queryOffset = 0; | |
| 13231 var queryMap = {}; | |
| 13232 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13233 parseBool(n) { | |
| 13234 if (n == "true") return true; | |
| 13235 if (n == "false") return false; | |
| 13236 if (n == null) return null; | |
| 13237 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13238 } | |
| 13239 if (query.length > 0) { | |
| 13240 for (var part in query.split("&")) { | |
| 13241 var keyvalue = part.split("="); | |
| 13242 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13243 } | |
| 13244 } | |
| 13245 | |
| 13246 | |
| 13247 var h = { | |
| 13248 "content-type" : "application/json; charset=utf-8", | |
| 13249 }; | |
| 13250 var resp = convert.JSON.encode(buildChangeLog()); | |
| 13251 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13252 }), true); | |
| 13253 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ChangeLog r
esponse) { | |
| 13254 checkChangeLog(response); | |
| 13255 }))); | |
| 13256 }); | |
| 13257 | |
| 13258 unittest.test("method--list", () { | |
| 13259 | |
| 13260 var mock = new HttpServerMock(); | |
| 13261 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13262 var arg_profileId = "foo"; | |
| 13263 var arg_action = "foo"; | |
| 13264 var arg_ids = buildUnnamed2085(); | |
| 13265 var arg_maxChangeTime = "foo"; | |
| 13266 var arg_maxResults = 42; | |
| 13267 var arg_minChangeTime = "foo"; | |
| 13268 var arg_objectIds = buildUnnamed2086(); | |
| 13269 var arg_objectType = "foo"; | |
| 13270 var arg_pageToken = "foo"; | |
| 13271 var arg_searchString = "foo"; | |
| 13272 var arg_userProfileIds = buildUnnamed2087(); | |
| 13273 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13274 var path = (req.url).path; | |
| 13275 var pathOffset = 0; | |
| 13276 var index; | |
| 13277 var subPart; | |
| 13278 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13279 pathOffset += 1; | |
| 13280 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13281 pathOffset += 18; | |
| 13282 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13283 pathOffset += 13; | |
| 13284 index = path.indexOf("/changeLogs", pathOffset); | |
| 13285 unittest.expect(index >= 0, unittest.isTrue); | |
| 13286 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13287 pathOffset = index; | |
| 13288 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13289 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/changeLogs")); | |
| 13290 pathOffset += 11; | |
| 13291 | |
| 13292 var query = (req.url).query; | |
| 13293 var queryOffset = 0; | |
| 13294 var queryMap = {}; | |
| 13295 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13296 parseBool(n) { | |
| 13297 if (n == "true") return true; | |
| 13298 if (n == "false") return false; | |
| 13299 if (n == null) return null; | |
| 13300 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13301 } | |
| 13302 if (query.length > 0) { | |
| 13303 for (var part in query.split("&")) { | |
| 13304 var keyvalue = part.split("="); | |
| 13305 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13306 } | |
| 13307 } | |
| 13308 unittest.expect(queryMap["action"].first, unittest.equals(arg_action)); | |
| 13309 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13310 unittest.expect(queryMap["maxChangeTime"].first, unittest.equals(arg_max
ChangeTime)); | |
| 13311 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13312 unittest.expect(queryMap["minChangeTime"].first, unittest.equals(arg_min
ChangeTime)); | |
| 13313 unittest.expect(queryMap["objectIds"], unittest.equals(arg_objectIds)); | |
| 13314 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 13315 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13316 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13317 unittest.expect(queryMap["userProfileIds"], unittest.equals(arg_userProf
ileIds)); | |
| 13318 | |
| 13319 | |
| 13320 var h = { | |
| 13321 "content-type" : "application/json; charset=utf-8", | |
| 13322 }; | |
| 13323 var resp = convert.JSON.encode(buildChangeLogsListResponse()); | |
| 13324 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13325 }), true); | |
| 13326 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) { | |
| 13327 checkChangeLogsListResponse(response); | |
| 13328 }))); | |
| 13329 }); | |
| 13330 | |
| 13331 }); | |
| 13332 | |
| 13333 | |
| 13334 unittest.group("resource-CitiesResourceApi", () { | |
| 13335 unittest.test("method--list", () { | |
| 13336 | |
| 13337 var mock = new HttpServerMock(); | |
| 13338 api.CitiesResourceApi res = new api.DfareportingApi(mock).cities; | |
| 13339 var arg_profileId = "foo"; | |
| 13340 var arg_countryDartIds = buildUnnamed2088(); | |
| 13341 var arg_dartIds = buildUnnamed2089(); | |
| 13342 var arg_namePrefix = "foo"; | |
| 13343 var arg_regionDartIds = buildUnnamed2090(); | |
| 13344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13345 var path = (req.url).path; | |
| 13346 var pathOffset = 0; | |
| 13347 var index; | |
| 13348 var subPart; | |
| 13349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13350 pathOffset += 1; | |
| 13351 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13352 pathOffset += 18; | |
| 13353 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13354 pathOffset += 13; | |
| 13355 index = path.indexOf("/cities", pathOffset); | |
| 13356 unittest.expect(index >= 0, unittest.isTrue); | |
| 13357 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13358 pathOffset = index; | |
| 13359 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13360 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/cities")); | |
| 13361 pathOffset += 7; | |
| 13362 | |
| 13363 var query = (req.url).query; | |
| 13364 var queryOffset = 0; | |
| 13365 var queryMap = {}; | |
| 13366 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13367 parseBool(n) { | |
| 13368 if (n == "true") return true; | |
| 13369 if (n == "false") return false; | |
| 13370 if (n == null) return null; | |
| 13371 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13372 } | |
| 13373 if (query.length > 0) { | |
| 13374 for (var part in query.split("&")) { | |
| 13375 var keyvalue = part.split("="); | |
| 13376 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13377 } | |
| 13378 } | |
| 13379 unittest.expect(queryMap["countryDartIds"], unittest.equals(arg_countryD
artIds)); | |
| 13380 unittest.expect(queryMap["dartIds"], unittest.equals(arg_dartIds)); | |
| 13381 unittest.expect(queryMap["namePrefix"].first, unittest.equals(arg_namePr
efix)); | |
| 13382 unittest.expect(queryMap["regionDartIds"], unittest.equals(arg_regionDar
tIds)); | |
| 13383 | |
| 13384 | |
| 13385 var h = { | |
| 13386 "content-type" : "application/json; charset=utf-8", | |
| 13387 }; | |
| 13388 var resp = convert.JSON.encode(buildCitiesListResponse()); | |
| 13389 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13390 }), true); | |
| 13391 res.list(arg_profileId, countryDartIds: arg_countryDartIds, dartIds: arg_d
artIds, namePrefix: arg_namePrefix, regionDartIds: arg_regionDartIds).then(unitt
est.expectAsync(((api.CitiesListResponse response) { | |
| 13392 checkCitiesListResponse(response); | |
| 13393 }))); | |
| 13394 }); | |
| 13395 | |
| 13396 }); | |
| 13397 | |
| 13398 | |
| 13399 unittest.group("resource-ConnectionTypesResourceApi", () { | |
| 13400 unittest.test("method--get", () { | |
| 13401 | |
| 13402 var mock = new HttpServerMock(); | |
| 13403 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13404 var arg_profileId = "foo"; | |
| 13405 var arg_id = "foo"; | |
| 13406 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13407 var path = (req.url).path; | |
| 13408 var pathOffset = 0; | |
| 13409 var index; | |
| 13410 var subPart; | |
| 13411 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13412 pathOffset += 1; | |
| 13413 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13414 pathOffset += 18; | |
| 13415 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13416 pathOffset += 13; | |
| 13417 index = path.indexOf("/connectionTypes/", pathOffset); | |
| 13418 unittest.expect(index >= 0, unittest.isTrue); | |
| 13419 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13420 pathOffset = index; | |
| 13421 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13422 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/connectionTypes/")); | |
| 13423 pathOffset += 17; | |
| 13424 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13425 pathOffset = path.length; | |
| 13426 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13427 | |
| 13428 var query = (req.url).query; | |
| 13429 var queryOffset = 0; | |
| 13430 var queryMap = {}; | |
| 13431 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13432 parseBool(n) { | |
| 13433 if (n == "true") return true; | |
| 13434 if (n == "false") return false; | |
| 13435 if (n == null) return null; | |
| 13436 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13437 } | |
| 13438 if (query.length > 0) { | |
| 13439 for (var part in query.split("&")) { | |
| 13440 var keyvalue = part.split("="); | |
| 13441 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13442 } | |
| 13443 } | |
| 13444 | |
| 13445 | |
| 13446 var h = { | |
| 13447 "content-type" : "application/json; charset=utf-8", | |
| 13448 }; | |
| 13449 var resp = convert.JSON.encode(buildConnectionType()); | |
| 13450 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13451 }), true); | |
| 13452 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ConnectionT
ype response) { | |
| 13453 checkConnectionType(response); | |
| 13454 }))); | |
| 13455 }); | |
| 13456 | |
| 13457 unittest.test("method--list", () { | |
| 13458 | |
| 13459 var mock = new HttpServerMock(); | |
| 13460 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13461 var arg_profileId = "foo"; | |
| 13462 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13463 var path = (req.url).path; | |
| 13464 var pathOffset = 0; | |
| 13465 var index; | |
| 13466 var subPart; | |
| 13467 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13468 pathOffset += 1; | |
| 13469 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13470 pathOffset += 18; | |
| 13471 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13472 pathOffset += 13; | |
| 13473 index = path.indexOf("/connectionTypes", pathOffset); | |
| 13474 unittest.expect(index >= 0, unittest.isTrue); | |
| 13475 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13476 pathOffset = index; | |
| 13477 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13478 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/connectionTypes")); | |
| 13479 pathOffset += 16; | |
| 13480 | |
| 13481 var query = (req.url).query; | |
| 13482 var queryOffset = 0; | |
| 13483 var queryMap = {}; | |
| 13484 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13485 parseBool(n) { | |
| 13486 if (n == "true") return true; | |
| 13487 if (n == "false") return false; | |
| 13488 if (n == null) return null; | |
| 13489 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13490 } | |
| 13491 if (query.length > 0) { | |
| 13492 for (var part in query.split("&")) { | |
| 13493 var keyvalue = part.split("="); | |
| 13494 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13495 } | |
| 13496 } | |
| 13497 | |
| 13498 | |
| 13499 var h = { | |
| 13500 "content-type" : "application/json; charset=utf-8", | |
| 13501 }; | |
| 13502 var resp = convert.JSON.encode(buildConnectionTypesListResponse()); | |
| 13503 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13504 }), true); | |
| 13505 res.list(arg_profileId).then(unittest.expectAsync(((api.ConnectionTypesLis
tResponse response) { | |
| 13506 checkConnectionTypesListResponse(response); | |
| 13507 }))); | |
| 13508 }); | |
| 13509 | |
| 13510 }); | |
| 13511 | |
| 13512 | |
| 13513 unittest.group("resource-ContentCategoriesResourceApi", () { | |
| 13514 unittest.test("method--delete", () { | |
| 13515 | |
| 13516 var mock = new HttpServerMock(); | |
| 13517 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13518 var arg_profileId = "foo"; | |
| 13519 var arg_id = "foo"; | |
| 13520 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13521 var path = (req.url).path; | |
| 13522 var pathOffset = 0; | |
| 13523 var index; | |
| 13524 var subPart; | |
| 13525 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13526 pathOffset += 1; | |
| 13527 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13528 pathOffset += 18; | |
| 13529 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13530 pathOffset += 13; | |
| 13531 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13532 unittest.expect(index >= 0, unittest.isTrue); | |
| 13533 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13534 pathOffset = index; | |
| 13535 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13536 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13537 pathOffset += 19; | |
| 13538 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13539 pathOffset = path.length; | |
| 13540 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13541 | |
| 13542 var query = (req.url).query; | |
| 13543 var queryOffset = 0; | |
| 13544 var queryMap = {}; | |
| 13545 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13546 parseBool(n) { | |
| 13547 if (n == "true") return true; | |
| 13548 if (n == "false") return false; | |
| 13549 if (n == null) return null; | |
| 13550 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13551 } | |
| 13552 if (query.length > 0) { | |
| 13553 for (var part in query.split("&")) { | |
| 13554 var keyvalue = part.split("="); | |
| 13555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13556 } | |
| 13557 } | |
| 13558 | |
| 13559 | |
| 13560 var h = { | |
| 13561 "content-type" : "application/json; charset=utf-8", | |
| 13562 }; | |
| 13563 var resp = ""; | |
| 13564 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13565 }), true); | |
| 13566 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 13567 }); | |
| 13568 | |
| 13569 unittest.test("method--get", () { | |
| 13570 | |
| 13571 var mock = new HttpServerMock(); | |
| 13572 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13573 var arg_profileId = "foo"; | |
| 13574 var arg_id = "foo"; | |
| 13575 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13576 var path = (req.url).path; | |
| 13577 var pathOffset = 0; | |
| 13578 var index; | |
| 13579 var subPart; | |
| 13580 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13581 pathOffset += 1; | |
| 13582 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13583 pathOffset += 18; | |
| 13584 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13585 pathOffset += 13; | |
| 13586 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13587 unittest.expect(index >= 0, unittest.isTrue); | |
| 13588 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13589 pathOffset = index; | |
| 13590 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13591 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13592 pathOffset += 19; | |
| 13593 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13594 pathOffset = path.length; | |
| 13595 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13596 | |
| 13597 var query = (req.url).query; | |
| 13598 var queryOffset = 0; | |
| 13599 var queryMap = {}; | |
| 13600 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13601 parseBool(n) { | |
| 13602 if (n == "true") return true; | |
| 13603 if (n == "false") return false; | |
| 13604 if (n == null) return null; | |
| 13605 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13606 } | |
| 13607 if (query.length > 0) { | |
| 13608 for (var part in query.split("&")) { | |
| 13609 var keyvalue = part.split("="); | |
| 13610 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13611 } | |
| 13612 } | |
| 13613 | |
| 13614 | |
| 13615 var h = { | |
| 13616 "content-type" : "application/json; charset=utf-8", | |
| 13617 }; | |
| 13618 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13619 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13620 }), true); | |
| 13621 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ContentCate
gory response) { | |
| 13622 checkContentCategory(response); | |
| 13623 }))); | |
| 13624 }); | |
| 13625 | |
| 13626 unittest.test("method--insert", () { | |
| 13627 | |
| 13628 var mock = new HttpServerMock(); | |
| 13629 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13630 var arg_request = buildContentCategory(); | |
| 13631 var arg_profileId = "foo"; | |
| 13632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13633 var obj = new api.ContentCategory.fromJson(json); | |
| 13634 checkContentCategory(obj); | |
| 13635 | |
| 13636 var path = (req.url).path; | |
| 13637 var pathOffset = 0; | |
| 13638 var index; | |
| 13639 var subPart; | |
| 13640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13641 pathOffset += 1; | |
| 13642 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13643 pathOffset += 18; | |
| 13644 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13645 pathOffset += 13; | |
| 13646 index = path.indexOf("/contentCategories", pathOffset); | |
| 13647 unittest.expect(index >= 0, unittest.isTrue); | |
| 13648 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13649 pathOffset = index; | |
| 13650 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13651 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13652 pathOffset += 18; | |
| 13653 | |
| 13654 var query = (req.url).query; | |
| 13655 var queryOffset = 0; | |
| 13656 var queryMap = {}; | |
| 13657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13658 parseBool(n) { | |
| 13659 if (n == "true") return true; | |
| 13660 if (n == "false") return false; | |
| 13661 if (n == null) return null; | |
| 13662 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13663 } | |
| 13664 if (query.length > 0) { | |
| 13665 for (var part in query.split("&")) { | |
| 13666 var keyvalue = part.split("="); | |
| 13667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13668 } | |
| 13669 } | |
| 13670 | |
| 13671 | |
| 13672 var h = { | |
| 13673 "content-type" : "application/json; charset=utf-8", | |
| 13674 }; | |
| 13675 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13676 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13677 }), true); | |
| 13678 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13679 checkContentCategory(response); | |
| 13680 }))); | |
| 13681 }); | |
| 13682 | |
| 13683 unittest.test("method--list", () { | |
| 13684 | |
| 13685 var mock = new HttpServerMock(); | |
| 13686 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13687 var arg_profileId = "foo"; | |
| 13688 var arg_ids = buildUnnamed2091(); | |
| 13689 var arg_maxResults = 42; | |
| 13690 var arg_pageToken = "foo"; | |
| 13691 var arg_searchString = "foo"; | |
| 13692 var arg_sortField = "foo"; | |
| 13693 var arg_sortOrder = "foo"; | |
| 13694 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13695 var path = (req.url).path; | |
| 13696 var pathOffset = 0; | |
| 13697 var index; | |
| 13698 var subPart; | |
| 13699 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13700 pathOffset += 1; | |
| 13701 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13702 pathOffset += 18; | |
| 13703 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13704 pathOffset += 13; | |
| 13705 index = path.indexOf("/contentCategories", pathOffset); | |
| 13706 unittest.expect(index >= 0, unittest.isTrue); | |
| 13707 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13708 pathOffset = index; | |
| 13709 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13710 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13711 pathOffset += 18; | |
| 13712 | |
| 13713 var query = (req.url).query; | |
| 13714 var queryOffset = 0; | |
| 13715 var queryMap = {}; | |
| 13716 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13717 parseBool(n) { | |
| 13718 if (n == "true") return true; | |
| 13719 if (n == "false") return false; | |
| 13720 if (n == null) return null; | |
| 13721 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13722 } | |
| 13723 if (query.length > 0) { | |
| 13724 for (var part in query.split("&")) { | |
| 13725 var keyvalue = part.split("="); | |
| 13726 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13727 } | |
| 13728 } | |
| 13729 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13730 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13731 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13732 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13733 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13734 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13735 | |
| 13736 | |
| 13737 var h = { | |
| 13738 "content-type" : "application/json; charset=utf-8", | |
| 13739 }; | |
| 13740 var resp = convert.JSON.encode(buildContentCategoriesListResponse()); | |
| 13741 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13742 }), true); | |
| 13743 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) { | |
| 13744 checkContentCategoriesListResponse(response); | |
| 13745 }))); | |
| 13746 }); | |
| 13747 | |
| 13748 unittest.test("method--patch", () { | |
| 13749 | |
| 13750 var mock = new HttpServerMock(); | |
| 13751 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13752 var arg_request = buildContentCategory(); | |
| 13753 var arg_profileId = "foo"; | |
| 13754 var arg_id = "foo"; | |
| 13755 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13756 var obj = new api.ContentCategory.fromJson(json); | |
| 13757 checkContentCategory(obj); | |
| 13758 | |
| 13759 var path = (req.url).path; | |
| 13760 var pathOffset = 0; | |
| 13761 var index; | |
| 13762 var subPart; | |
| 13763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13764 pathOffset += 1; | |
| 13765 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13766 pathOffset += 18; | |
| 13767 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13768 pathOffset += 13; | |
| 13769 index = path.indexOf("/contentCategories", pathOffset); | |
| 13770 unittest.expect(index >= 0, unittest.isTrue); | |
| 13771 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13772 pathOffset = index; | |
| 13773 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13774 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13775 pathOffset += 18; | |
| 13776 | |
| 13777 var query = (req.url).query; | |
| 13778 var queryOffset = 0; | |
| 13779 var queryMap = {}; | |
| 13780 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13781 parseBool(n) { | |
| 13782 if (n == "true") return true; | |
| 13783 if (n == "false") return false; | |
| 13784 if (n == null) return null; | |
| 13785 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13786 } | |
| 13787 if (query.length > 0) { | |
| 13788 for (var part in query.split("&")) { | |
| 13789 var keyvalue = part.split("="); | |
| 13790 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13791 } | |
| 13792 } | |
| 13793 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13794 | |
| 13795 | |
| 13796 var h = { | |
| 13797 "content-type" : "application/json; charset=utf-8", | |
| 13798 }; | |
| 13799 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13800 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13801 }), true); | |
| 13802 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.ContentCategory response) { | |
| 13803 checkContentCategory(response); | |
| 13804 }))); | |
| 13805 }); | |
| 13806 | |
| 13807 unittest.test("method--update", () { | |
| 13808 | |
| 13809 var mock = new HttpServerMock(); | |
| 13810 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13811 var arg_request = buildContentCategory(); | |
| 13812 var arg_profileId = "foo"; | |
| 13813 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13814 var obj = new api.ContentCategory.fromJson(json); | |
| 13815 checkContentCategory(obj); | |
| 13816 | |
| 13817 var path = (req.url).path; | |
| 13818 var pathOffset = 0; | |
| 13819 var index; | |
| 13820 var subPart; | |
| 13821 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13822 pathOffset += 1; | |
| 13823 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13824 pathOffset += 18; | |
| 13825 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13826 pathOffset += 13; | |
| 13827 index = path.indexOf("/contentCategories", pathOffset); | |
| 13828 unittest.expect(index >= 0, unittest.isTrue); | |
| 13829 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13830 pathOffset = index; | |
| 13831 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13832 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13833 pathOffset += 18; | |
| 13834 | |
| 13835 var query = (req.url).query; | |
| 13836 var queryOffset = 0; | |
| 13837 var queryMap = {}; | |
| 13838 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13839 parseBool(n) { | |
| 13840 if (n == "true") return true; | |
| 13841 if (n == "false") return false; | |
| 13842 if (n == null) return null; | |
| 13843 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13844 } | |
| 13845 if (query.length > 0) { | |
| 13846 for (var part in query.split("&")) { | |
| 13847 var keyvalue = part.split("="); | |
| 13848 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13849 } | |
| 13850 } | |
| 13851 | |
| 13852 | |
| 13853 var h = { | |
| 13854 "content-type" : "application/json; charset=utf-8", | |
| 13855 }; | |
| 13856 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13857 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13858 }), true); | |
| 13859 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13860 checkContentCategory(response); | |
| 13861 }))); | |
| 13862 }); | |
| 13863 | |
| 13864 }); | |
| 13865 | |
| 13866 | |
| 13867 unittest.group("resource-CountriesResourceApi", () { | |
| 13868 unittest.test("method--get", () { | |
| 13869 | |
| 13870 var mock = new HttpServerMock(); | |
| 13871 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13872 var arg_profileId = "foo"; | |
| 13873 var arg_dartId = "foo"; | |
| 13874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13875 var path = (req.url).path; | |
| 13876 var pathOffset = 0; | |
| 13877 var index; | |
| 13878 var subPart; | |
| 13879 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13880 pathOffset += 1; | |
| 13881 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13882 pathOffset += 18; | |
| 13883 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13884 pathOffset += 13; | |
| 13885 index = path.indexOf("/countries/", pathOffset); | |
| 13886 unittest.expect(index >= 0, unittest.isTrue); | |
| 13887 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13888 pathOffset = index; | |
| 13889 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13890 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/countries/")); | |
| 13891 pathOffset += 11; | |
| 13892 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13893 pathOffset = path.length; | |
| 13894 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 13895 | |
| 13896 var query = (req.url).query; | |
| 13897 var queryOffset = 0; | |
| 13898 var queryMap = {}; | |
| 13899 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13900 parseBool(n) { | |
| 13901 if (n == "true") return true; | |
| 13902 if (n == "false") return false; | |
| 13903 if (n == null) return null; | |
| 13904 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13905 } | |
| 13906 if (query.length > 0) { | |
| 13907 for (var part in query.split("&")) { | |
| 13908 var keyvalue = part.split("="); | |
| 13909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13910 } | |
| 13911 } | |
| 13912 | |
| 13913 | |
| 13914 var h = { | |
| 13915 "content-type" : "application/json; charset=utf-8", | |
| 13916 }; | |
| 13917 var resp = convert.JSON.encode(buildCountry()); | |
| 13918 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13919 }), true); | |
| 13920 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Country
response) { | |
| 13921 checkCountry(response); | |
| 13922 }))); | |
| 13923 }); | |
| 13924 | |
| 13925 unittest.test("method--list", () { | |
| 13926 | |
| 13927 var mock = new HttpServerMock(); | |
| 13928 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13929 var arg_profileId = "foo"; | |
| 13930 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13931 var path = (req.url).path; | |
| 13932 var pathOffset = 0; | |
| 13933 var index; | |
| 13934 var subPart; | |
| 13935 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13936 pathOffset += 1; | |
| 13937 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 13938 pathOffset += 18; | |
| 13939 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13940 pathOffset += 13; | |
| 13941 index = path.indexOf("/countries", pathOffset); | |
| 13942 unittest.expect(index >= 0, unittest.isTrue); | |
| 13943 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13944 pathOffset = index; | |
| 13945 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13946 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/countries")); | |
| 13947 pathOffset += 10; | |
| 13948 | |
| 13949 var query = (req.url).query; | |
| 13950 var queryOffset = 0; | |
| 13951 var queryMap = {}; | |
| 13952 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13953 parseBool(n) { | |
| 13954 if (n == "true") return true; | |
| 13955 if (n == "false") return false; | |
| 13956 if (n == null) return null; | |
| 13957 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13958 } | |
| 13959 if (query.length > 0) { | |
| 13960 for (var part in query.split("&")) { | |
| 13961 var keyvalue = part.split("="); | |
| 13962 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13963 } | |
| 13964 } | |
| 13965 | |
| 13966 | |
| 13967 var h = { | |
| 13968 "content-type" : "application/json; charset=utf-8", | |
| 13969 }; | |
| 13970 var resp = convert.JSON.encode(buildCountriesListResponse()); | |
| 13971 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13972 }), true); | |
| 13973 res.list(arg_profileId).then(unittest.expectAsync(((api.CountriesListRespo
nse response) { | |
| 13974 checkCountriesListResponse(response); | |
| 13975 }))); | |
| 13976 }); | |
| 13977 | |
| 13978 }); | |
| 13979 | |
| 13980 | |
| 13981 unittest.group("resource-CreativeAssetsResourceApi", () { | |
| 13982 unittest.test("method--insert", () { | |
| 13983 // TODO: Implement tests for media upload; | |
| 13984 // TODO: Implement tests for media download; | |
| 13985 | |
| 13986 var mock = new HttpServerMock(); | |
| 13987 api.CreativeAssetsResourceApi res = new api.DfareportingApi(mock).creative
Assets; | |
| 13988 var arg_request = buildCreativeAssetMetadata(); | |
| 13989 var arg_profileId = "foo"; | |
| 13990 var arg_advertiserId = "foo"; | |
| 13991 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13992 var obj = new api.CreativeAssetMetadata.fromJson(json); | |
| 13993 checkCreativeAssetMetadata(obj); | |
| 13994 | |
| 13995 var path = (req.url).path; | |
| 13996 var pathOffset = 0; | |
| 13997 var index; | |
| 13998 var subPart; | |
| 13999 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14000 pathOffset += 1; | |
| 14001 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14002 pathOffset += 18; | |
| 14003 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14004 pathOffset += 13; | |
| 14005 index = path.indexOf("/creativeAssets/", pathOffset); | |
| 14006 unittest.expect(index >= 0, unittest.isTrue); | |
| 14007 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14008 pathOffset = index; | |
| 14009 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14010 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeAssets/")); | |
| 14011 pathOffset += 16; | |
| 14012 index = path.indexOf("/creativeAssets", pathOffset); | |
| 14013 unittest.expect(index >= 0, unittest.isTrue); | |
| 14014 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14015 pathOffset = index; | |
| 14016 unittest.expect(subPart, unittest.equals("$arg_advertiserId")); | |
| 14017 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeAssets")); | |
| 14018 pathOffset += 15; | |
| 14019 | |
| 14020 var query = (req.url).query; | |
| 14021 var queryOffset = 0; | |
| 14022 var queryMap = {}; | |
| 14023 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14024 parseBool(n) { | |
| 14025 if (n == "true") return true; | |
| 14026 if (n == "false") return false; | |
| 14027 if (n == null) return null; | |
| 14028 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14029 } | |
| 14030 if (query.length > 0) { | |
| 14031 for (var part in query.split("&")) { | |
| 14032 var keyvalue = part.split("="); | |
| 14033 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14034 } | |
| 14035 } | |
| 14036 | |
| 14037 | |
| 14038 var h = { | |
| 14039 "content-type" : "application/json; charset=utf-8", | |
| 14040 }; | |
| 14041 var resp = convert.JSON.encode(buildCreativeAssetMetadata()); | |
| 14042 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14043 }), true); | |
| 14044 res.insert(arg_request, arg_profileId, arg_advertiserId).then(unittest.exp
ectAsync(((api.CreativeAssetMetadata response) { | |
| 14045 checkCreativeAssetMetadata(response); | |
| 14046 }))); | |
| 14047 }); | |
| 14048 | |
| 14049 }); | |
| 14050 | |
| 14051 | |
| 14052 unittest.group("resource-CreativeFieldValuesResourceApi", () { | |
| 14053 unittest.test("method--delete", () { | |
| 14054 | |
| 14055 var mock = new HttpServerMock(); | |
| 14056 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14057 var arg_profileId = "foo"; | |
| 14058 var arg_creativeFieldId = "foo"; | |
| 14059 var arg_id = "foo"; | |
| 14060 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14061 var path = (req.url).path; | |
| 14062 var pathOffset = 0; | |
| 14063 var index; | |
| 14064 var subPart; | |
| 14065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14066 pathOffset += 1; | |
| 14067 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14068 pathOffset += 18; | |
| 14069 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14070 pathOffset += 13; | |
| 14071 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14072 unittest.expect(index >= 0, unittest.isTrue); | |
| 14073 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14074 pathOffset = index; | |
| 14075 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14076 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14077 pathOffset += 16; | |
| 14078 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14079 unittest.expect(index >= 0, unittest.isTrue); | |
| 14080 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14081 pathOffset = index; | |
| 14082 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14083 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14084 pathOffset += 21; | |
| 14085 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14086 pathOffset = path.length; | |
| 14087 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14088 | |
| 14089 var query = (req.url).query; | |
| 14090 var queryOffset = 0; | |
| 14091 var queryMap = {}; | |
| 14092 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14093 parseBool(n) { | |
| 14094 if (n == "true") return true; | |
| 14095 if (n == "false") return false; | |
| 14096 if (n == null) return null; | |
| 14097 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14098 } | |
| 14099 if (query.length > 0) { | |
| 14100 for (var part in query.split("&")) { | |
| 14101 var keyvalue = part.split("="); | |
| 14102 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14103 } | |
| 14104 } | |
| 14105 | |
| 14106 | |
| 14107 var h = { | |
| 14108 "content-type" : "application/json; charset=utf-8", | |
| 14109 }; | |
| 14110 var resp = ""; | |
| 14111 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14112 }), true); | |
| 14113 res.delete(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expec
tAsync((_) {})); | |
| 14114 }); | |
| 14115 | |
| 14116 unittest.test("method--get", () { | |
| 14117 | |
| 14118 var mock = new HttpServerMock(); | |
| 14119 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14120 var arg_profileId = "foo"; | |
| 14121 var arg_creativeFieldId = "foo"; | |
| 14122 var arg_id = "foo"; | |
| 14123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14124 var path = (req.url).path; | |
| 14125 var pathOffset = 0; | |
| 14126 var index; | |
| 14127 var subPart; | |
| 14128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14129 pathOffset += 1; | |
| 14130 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14131 pathOffset += 18; | |
| 14132 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14133 pathOffset += 13; | |
| 14134 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14135 unittest.expect(index >= 0, unittest.isTrue); | |
| 14136 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14137 pathOffset = index; | |
| 14138 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14139 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14140 pathOffset += 16; | |
| 14141 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14142 unittest.expect(index >= 0, unittest.isTrue); | |
| 14143 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14144 pathOffset = index; | |
| 14145 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14146 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14147 pathOffset += 21; | |
| 14148 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14149 pathOffset = path.length; | |
| 14150 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14151 | |
| 14152 var query = (req.url).query; | |
| 14153 var queryOffset = 0; | |
| 14154 var queryMap = {}; | |
| 14155 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14156 parseBool(n) { | |
| 14157 if (n == "true") return true; | |
| 14158 if (n == "false") return false; | |
| 14159 if (n == null) return null; | |
| 14160 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14161 } | |
| 14162 if (query.length > 0) { | |
| 14163 for (var part in query.split("&")) { | |
| 14164 var keyvalue = part.split("="); | |
| 14165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14166 } | |
| 14167 } | |
| 14168 | |
| 14169 | |
| 14170 var h = { | |
| 14171 "content-type" : "application/json; charset=utf-8", | |
| 14172 }; | |
| 14173 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14174 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14175 }), true); | |
| 14176 res.get(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expectAs
ync(((api.CreativeFieldValue response) { | |
| 14177 checkCreativeFieldValue(response); | |
| 14178 }))); | |
| 14179 }); | |
| 14180 | |
| 14181 unittest.test("method--insert", () { | |
| 14182 | |
| 14183 var mock = new HttpServerMock(); | |
| 14184 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14185 var arg_request = buildCreativeFieldValue(); | |
| 14186 var arg_profileId = "foo"; | |
| 14187 var arg_creativeFieldId = "foo"; | |
| 14188 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14189 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14190 checkCreativeFieldValue(obj); | |
| 14191 | |
| 14192 var path = (req.url).path; | |
| 14193 var pathOffset = 0; | |
| 14194 var index; | |
| 14195 var subPart; | |
| 14196 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14197 pathOffset += 1; | |
| 14198 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14199 pathOffset += 18; | |
| 14200 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14201 pathOffset += 13; | |
| 14202 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14203 unittest.expect(index >= 0, unittest.isTrue); | |
| 14204 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14205 pathOffset = index; | |
| 14206 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14207 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14208 pathOffset += 16; | |
| 14209 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14210 unittest.expect(index >= 0, unittest.isTrue); | |
| 14211 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14212 pathOffset = index; | |
| 14213 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14214 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14215 pathOffset += 20; | |
| 14216 | |
| 14217 var query = (req.url).query; | |
| 14218 var queryOffset = 0; | |
| 14219 var queryMap = {}; | |
| 14220 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14221 parseBool(n) { | |
| 14222 if (n == "true") return true; | |
| 14223 if (n == "false") return false; | |
| 14224 if (n == null) return null; | |
| 14225 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14226 } | |
| 14227 if (query.length > 0) { | |
| 14228 for (var part in query.split("&")) { | |
| 14229 var keyvalue = part.split("="); | |
| 14230 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14231 } | |
| 14232 } | |
| 14233 | |
| 14234 | |
| 14235 var h = { | |
| 14236 "content-type" : "application/json; charset=utf-8", | |
| 14237 }; | |
| 14238 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14239 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14240 }), true); | |
| 14241 res.insert(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14242 checkCreativeFieldValue(response); | |
| 14243 }))); | |
| 14244 }); | |
| 14245 | |
| 14246 unittest.test("method--list", () { | |
| 14247 | |
| 14248 var mock = new HttpServerMock(); | |
| 14249 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14250 var arg_profileId = "foo"; | |
| 14251 var arg_creativeFieldId = "foo"; | |
| 14252 var arg_ids = buildUnnamed2092(); | |
| 14253 var arg_maxResults = 42; | |
| 14254 var arg_pageToken = "foo"; | |
| 14255 var arg_searchString = "foo"; | |
| 14256 var arg_sortField = "foo"; | |
| 14257 var arg_sortOrder = "foo"; | |
| 14258 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14259 var path = (req.url).path; | |
| 14260 var pathOffset = 0; | |
| 14261 var index; | |
| 14262 var subPart; | |
| 14263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14264 pathOffset += 1; | |
| 14265 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14266 pathOffset += 18; | |
| 14267 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14268 pathOffset += 13; | |
| 14269 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14270 unittest.expect(index >= 0, unittest.isTrue); | |
| 14271 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14272 pathOffset = index; | |
| 14273 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14274 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14275 pathOffset += 16; | |
| 14276 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14277 unittest.expect(index >= 0, unittest.isTrue); | |
| 14278 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14279 pathOffset = index; | |
| 14280 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14281 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14282 pathOffset += 20; | |
| 14283 | |
| 14284 var query = (req.url).query; | |
| 14285 var queryOffset = 0; | |
| 14286 var queryMap = {}; | |
| 14287 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14288 parseBool(n) { | |
| 14289 if (n == "true") return true; | |
| 14290 if (n == "false") return false; | |
| 14291 if (n == null) return null; | |
| 14292 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14293 } | |
| 14294 if (query.length > 0) { | |
| 14295 for (var part in query.split("&")) { | |
| 14296 var keyvalue = part.split("="); | |
| 14297 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14298 } | |
| 14299 } | |
| 14300 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14301 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14302 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14303 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14304 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14305 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14306 | |
| 14307 | |
| 14308 var h = { | |
| 14309 "content-type" : "application/json; charset=utf-8", | |
| 14310 }; | |
| 14311 var resp = convert.JSON.encode(buildCreativeFieldValuesListResponse()); | |
| 14312 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14313 }), true); | |
| 14314 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) { | |
| 14315 checkCreativeFieldValuesListResponse(response); | |
| 14316 }))); | |
| 14317 }); | |
| 14318 | |
| 14319 unittest.test("method--patch", () { | |
| 14320 | |
| 14321 var mock = new HttpServerMock(); | |
| 14322 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14323 var arg_request = buildCreativeFieldValue(); | |
| 14324 var arg_profileId = "foo"; | |
| 14325 var arg_creativeFieldId = "foo"; | |
| 14326 var arg_id = "foo"; | |
| 14327 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14328 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14329 checkCreativeFieldValue(obj); | |
| 14330 | |
| 14331 var path = (req.url).path; | |
| 14332 var pathOffset = 0; | |
| 14333 var index; | |
| 14334 var subPart; | |
| 14335 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14336 pathOffset += 1; | |
| 14337 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14338 pathOffset += 18; | |
| 14339 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14340 pathOffset += 13; | |
| 14341 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14342 unittest.expect(index >= 0, unittest.isTrue); | |
| 14343 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14344 pathOffset = index; | |
| 14345 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14346 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14347 pathOffset += 16; | |
| 14348 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14349 unittest.expect(index >= 0, unittest.isTrue); | |
| 14350 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14351 pathOffset = index; | |
| 14352 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14353 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14354 pathOffset += 20; | |
| 14355 | |
| 14356 var query = (req.url).query; | |
| 14357 var queryOffset = 0; | |
| 14358 var queryMap = {}; | |
| 14359 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14360 parseBool(n) { | |
| 14361 if (n == "true") return true; | |
| 14362 if (n == "false") return false; | |
| 14363 if (n == null) return null; | |
| 14364 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14365 } | |
| 14366 if (query.length > 0) { | |
| 14367 for (var part in query.split("&")) { | |
| 14368 var keyvalue = part.split("="); | |
| 14369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14370 } | |
| 14371 } | |
| 14372 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14373 | |
| 14374 | |
| 14375 var h = { | |
| 14376 "content-type" : "application/json; charset=utf-8", | |
| 14377 }; | |
| 14378 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14379 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14380 }), true); | |
| 14381 res.patch(arg_request, arg_profileId, arg_creativeFieldId, arg_id).then(un
ittest.expectAsync(((api.CreativeFieldValue response) { | |
| 14382 checkCreativeFieldValue(response); | |
| 14383 }))); | |
| 14384 }); | |
| 14385 | |
| 14386 unittest.test("method--update", () { | |
| 14387 | |
| 14388 var mock = new HttpServerMock(); | |
| 14389 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14390 var arg_request = buildCreativeFieldValue(); | |
| 14391 var arg_profileId = "foo"; | |
| 14392 var arg_creativeFieldId = "foo"; | |
| 14393 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14394 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14395 checkCreativeFieldValue(obj); | |
| 14396 | |
| 14397 var path = (req.url).path; | |
| 14398 var pathOffset = 0; | |
| 14399 var index; | |
| 14400 var subPart; | |
| 14401 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14402 pathOffset += 1; | |
| 14403 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14404 pathOffset += 18; | |
| 14405 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14406 pathOffset += 13; | |
| 14407 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14408 unittest.expect(index >= 0, unittest.isTrue); | |
| 14409 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14410 pathOffset = index; | |
| 14411 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14412 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14413 pathOffset += 16; | |
| 14414 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14415 unittest.expect(index >= 0, unittest.isTrue); | |
| 14416 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14417 pathOffset = index; | |
| 14418 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14419 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14420 pathOffset += 20; | |
| 14421 | |
| 14422 var query = (req.url).query; | |
| 14423 var queryOffset = 0; | |
| 14424 var queryMap = {}; | |
| 14425 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14426 parseBool(n) { | |
| 14427 if (n == "true") return true; | |
| 14428 if (n == "false") return false; | |
| 14429 if (n == null) return null; | |
| 14430 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14431 } | |
| 14432 if (query.length > 0) { | |
| 14433 for (var part in query.split("&")) { | |
| 14434 var keyvalue = part.split("="); | |
| 14435 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14436 } | |
| 14437 } | |
| 14438 | |
| 14439 | |
| 14440 var h = { | |
| 14441 "content-type" : "application/json; charset=utf-8", | |
| 14442 }; | |
| 14443 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14444 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14445 }), true); | |
| 14446 res.update(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14447 checkCreativeFieldValue(response); | |
| 14448 }))); | |
| 14449 }); | |
| 14450 | |
| 14451 }); | |
| 14452 | |
| 14453 | |
| 14454 unittest.group("resource-CreativeFieldsResourceApi", () { | |
| 14455 unittest.test("method--delete", () { | |
| 14456 | |
| 14457 var mock = new HttpServerMock(); | |
| 14458 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14459 var arg_profileId = "foo"; | |
| 14460 var arg_id = "foo"; | |
| 14461 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14462 var path = (req.url).path; | |
| 14463 var pathOffset = 0; | |
| 14464 var index; | |
| 14465 var subPart; | |
| 14466 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14467 pathOffset += 1; | |
| 14468 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14469 pathOffset += 18; | |
| 14470 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14471 pathOffset += 13; | |
| 14472 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14473 unittest.expect(index >= 0, unittest.isTrue); | |
| 14474 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14475 pathOffset = index; | |
| 14476 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14477 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14478 pathOffset += 16; | |
| 14479 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14480 pathOffset = path.length; | |
| 14481 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14482 | |
| 14483 var query = (req.url).query; | |
| 14484 var queryOffset = 0; | |
| 14485 var queryMap = {}; | |
| 14486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14487 parseBool(n) { | |
| 14488 if (n == "true") return true; | |
| 14489 if (n == "false") return false; | |
| 14490 if (n == null) return null; | |
| 14491 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14492 } | |
| 14493 if (query.length > 0) { | |
| 14494 for (var part in query.split("&")) { | |
| 14495 var keyvalue = part.split("="); | |
| 14496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14497 } | |
| 14498 } | |
| 14499 | |
| 14500 | |
| 14501 var h = { | |
| 14502 "content-type" : "application/json; charset=utf-8", | |
| 14503 }; | |
| 14504 var resp = ""; | |
| 14505 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14506 }), true); | |
| 14507 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 14508 }); | |
| 14509 | |
| 14510 unittest.test("method--get", () { | |
| 14511 | |
| 14512 var mock = new HttpServerMock(); | |
| 14513 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14514 var arg_profileId = "foo"; | |
| 14515 var arg_id = "foo"; | |
| 14516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14517 var path = (req.url).path; | |
| 14518 var pathOffset = 0; | |
| 14519 var index; | |
| 14520 var subPart; | |
| 14521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14522 pathOffset += 1; | |
| 14523 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14524 pathOffset += 18; | |
| 14525 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14526 pathOffset += 13; | |
| 14527 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14528 unittest.expect(index >= 0, unittest.isTrue); | |
| 14529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14530 pathOffset = index; | |
| 14531 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14532 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14533 pathOffset += 16; | |
| 14534 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14535 pathOffset = path.length; | |
| 14536 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14537 | |
| 14538 var query = (req.url).query; | |
| 14539 var queryOffset = 0; | |
| 14540 var queryMap = {}; | |
| 14541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14542 parseBool(n) { | |
| 14543 if (n == "true") return true; | |
| 14544 if (n == "false") return false; | |
| 14545 if (n == null) return null; | |
| 14546 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14547 } | |
| 14548 if (query.length > 0) { | |
| 14549 for (var part in query.split("&")) { | |
| 14550 var keyvalue = part.split("="); | |
| 14551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14552 } | |
| 14553 } | |
| 14554 | |
| 14555 | |
| 14556 var h = { | |
| 14557 "content-type" : "application/json; charset=utf-8", | |
| 14558 }; | |
| 14559 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14561 }), true); | |
| 14562 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeFie
ld response) { | |
| 14563 checkCreativeField(response); | |
| 14564 }))); | |
| 14565 }); | |
| 14566 | |
| 14567 unittest.test("method--insert", () { | |
| 14568 | |
| 14569 var mock = new HttpServerMock(); | |
| 14570 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14571 var arg_request = buildCreativeField(); | |
| 14572 var arg_profileId = "foo"; | |
| 14573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14574 var obj = new api.CreativeField.fromJson(json); | |
| 14575 checkCreativeField(obj); | |
| 14576 | |
| 14577 var path = (req.url).path; | |
| 14578 var pathOffset = 0; | |
| 14579 var index; | |
| 14580 var subPart; | |
| 14581 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14582 pathOffset += 1; | |
| 14583 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14584 pathOffset += 18; | |
| 14585 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14586 pathOffset += 13; | |
| 14587 index = path.indexOf("/creativeFields", pathOffset); | |
| 14588 unittest.expect(index >= 0, unittest.isTrue); | |
| 14589 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14590 pathOffset = index; | |
| 14591 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14592 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14593 pathOffset += 15; | |
| 14594 | |
| 14595 var query = (req.url).query; | |
| 14596 var queryOffset = 0; | |
| 14597 var queryMap = {}; | |
| 14598 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14599 parseBool(n) { | |
| 14600 if (n == "true") return true; | |
| 14601 if (n == "false") return false; | |
| 14602 if (n == null) return null; | |
| 14603 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14604 } | |
| 14605 if (query.length > 0) { | |
| 14606 for (var part in query.split("&")) { | |
| 14607 var keyvalue = part.split("="); | |
| 14608 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14609 } | |
| 14610 } | |
| 14611 | |
| 14612 | |
| 14613 var h = { | |
| 14614 "content-type" : "application/json; charset=utf-8", | |
| 14615 }; | |
| 14616 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14617 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14618 }), true); | |
| 14619 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14620 checkCreativeField(response); | |
| 14621 }))); | |
| 14622 }); | |
| 14623 | |
| 14624 unittest.test("method--list", () { | |
| 14625 | |
| 14626 var mock = new HttpServerMock(); | |
| 14627 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14628 var arg_profileId = "foo"; | |
| 14629 var arg_advertiserIds = buildUnnamed2093(); | |
| 14630 var arg_ids = buildUnnamed2094(); | |
| 14631 var arg_maxResults = 42; | |
| 14632 var arg_pageToken = "foo"; | |
| 14633 var arg_searchString = "foo"; | |
| 14634 var arg_sortField = "foo"; | |
| 14635 var arg_sortOrder = "foo"; | |
| 14636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14637 var path = (req.url).path; | |
| 14638 var pathOffset = 0; | |
| 14639 var index; | |
| 14640 var subPart; | |
| 14641 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14642 pathOffset += 1; | |
| 14643 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14644 pathOffset += 18; | |
| 14645 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14646 pathOffset += 13; | |
| 14647 index = path.indexOf("/creativeFields", pathOffset); | |
| 14648 unittest.expect(index >= 0, unittest.isTrue); | |
| 14649 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14650 pathOffset = index; | |
| 14651 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14652 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14653 pathOffset += 15; | |
| 14654 | |
| 14655 var query = (req.url).query; | |
| 14656 var queryOffset = 0; | |
| 14657 var queryMap = {}; | |
| 14658 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14659 parseBool(n) { | |
| 14660 if (n == "true") return true; | |
| 14661 if (n == "false") return false; | |
| 14662 if (n == null) return null; | |
| 14663 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14664 } | |
| 14665 if (query.length > 0) { | |
| 14666 for (var part in query.split("&")) { | |
| 14667 var keyvalue = part.split("="); | |
| 14668 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14669 } | |
| 14670 } | |
| 14671 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14672 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14673 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14674 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14675 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14676 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14677 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14678 | |
| 14679 | |
| 14680 var h = { | |
| 14681 "content-type" : "application/json; charset=utf-8", | |
| 14682 }; | |
| 14683 var resp = convert.JSON.encode(buildCreativeFieldsListResponse()); | |
| 14684 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14685 }), true); | |
| 14686 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) { | |
| 14687 checkCreativeFieldsListResponse(response); | |
| 14688 }))); | |
| 14689 }); | |
| 14690 | |
| 14691 unittest.test("method--patch", () { | |
| 14692 | |
| 14693 var mock = new HttpServerMock(); | |
| 14694 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14695 var arg_request = buildCreativeField(); | |
| 14696 var arg_profileId = "foo"; | |
| 14697 var arg_id = "foo"; | |
| 14698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14699 var obj = new api.CreativeField.fromJson(json); | |
| 14700 checkCreativeField(obj); | |
| 14701 | |
| 14702 var path = (req.url).path; | |
| 14703 var pathOffset = 0; | |
| 14704 var index; | |
| 14705 var subPart; | |
| 14706 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14707 pathOffset += 1; | |
| 14708 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14709 pathOffset += 18; | |
| 14710 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14711 pathOffset += 13; | |
| 14712 index = path.indexOf("/creativeFields", pathOffset); | |
| 14713 unittest.expect(index >= 0, unittest.isTrue); | |
| 14714 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14715 pathOffset = index; | |
| 14716 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14717 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14718 pathOffset += 15; | |
| 14719 | |
| 14720 var query = (req.url).query; | |
| 14721 var queryOffset = 0; | |
| 14722 var queryMap = {}; | |
| 14723 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14724 parseBool(n) { | |
| 14725 if (n == "true") return true; | |
| 14726 if (n == "false") return false; | |
| 14727 if (n == null) return null; | |
| 14728 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14729 } | |
| 14730 if (query.length > 0) { | |
| 14731 for (var part in query.split("&")) { | |
| 14732 var keyvalue = part.split("="); | |
| 14733 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14734 } | |
| 14735 } | |
| 14736 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14737 | |
| 14738 | |
| 14739 var h = { | |
| 14740 "content-type" : "application/json; charset=utf-8", | |
| 14741 }; | |
| 14742 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14743 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14744 }), true); | |
| 14745 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeField response) { | |
| 14746 checkCreativeField(response); | |
| 14747 }))); | |
| 14748 }); | |
| 14749 | |
| 14750 unittest.test("method--update", () { | |
| 14751 | |
| 14752 var mock = new HttpServerMock(); | |
| 14753 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14754 var arg_request = buildCreativeField(); | |
| 14755 var arg_profileId = "foo"; | |
| 14756 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14757 var obj = new api.CreativeField.fromJson(json); | |
| 14758 checkCreativeField(obj); | |
| 14759 | |
| 14760 var path = (req.url).path; | |
| 14761 var pathOffset = 0; | |
| 14762 var index; | |
| 14763 var subPart; | |
| 14764 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14765 pathOffset += 1; | |
| 14766 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14767 pathOffset += 18; | |
| 14768 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14769 pathOffset += 13; | |
| 14770 index = path.indexOf("/creativeFields", pathOffset); | |
| 14771 unittest.expect(index >= 0, unittest.isTrue); | |
| 14772 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14773 pathOffset = index; | |
| 14774 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14775 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14776 pathOffset += 15; | |
| 14777 | |
| 14778 var query = (req.url).query; | |
| 14779 var queryOffset = 0; | |
| 14780 var queryMap = {}; | |
| 14781 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14782 parseBool(n) { | |
| 14783 if (n == "true") return true; | |
| 14784 if (n == "false") return false; | |
| 14785 if (n == null) return null; | |
| 14786 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14787 } | |
| 14788 if (query.length > 0) { | |
| 14789 for (var part in query.split("&")) { | |
| 14790 var keyvalue = part.split("="); | |
| 14791 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14792 } | |
| 14793 } | |
| 14794 | |
| 14795 | |
| 14796 var h = { | |
| 14797 "content-type" : "application/json; charset=utf-8", | |
| 14798 }; | |
| 14799 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14800 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14801 }), true); | |
| 14802 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14803 checkCreativeField(response); | |
| 14804 }))); | |
| 14805 }); | |
| 14806 | |
| 14807 }); | |
| 14808 | |
| 14809 | |
| 14810 unittest.group("resource-CreativeGroupsResourceApi", () { | |
| 14811 unittest.test("method--get", () { | |
| 14812 | |
| 14813 var mock = new HttpServerMock(); | |
| 14814 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14815 var arg_profileId = "foo"; | |
| 14816 var arg_id = "foo"; | |
| 14817 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14818 var path = (req.url).path; | |
| 14819 var pathOffset = 0; | |
| 14820 var index; | |
| 14821 var subPart; | |
| 14822 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14823 pathOffset += 1; | |
| 14824 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14825 pathOffset += 18; | |
| 14826 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14827 pathOffset += 13; | |
| 14828 index = path.indexOf("/creativeGroups/", pathOffset); | |
| 14829 unittest.expect(index >= 0, unittest.isTrue); | |
| 14830 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14831 pathOffset = index; | |
| 14832 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14833 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeGroups/")); | |
| 14834 pathOffset += 16; | |
| 14835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14836 pathOffset = path.length; | |
| 14837 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14838 | |
| 14839 var query = (req.url).query; | |
| 14840 var queryOffset = 0; | |
| 14841 var queryMap = {}; | |
| 14842 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14843 parseBool(n) { | |
| 14844 if (n == "true") return true; | |
| 14845 if (n == "false") return false; | |
| 14846 if (n == null) return null; | |
| 14847 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14848 } | |
| 14849 if (query.length > 0) { | |
| 14850 for (var part in query.split("&")) { | |
| 14851 var keyvalue = part.split("="); | |
| 14852 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14853 } | |
| 14854 } | |
| 14855 | |
| 14856 | |
| 14857 var h = { | |
| 14858 "content-type" : "application/json; charset=utf-8", | |
| 14859 }; | |
| 14860 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14861 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14862 }), true); | |
| 14863 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeGro
up response) { | |
| 14864 checkCreativeGroup(response); | |
| 14865 }))); | |
| 14866 }); | |
| 14867 | |
| 14868 unittest.test("method--insert", () { | |
| 14869 | |
| 14870 var mock = new HttpServerMock(); | |
| 14871 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14872 var arg_request = buildCreativeGroup(); | |
| 14873 var arg_profileId = "foo"; | |
| 14874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14875 var obj = new api.CreativeGroup.fromJson(json); | |
| 14876 checkCreativeGroup(obj); | |
| 14877 | |
| 14878 var path = (req.url).path; | |
| 14879 var pathOffset = 0; | |
| 14880 var index; | |
| 14881 var subPart; | |
| 14882 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14883 pathOffset += 1; | |
| 14884 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14885 pathOffset += 18; | |
| 14886 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14887 pathOffset += 13; | |
| 14888 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14889 unittest.expect(index >= 0, unittest.isTrue); | |
| 14890 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14891 pathOffset = index; | |
| 14892 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14893 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14894 pathOffset += 15; | |
| 14895 | |
| 14896 var query = (req.url).query; | |
| 14897 var queryOffset = 0; | |
| 14898 var queryMap = {}; | |
| 14899 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14900 parseBool(n) { | |
| 14901 if (n == "true") return true; | |
| 14902 if (n == "false") return false; | |
| 14903 if (n == null) return null; | |
| 14904 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14905 } | |
| 14906 if (query.length > 0) { | |
| 14907 for (var part in query.split("&")) { | |
| 14908 var keyvalue = part.split("="); | |
| 14909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14910 } | |
| 14911 } | |
| 14912 | |
| 14913 | |
| 14914 var h = { | |
| 14915 "content-type" : "application/json; charset=utf-8", | |
| 14916 }; | |
| 14917 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14918 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14919 }), true); | |
| 14920 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 14921 checkCreativeGroup(response); | |
| 14922 }))); | |
| 14923 }); | |
| 14924 | |
| 14925 unittest.test("method--list", () { | |
| 14926 | |
| 14927 var mock = new HttpServerMock(); | |
| 14928 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14929 var arg_profileId = "foo"; | |
| 14930 var arg_advertiserIds = buildUnnamed2095(); | |
| 14931 var arg_groupNumber = 42; | |
| 14932 var arg_ids = buildUnnamed2096(); | |
| 14933 var arg_maxResults = 42; | |
| 14934 var arg_pageToken = "foo"; | |
| 14935 var arg_searchString = "foo"; | |
| 14936 var arg_sortField = "foo"; | |
| 14937 var arg_sortOrder = "foo"; | |
| 14938 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14939 var path = (req.url).path; | |
| 14940 var pathOffset = 0; | |
| 14941 var index; | |
| 14942 var subPart; | |
| 14943 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14944 pathOffset += 1; | |
| 14945 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 14946 pathOffset += 18; | |
| 14947 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14948 pathOffset += 13; | |
| 14949 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14950 unittest.expect(index >= 0, unittest.isTrue); | |
| 14951 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14952 pathOffset = index; | |
| 14953 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14954 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14955 pathOffset += 15; | |
| 14956 | |
| 14957 var query = (req.url).query; | |
| 14958 var queryOffset = 0; | |
| 14959 var queryMap = {}; | |
| 14960 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14961 parseBool(n) { | |
| 14962 if (n == "true") return true; | |
| 14963 if (n == "false") return false; | |
| 14964 if (n == null) return null; | |
| 14965 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14966 } | |
| 14967 if (query.length > 0) { | |
| 14968 for (var part in query.split("&")) { | |
| 14969 var keyvalue = part.split("="); | |
| 14970 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14971 } | |
| 14972 } | |
| 14973 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14974 unittest.expect(core.int.parse(queryMap["groupNumber"].first), unittest.
equals(arg_groupNumber)); | |
| 14975 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14976 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14977 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14978 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14979 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14980 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14981 | |
| 14982 | |
| 14983 var h = { | |
| 14984 "content-type" : "application/json; charset=utf-8", | |
| 14985 }; | |
| 14986 var resp = convert.JSON.encode(buildCreativeGroupsListResponse()); | |
| 14987 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14988 }), true); | |
| 14989 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) { | |
| 14990 checkCreativeGroupsListResponse(response); | |
| 14991 }))); | |
| 14992 }); | |
| 14993 | |
| 14994 unittest.test("method--patch", () { | |
| 14995 | |
| 14996 var mock = new HttpServerMock(); | |
| 14997 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14998 var arg_request = buildCreativeGroup(); | |
| 14999 var arg_profileId = "foo"; | |
| 15000 var arg_id = "foo"; | |
| 15001 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15002 var obj = new api.CreativeGroup.fromJson(json); | |
| 15003 checkCreativeGroup(obj); | |
| 15004 | |
| 15005 var path = (req.url).path; | |
| 15006 var pathOffset = 0; | |
| 15007 var index; | |
| 15008 var subPart; | |
| 15009 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15010 pathOffset += 1; | |
| 15011 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15012 pathOffset += 18; | |
| 15013 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15014 pathOffset += 13; | |
| 15015 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15016 unittest.expect(index >= 0, unittest.isTrue); | |
| 15017 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15018 pathOffset = index; | |
| 15019 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15020 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15021 pathOffset += 15; | |
| 15022 | |
| 15023 var query = (req.url).query; | |
| 15024 var queryOffset = 0; | |
| 15025 var queryMap = {}; | |
| 15026 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15027 parseBool(n) { | |
| 15028 if (n == "true") return true; | |
| 15029 if (n == "false") return false; | |
| 15030 if (n == null) return null; | |
| 15031 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15032 } | |
| 15033 if (query.length > 0) { | |
| 15034 for (var part in query.split("&")) { | |
| 15035 var keyvalue = part.split("="); | |
| 15036 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15037 } | |
| 15038 } | |
| 15039 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15040 | |
| 15041 | |
| 15042 var h = { | |
| 15043 "content-type" : "application/json; charset=utf-8", | |
| 15044 }; | |
| 15045 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15046 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15047 }), true); | |
| 15048 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeGroup response) { | |
| 15049 checkCreativeGroup(response); | |
| 15050 }))); | |
| 15051 }); | |
| 15052 | |
| 15053 unittest.test("method--update", () { | |
| 15054 | |
| 15055 var mock = new HttpServerMock(); | |
| 15056 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15057 var arg_request = buildCreativeGroup(); | |
| 15058 var arg_profileId = "foo"; | |
| 15059 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15060 var obj = new api.CreativeGroup.fromJson(json); | |
| 15061 checkCreativeGroup(obj); | |
| 15062 | |
| 15063 var path = (req.url).path; | |
| 15064 var pathOffset = 0; | |
| 15065 var index; | |
| 15066 var subPart; | |
| 15067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15068 pathOffset += 1; | |
| 15069 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15070 pathOffset += 18; | |
| 15071 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15072 pathOffset += 13; | |
| 15073 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15074 unittest.expect(index >= 0, unittest.isTrue); | |
| 15075 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15076 pathOffset = index; | |
| 15077 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15078 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15079 pathOffset += 15; | |
| 15080 | |
| 15081 var query = (req.url).query; | |
| 15082 var queryOffset = 0; | |
| 15083 var queryMap = {}; | |
| 15084 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15085 parseBool(n) { | |
| 15086 if (n == "true") return true; | |
| 15087 if (n == "false") return false; | |
| 15088 if (n == null) return null; | |
| 15089 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15090 } | |
| 15091 if (query.length > 0) { | |
| 15092 for (var part in query.split("&")) { | |
| 15093 var keyvalue = part.split("="); | |
| 15094 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15095 } | |
| 15096 } | |
| 15097 | |
| 15098 | |
| 15099 var h = { | |
| 15100 "content-type" : "application/json; charset=utf-8", | |
| 15101 }; | |
| 15102 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15103 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15104 }), true); | |
| 15105 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 15106 checkCreativeGroup(response); | |
| 15107 }))); | |
| 15108 }); | |
| 15109 | |
| 15110 }); | |
| 15111 | |
| 15112 | |
| 15113 unittest.group("resource-CreativesResourceApi", () { | |
| 15114 unittest.test("method--get", () { | |
| 15115 | |
| 15116 var mock = new HttpServerMock(); | |
| 15117 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15118 var arg_profileId = "foo"; | |
| 15119 var arg_id = "foo"; | |
| 15120 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15121 var path = (req.url).path; | |
| 15122 var pathOffset = 0; | |
| 15123 var index; | |
| 15124 var subPart; | |
| 15125 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15126 pathOffset += 1; | |
| 15127 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15128 pathOffset += 18; | |
| 15129 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15130 pathOffset += 13; | |
| 15131 index = path.indexOf("/creatives/", pathOffset); | |
| 15132 unittest.expect(index >= 0, unittest.isTrue); | |
| 15133 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15134 pathOffset = index; | |
| 15135 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15136 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | |
| 15137 pathOffset += 11; | |
| 15138 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15139 pathOffset = path.length; | |
| 15140 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15141 | |
| 15142 var query = (req.url).query; | |
| 15143 var queryOffset = 0; | |
| 15144 var queryMap = {}; | |
| 15145 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15146 parseBool(n) { | |
| 15147 if (n == "true") return true; | |
| 15148 if (n == "false") return false; | |
| 15149 if (n == null) return null; | |
| 15150 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15151 } | |
| 15152 if (query.length > 0) { | |
| 15153 for (var part in query.split("&")) { | |
| 15154 var keyvalue = part.split("="); | |
| 15155 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15156 } | |
| 15157 } | |
| 15158 | |
| 15159 | |
| 15160 var h = { | |
| 15161 "content-type" : "application/json; charset=utf-8", | |
| 15162 }; | |
| 15163 var resp = convert.JSON.encode(buildCreative()); | |
| 15164 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15165 }), true); | |
| 15166 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Creative re
sponse) { | |
| 15167 checkCreative(response); | |
| 15168 }))); | |
| 15169 }); | |
| 15170 | |
| 15171 unittest.test("method--insert", () { | |
| 15172 | |
| 15173 var mock = new HttpServerMock(); | |
| 15174 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15175 var arg_request = buildCreative(); | |
| 15176 var arg_profileId = "foo"; | |
| 15177 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15178 var obj = new api.Creative.fromJson(json); | |
| 15179 checkCreative(obj); | |
| 15180 | |
| 15181 var path = (req.url).path; | |
| 15182 var pathOffset = 0; | |
| 15183 var index; | |
| 15184 var subPart; | |
| 15185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15186 pathOffset += 1; | |
| 15187 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15188 pathOffset += 18; | |
| 15189 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15190 pathOffset += 13; | |
| 15191 index = path.indexOf("/creatives", pathOffset); | |
| 15192 unittest.expect(index >= 0, unittest.isTrue); | |
| 15193 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15194 pathOffset = index; | |
| 15195 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15196 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15197 pathOffset += 10; | |
| 15198 | |
| 15199 var query = (req.url).query; | |
| 15200 var queryOffset = 0; | |
| 15201 var queryMap = {}; | |
| 15202 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15203 parseBool(n) { | |
| 15204 if (n == "true") return true; | |
| 15205 if (n == "false") return false; | |
| 15206 if (n == null) return null; | |
| 15207 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15208 } | |
| 15209 if (query.length > 0) { | |
| 15210 for (var part in query.split("&")) { | |
| 15211 var keyvalue = part.split("="); | |
| 15212 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15213 } | |
| 15214 } | |
| 15215 | |
| 15216 | |
| 15217 var h = { | |
| 15218 "content-type" : "application/json; charset=utf-8", | |
| 15219 }; | |
| 15220 var resp = convert.JSON.encode(buildCreative()); | |
| 15221 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15222 }), true); | |
| 15223 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15224 checkCreative(response); | |
| 15225 }))); | |
| 15226 }); | |
| 15227 | |
| 15228 unittest.test("method--list", () { | |
| 15229 | |
| 15230 var mock = new HttpServerMock(); | |
| 15231 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15232 var arg_profileId = "foo"; | |
| 15233 var arg_active = true; | |
| 15234 var arg_advertiserId = "foo"; | |
| 15235 var arg_archived = true; | |
| 15236 var arg_campaignId = "foo"; | |
| 15237 var arg_companionCreativeIds = buildUnnamed2097(); | |
| 15238 var arg_creativeFieldIds = buildUnnamed2098(); | |
| 15239 var arg_ids = buildUnnamed2099(); | |
| 15240 var arg_maxResults = 42; | |
| 15241 var arg_pageToken = "foo"; | |
| 15242 var arg_renderingIds = buildUnnamed2100(); | |
| 15243 var arg_searchString = "foo"; | |
| 15244 var arg_sizeIds = buildUnnamed2101(); | |
| 15245 var arg_sortField = "foo"; | |
| 15246 var arg_sortOrder = "foo"; | |
| 15247 var arg_studioCreativeId = "foo"; | |
| 15248 var arg_types = buildUnnamed2102(); | |
| 15249 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15250 var path = (req.url).path; | |
| 15251 var pathOffset = 0; | |
| 15252 var index; | |
| 15253 var subPart; | |
| 15254 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15255 pathOffset += 1; | |
| 15256 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15257 pathOffset += 18; | |
| 15258 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15259 pathOffset += 13; | |
| 15260 index = path.indexOf("/creatives", pathOffset); | |
| 15261 unittest.expect(index >= 0, unittest.isTrue); | |
| 15262 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15263 pathOffset = index; | |
| 15264 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15265 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15266 pathOffset += 10; | |
| 15267 | |
| 15268 var query = (req.url).query; | |
| 15269 var queryOffset = 0; | |
| 15270 var queryMap = {}; | |
| 15271 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15272 parseBool(n) { | |
| 15273 if (n == "true") return true; | |
| 15274 if (n == "false") return false; | |
| 15275 if (n == null) return null; | |
| 15276 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15277 } | |
| 15278 if (query.length > 0) { | |
| 15279 for (var part in query.split("&")) { | |
| 15280 var keyvalue = part.split("="); | |
| 15281 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15282 } | |
| 15283 } | |
| 15284 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15285 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 15286 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 15287 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 15288 unittest.expect(queryMap["companionCreativeIds"], unittest.equals(arg_co
mpanionCreativeIds)); | |
| 15289 unittest.expect(queryMap["creativeFieldIds"], unittest.equals(arg_creati
veFieldIds)); | |
| 15290 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15291 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15292 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15293 unittest.expect(queryMap["renderingIds"], unittest.equals(arg_renderingI
ds)); | |
| 15294 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15295 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 15296 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15297 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15298 unittest.expect(queryMap["studioCreativeId"].first, unittest.equals(arg_
studioCreativeId)); | |
| 15299 unittest.expect(queryMap["types"], unittest.equals(arg_types)); | |
| 15300 | |
| 15301 | |
| 15302 var h = { | |
| 15303 "content-type" : "application/json; charset=utf-8", | |
| 15304 }; | |
| 15305 var resp = convert.JSON.encode(buildCreativesListResponse()); | |
| 15306 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15307 }), true); | |
| 15308 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) { | |
| 15309 checkCreativesListResponse(response); | |
| 15310 }))); | |
| 15311 }); | |
| 15312 | |
| 15313 unittest.test("method--patch", () { | |
| 15314 | |
| 15315 var mock = new HttpServerMock(); | |
| 15316 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15317 var arg_request = buildCreative(); | |
| 15318 var arg_profileId = "foo"; | |
| 15319 var arg_id = "foo"; | |
| 15320 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15321 var obj = new api.Creative.fromJson(json); | |
| 15322 checkCreative(obj); | |
| 15323 | |
| 15324 var path = (req.url).path; | |
| 15325 var pathOffset = 0; | |
| 15326 var index; | |
| 15327 var subPart; | |
| 15328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15329 pathOffset += 1; | |
| 15330 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15331 pathOffset += 18; | |
| 15332 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15333 pathOffset += 13; | |
| 15334 index = path.indexOf("/creatives", pathOffset); | |
| 15335 unittest.expect(index >= 0, unittest.isTrue); | |
| 15336 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15337 pathOffset = index; | |
| 15338 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15339 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15340 pathOffset += 10; | |
| 15341 | |
| 15342 var query = (req.url).query; | |
| 15343 var queryOffset = 0; | |
| 15344 var queryMap = {}; | |
| 15345 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15346 parseBool(n) { | |
| 15347 if (n == "true") return true; | |
| 15348 if (n == "false") return false; | |
| 15349 if (n == null) return null; | |
| 15350 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15351 } | |
| 15352 if (query.length > 0) { | |
| 15353 for (var part in query.split("&")) { | |
| 15354 var keyvalue = part.split("="); | |
| 15355 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15356 } | |
| 15357 } | |
| 15358 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15359 | |
| 15360 | |
| 15361 var h = { | |
| 15362 "content-type" : "application/json; charset=utf-8", | |
| 15363 }; | |
| 15364 var resp = convert.JSON.encode(buildCreative()); | |
| 15365 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15366 }), true); | |
| 15367 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Creative response) { | |
| 15368 checkCreative(response); | |
| 15369 }))); | |
| 15370 }); | |
| 15371 | |
| 15372 unittest.test("method--update", () { | |
| 15373 | |
| 15374 var mock = new HttpServerMock(); | |
| 15375 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15376 var arg_request = buildCreative(); | |
| 15377 var arg_profileId = "foo"; | |
| 15378 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15379 var obj = new api.Creative.fromJson(json); | |
| 15380 checkCreative(obj); | |
| 15381 | |
| 15382 var path = (req.url).path; | |
| 15383 var pathOffset = 0; | |
| 15384 var index; | |
| 15385 var subPart; | |
| 15386 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15387 pathOffset += 1; | |
| 15388 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15389 pathOffset += 18; | |
| 15390 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15391 pathOffset += 13; | |
| 15392 index = path.indexOf("/creatives", pathOffset); | |
| 15393 unittest.expect(index >= 0, unittest.isTrue); | |
| 15394 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15395 pathOffset = index; | |
| 15396 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15397 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15398 pathOffset += 10; | |
| 15399 | |
| 15400 var query = (req.url).query; | |
| 15401 var queryOffset = 0; | |
| 15402 var queryMap = {}; | |
| 15403 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15404 parseBool(n) { | |
| 15405 if (n == "true") return true; | |
| 15406 if (n == "false") return false; | |
| 15407 if (n == null) return null; | |
| 15408 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15409 } | |
| 15410 if (query.length > 0) { | |
| 15411 for (var part in query.split("&")) { | |
| 15412 var keyvalue = part.split("="); | |
| 15413 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15414 } | |
| 15415 } | |
| 15416 | |
| 15417 | |
| 15418 var h = { | |
| 15419 "content-type" : "application/json; charset=utf-8", | |
| 15420 }; | |
| 15421 var resp = convert.JSON.encode(buildCreative()); | |
| 15422 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15423 }), true); | |
| 15424 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15425 checkCreative(response); | |
| 15426 }))); | |
| 15427 }); | |
| 15428 | |
| 15429 }); | |
| 15430 | |
| 15431 | |
| 15432 unittest.group("resource-DimensionValuesResourceApi", () { | |
| 15433 unittest.test("method--query", () { | |
| 15434 | |
| 15435 var mock = new HttpServerMock(); | |
| 15436 api.DimensionValuesResourceApi res = new api.DfareportingApi(mock).dimensi
onValues; | |
| 15437 var arg_request = buildDimensionValueRequest(); | |
| 15438 var arg_profileId = "foo"; | |
| 15439 var arg_maxResults = 42; | |
| 15440 var arg_pageToken = "foo"; | |
| 15441 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15442 var obj = new api.DimensionValueRequest.fromJson(json); | |
| 15443 checkDimensionValueRequest(obj); | |
| 15444 | |
| 15445 var path = (req.url).path; | |
| 15446 var pathOffset = 0; | |
| 15447 var index; | |
| 15448 var subPart; | |
| 15449 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15450 pathOffset += 1; | |
| 15451 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15452 pathOffset += 18; | |
| 15453 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15454 pathOffset += 13; | |
| 15455 index = path.indexOf("/dimensionvalues/query", pathOffset); | |
| 15456 unittest.expect(index >= 0, unittest.isTrue); | |
| 15457 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15458 pathOffset = index; | |
| 15459 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15460 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dimensionvalues/query")); | |
| 15461 pathOffset += 22; | |
| 15462 | |
| 15463 var query = (req.url).query; | |
| 15464 var queryOffset = 0; | |
| 15465 var queryMap = {}; | |
| 15466 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15467 parseBool(n) { | |
| 15468 if (n == "true") return true; | |
| 15469 if (n == "false") return false; | |
| 15470 if (n == null) return null; | |
| 15471 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15472 } | |
| 15473 if (query.length > 0) { | |
| 15474 for (var part in query.split("&")) { | |
| 15475 var keyvalue = part.split("="); | |
| 15476 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15477 } | |
| 15478 } | |
| 15479 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15480 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15481 | |
| 15482 | |
| 15483 var h = { | |
| 15484 "content-type" : "application/json; charset=utf-8", | |
| 15485 }; | |
| 15486 var resp = convert.JSON.encode(buildDimensionValueList()); | |
| 15487 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15488 }), true); | |
| 15489 res.query(arg_request, arg_profileId, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DimensionValueList response) { | |
| 15490 checkDimensionValueList(response); | |
| 15491 }))); | |
| 15492 }); | |
| 15493 | |
| 15494 }); | |
| 15495 | |
| 15496 | |
| 15497 unittest.group("resource-DirectorySiteContactsResourceApi", () { | |
| 15498 unittest.test("method--get", () { | |
| 15499 | |
| 15500 var mock = new HttpServerMock(); | |
| 15501 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15502 var arg_profileId = "foo"; | |
| 15503 var arg_id = "foo"; | |
| 15504 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15505 var path = (req.url).path; | |
| 15506 var pathOffset = 0; | |
| 15507 var index; | |
| 15508 var subPart; | |
| 15509 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15510 pathOffset += 1; | |
| 15511 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15512 pathOffset += 18; | |
| 15513 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15514 pathOffset += 13; | |
| 15515 index = path.indexOf("/directorySiteContacts/", pathOffset); | |
| 15516 unittest.expect(index >= 0, unittest.isTrue); | |
| 15517 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15518 pathOffset = index; | |
| 15519 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15520 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/directorySiteContacts/")); | |
| 15521 pathOffset += 23; | |
| 15522 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15523 pathOffset = path.length; | |
| 15524 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15525 | |
| 15526 var query = (req.url).query; | |
| 15527 var queryOffset = 0; | |
| 15528 var queryMap = {}; | |
| 15529 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15530 parseBool(n) { | |
| 15531 if (n == "true") return true; | |
| 15532 if (n == "false") return false; | |
| 15533 if (n == null) return null; | |
| 15534 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15535 } | |
| 15536 if (query.length > 0) { | |
| 15537 for (var part in query.split("&")) { | |
| 15538 var keyvalue = part.split("="); | |
| 15539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15540 } | |
| 15541 } | |
| 15542 | |
| 15543 | |
| 15544 var h = { | |
| 15545 "content-type" : "application/json; charset=utf-8", | |
| 15546 }; | |
| 15547 var resp = convert.JSON.encode(buildDirectorySiteContact()); | |
| 15548 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15549 }), true); | |
| 15550 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
teContact response) { | |
| 15551 checkDirectorySiteContact(response); | |
| 15552 }))); | |
| 15553 }); | |
| 15554 | |
| 15555 unittest.test("method--list", () { | |
| 15556 | |
| 15557 var mock = new HttpServerMock(); | |
| 15558 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15559 var arg_profileId = "foo"; | |
| 15560 var arg_directorySiteIds = buildUnnamed2103(); | |
| 15561 var arg_ids = buildUnnamed2104(); | |
| 15562 var arg_maxResults = 42; | |
| 15563 var arg_pageToken = "foo"; | |
| 15564 var arg_searchString = "foo"; | |
| 15565 var arg_sortField = "foo"; | |
| 15566 var arg_sortOrder = "foo"; | |
| 15567 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15568 var path = (req.url).path; | |
| 15569 var pathOffset = 0; | |
| 15570 var index; | |
| 15571 var subPart; | |
| 15572 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15573 pathOffset += 1; | |
| 15574 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15575 pathOffset += 18; | |
| 15576 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15577 pathOffset += 13; | |
| 15578 index = path.indexOf("/directorySiteContacts", pathOffset); | |
| 15579 unittest.expect(index >= 0, unittest.isTrue); | |
| 15580 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15581 pathOffset = index; | |
| 15582 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15583 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/directorySiteContacts")); | |
| 15584 pathOffset += 22; | |
| 15585 | |
| 15586 var query = (req.url).query; | |
| 15587 var queryOffset = 0; | |
| 15588 var queryMap = {}; | |
| 15589 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15590 parseBool(n) { | |
| 15591 if (n == "true") return true; | |
| 15592 if (n == "false") return false; | |
| 15593 if (n == null) return null; | |
| 15594 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15595 } | |
| 15596 if (query.length > 0) { | |
| 15597 for (var part in query.split("&")) { | |
| 15598 var keyvalue = part.split("="); | |
| 15599 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15600 } | |
| 15601 } | |
| 15602 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 15603 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15604 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15605 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15606 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15607 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15608 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15609 | |
| 15610 | |
| 15611 var h = { | |
| 15612 "content-type" : "application/json; charset=utf-8", | |
| 15613 }; | |
| 15614 var resp = convert.JSON.encode(buildDirectorySiteContactsListResponse())
; | |
| 15615 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15616 }), true); | |
| 15617 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) { | |
| 15618 checkDirectorySiteContactsListResponse(response); | |
| 15619 }))); | |
| 15620 }); | |
| 15621 | |
| 15622 }); | |
| 15623 | |
| 15624 | |
| 15625 unittest.group("resource-DirectorySitesResourceApi", () { | |
| 15626 unittest.test("method--get", () { | |
| 15627 | |
| 15628 var mock = new HttpServerMock(); | |
| 15629 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15630 var arg_profileId = "foo"; | |
| 15631 var arg_id = "foo"; | |
| 15632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15633 var path = (req.url).path; | |
| 15634 var pathOffset = 0; | |
| 15635 var index; | |
| 15636 var subPart; | |
| 15637 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15638 pathOffset += 1; | |
| 15639 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15640 pathOffset += 18; | |
| 15641 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15642 pathOffset += 13; | |
| 15643 index = path.indexOf("/directorySites/", pathOffset); | |
| 15644 unittest.expect(index >= 0, unittest.isTrue); | |
| 15645 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15646 pathOffset = index; | |
| 15647 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15648 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/directorySites/")); | |
| 15649 pathOffset += 16; | |
| 15650 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15651 pathOffset = path.length; | |
| 15652 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15653 | |
| 15654 var query = (req.url).query; | |
| 15655 var queryOffset = 0; | |
| 15656 var queryMap = {}; | |
| 15657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15658 parseBool(n) { | |
| 15659 if (n == "true") return true; | |
| 15660 if (n == "false") return false; | |
| 15661 if (n == null) return null; | |
| 15662 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15663 } | |
| 15664 if (query.length > 0) { | |
| 15665 for (var part in query.split("&")) { | |
| 15666 var keyvalue = part.split("="); | |
| 15667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15668 } | |
| 15669 } | |
| 15670 | |
| 15671 | |
| 15672 var h = { | |
| 15673 "content-type" : "application/json; charset=utf-8", | |
| 15674 }; | |
| 15675 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15676 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15677 }), true); | |
| 15678 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
te response) { | |
| 15679 checkDirectorySite(response); | |
| 15680 }))); | |
| 15681 }); | |
| 15682 | |
| 15683 unittest.test("method--insert", () { | |
| 15684 | |
| 15685 var mock = new HttpServerMock(); | |
| 15686 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15687 var arg_request = buildDirectorySite(); | |
| 15688 var arg_profileId = "foo"; | |
| 15689 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15690 var obj = new api.DirectorySite.fromJson(json); | |
| 15691 checkDirectorySite(obj); | |
| 15692 | |
| 15693 var path = (req.url).path; | |
| 15694 var pathOffset = 0; | |
| 15695 var index; | |
| 15696 var subPart; | |
| 15697 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15698 pathOffset += 1; | |
| 15699 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15700 pathOffset += 18; | |
| 15701 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15702 pathOffset += 13; | |
| 15703 index = path.indexOf("/directorySites", pathOffset); | |
| 15704 unittest.expect(index >= 0, unittest.isTrue); | |
| 15705 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15706 pathOffset = index; | |
| 15707 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15708 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15709 pathOffset += 15; | |
| 15710 | |
| 15711 var query = (req.url).query; | |
| 15712 var queryOffset = 0; | |
| 15713 var queryMap = {}; | |
| 15714 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15715 parseBool(n) { | |
| 15716 if (n == "true") return true; | |
| 15717 if (n == "false") return false; | |
| 15718 if (n == null) return null; | |
| 15719 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15720 } | |
| 15721 if (query.length > 0) { | |
| 15722 for (var part in query.split("&")) { | |
| 15723 var keyvalue = part.split("="); | |
| 15724 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15725 } | |
| 15726 } | |
| 15727 | |
| 15728 | |
| 15729 var h = { | |
| 15730 "content-type" : "application/json; charset=utf-8", | |
| 15731 }; | |
| 15732 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15733 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15734 }), true); | |
| 15735 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Dir
ectorySite response) { | |
| 15736 checkDirectorySite(response); | |
| 15737 }))); | |
| 15738 }); | |
| 15739 | |
| 15740 unittest.test("method--list", () { | |
| 15741 | |
| 15742 var mock = new HttpServerMock(); | |
| 15743 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15744 var arg_profileId = "foo"; | |
| 15745 var arg_acceptsInStreamVideoPlacements = true; | |
| 15746 var arg_acceptsInterstitialPlacements = true; | |
| 15747 var arg_acceptsPublisherPaidPlacements = true; | |
| 15748 var arg_active = true; | |
| 15749 var arg_countryId = "foo"; | |
| 15750 var arg_dfpNetworkCode = "foo"; | |
| 15751 var arg_ids = buildUnnamed2105(); | |
| 15752 var arg_maxResults = 42; | |
| 15753 var arg_pageToken = "foo"; | |
| 15754 var arg_parentId = "foo"; | |
| 15755 var arg_searchString = "foo"; | |
| 15756 var arg_sortField = "foo"; | |
| 15757 var arg_sortOrder = "foo"; | |
| 15758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15759 var path = (req.url).path; | |
| 15760 var pathOffset = 0; | |
| 15761 var index; | |
| 15762 var subPart; | |
| 15763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15764 pathOffset += 1; | |
| 15765 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15766 pathOffset += 18; | |
| 15767 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15768 pathOffset += 13; | |
| 15769 index = path.indexOf("/directorySites", pathOffset); | |
| 15770 unittest.expect(index >= 0, unittest.isTrue); | |
| 15771 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15772 pathOffset = index; | |
| 15773 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15774 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15775 pathOffset += 15; | |
| 15776 | |
| 15777 var query = (req.url).query; | |
| 15778 var queryOffset = 0; | |
| 15779 var queryMap = {}; | |
| 15780 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15781 parseBool(n) { | |
| 15782 if (n == "true") return true; | |
| 15783 if (n == "false") return false; | |
| 15784 if (n == null) return null; | |
| 15785 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15786 } | |
| 15787 if (query.length > 0) { | |
| 15788 for (var part in query.split("&")) { | |
| 15789 var keyvalue = part.split("="); | |
| 15790 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15791 } | |
| 15792 } | |
| 15793 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 15794 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 15795 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 15796 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15797 unittest.expect(queryMap["countryId"].first, unittest.equals(arg_country
Id)); | |
| 15798 unittest.expect(queryMap["dfp_network_code"].first, unittest.equals(arg_
dfpNetworkCode)); | |
| 15799 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15800 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15801 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15802 unittest.expect(queryMap["parentId"].first, unittest.equals(arg_parentId
)); | |
| 15803 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15804 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15805 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15806 | |
| 15807 | |
| 15808 var h = { | |
| 15809 "content-type" : "application/json; charset=utf-8", | |
| 15810 }; | |
| 15811 var resp = convert.JSON.encode(buildDirectorySitesListResponse()); | |
| 15812 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15813 }), true); | |
| 15814 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) { | |
| 15815 checkDirectorySitesListResponse(response); | |
| 15816 }))); | |
| 15817 }); | |
| 15818 | |
| 15819 }); | |
| 15820 | |
| 15821 | |
| 15822 unittest.group("resource-EventTagsResourceApi", () { | |
| 15823 unittest.test("method--delete", () { | |
| 15824 | |
| 15825 var mock = new HttpServerMock(); | |
| 15826 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15827 var arg_profileId = "foo"; | |
| 15828 var arg_id = "foo"; | |
| 15829 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15830 var path = (req.url).path; | |
| 15831 var pathOffset = 0; | |
| 15832 var index; | |
| 15833 var subPart; | |
| 15834 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15835 pathOffset += 1; | |
| 15836 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15837 pathOffset += 18; | |
| 15838 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15839 pathOffset += 13; | |
| 15840 index = path.indexOf("/eventTags/", pathOffset); | |
| 15841 unittest.expect(index >= 0, unittest.isTrue); | |
| 15842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15843 pathOffset = index; | |
| 15844 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15845 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15846 pathOffset += 11; | |
| 15847 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15848 pathOffset = path.length; | |
| 15849 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15850 | |
| 15851 var query = (req.url).query; | |
| 15852 var queryOffset = 0; | |
| 15853 var queryMap = {}; | |
| 15854 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15855 parseBool(n) { | |
| 15856 if (n == "true") return true; | |
| 15857 if (n == "false") return false; | |
| 15858 if (n == null) return null; | |
| 15859 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15860 } | |
| 15861 if (query.length > 0) { | |
| 15862 for (var part in query.split("&")) { | |
| 15863 var keyvalue = part.split("="); | |
| 15864 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15865 } | |
| 15866 } | |
| 15867 | |
| 15868 | |
| 15869 var h = { | |
| 15870 "content-type" : "application/json; charset=utf-8", | |
| 15871 }; | |
| 15872 var resp = ""; | |
| 15873 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15874 }), true); | |
| 15875 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 15876 }); | |
| 15877 | |
| 15878 unittest.test("method--get", () { | |
| 15879 | |
| 15880 var mock = new HttpServerMock(); | |
| 15881 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15882 var arg_profileId = "foo"; | |
| 15883 var arg_id = "foo"; | |
| 15884 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15885 var path = (req.url).path; | |
| 15886 var pathOffset = 0; | |
| 15887 var index; | |
| 15888 var subPart; | |
| 15889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15890 pathOffset += 1; | |
| 15891 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15892 pathOffset += 18; | |
| 15893 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15894 pathOffset += 13; | |
| 15895 index = path.indexOf("/eventTags/", pathOffset); | |
| 15896 unittest.expect(index >= 0, unittest.isTrue); | |
| 15897 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15898 pathOffset = index; | |
| 15899 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15900 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15901 pathOffset += 11; | |
| 15902 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15903 pathOffset = path.length; | |
| 15904 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15905 | |
| 15906 var query = (req.url).query; | |
| 15907 var queryOffset = 0; | |
| 15908 var queryMap = {}; | |
| 15909 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15910 parseBool(n) { | |
| 15911 if (n == "true") return true; | |
| 15912 if (n == "false") return false; | |
| 15913 if (n == null) return null; | |
| 15914 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15915 } | |
| 15916 if (query.length > 0) { | |
| 15917 for (var part in query.split("&")) { | |
| 15918 var keyvalue = part.split("="); | |
| 15919 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15920 } | |
| 15921 } | |
| 15922 | |
| 15923 | |
| 15924 var h = { | |
| 15925 "content-type" : "application/json; charset=utf-8", | |
| 15926 }; | |
| 15927 var resp = convert.JSON.encode(buildEventTag()); | |
| 15928 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15929 }), true); | |
| 15930 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.EventTag re
sponse) { | |
| 15931 checkEventTag(response); | |
| 15932 }))); | |
| 15933 }); | |
| 15934 | |
| 15935 unittest.test("method--insert", () { | |
| 15936 | |
| 15937 var mock = new HttpServerMock(); | |
| 15938 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15939 var arg_request = buildEventTag(); | |
| 15940 var arg_profileId = "foo"; | |
| 15941 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15942 var obj = new api.EventTag.fromJson(json); | |
| 15943 checkEventTag(obj); | |
| 15944 | |
| 15945 var path = (req.url).path; | |
| 15946 var pathOffset = 0; | |
| 15947 var index; | |
| 15948 var subPart; | |
| 15949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15950 pathOffset += 1; | |
| 15951 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 15952 pathOffset += 18; | |
| 15953 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15954 pathOffset += 13; | |
| 15955 index = path.indexOf("/eventTags", pathOffset); | |
| 15956 unittest.expect(index >= 0, unittest.isTrue); | |
| 15957 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15958 pathOffset = index; | |
| 15959 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15960 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 15961 pathOffset += 10; | |
| 15962 | |
| 15963 var query = (req.url).query; | |
| 15964 var queryOffset = 0; | |
| 15965 var queryMap = {}; | |
| 15966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15967 parseBool(n) { | |
| 15968 if (n == "true") return true; | |
| 15969 if (n == "false") return false; | |
| 15970 if (n == null) return null; | |
| 15971 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15972 } | |
| 15973 if (query.length > 0) { | |
| 15974 for (var part in query.split("&")) { | |
| 15975 var keyvalue = part.split("="); | |
| 15976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15977 } | |
| 15978 } | |
| 15979 | |
| 15980 | |
| 15981 var h = { | |
| 15982 "content-type" : "application/json; charset=utf-8", | |
| 15983 }; | |
| 15984 var resp = convert.JSON.encode(buildEventTag()); | |
| 15985 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15986 }), true); | |
| 15987 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 15988 checkEventTag(response); | |
| 15989 }))); | |
| 15990 }); | |
| 15991 | |
| 15992 unittest.test("method--list", () { | |
| 15993 | |
| 15994 var mock = new HttpServerMock(); | |
| 15995 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15996 var arg_profileId = "foo"; | |
| 15997 var arg_adId = "foo"; | |
| 15998 var arg_advertiserId = "foo"; | |
| 15999 var arg_campaignId = "foo"; | |
| 16000 var arg_definitionsOnly = true; | |
| 16001 var arg_enabled = true; | |
| 16002 var arg_eventTagTypes = buildUnnamed2106(); | |
| 16003 var arg_ids = buildUnnamed2107(); | |
| 16004 var arg_searchString = "foo"; | |
| 16005 var arg_sortField = "foo"; | |
| 16006 var arg_sortOrder = "foo"; | |
| 16007 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16008 var path = (req.url).path; | |
| 16009 var pathOffset = 0; | |
| 16010 var index; | |
| 16011 var subPart; | |
| 16012 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16013 pathOffset += 1; | |
| 16014 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16015 pathOffset += 18; | |
| 16016 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16017 pathOffset += 13; | |
| 16018 index = path.indexOf("/eventTags", pathOffset); | |
| 16019 unittest.expect(index >= 0, unittest.isTrue); | |
| 16020 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16021 pathOffset = index; | |
| 16022 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16023 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16024 pathOffset += 10; | |
| 16025 | |
| 16026 var query = (req.url).query; | |
| 16027 var queryOffset = 0; | |
| 16028 var queryMap = {}; | |
| 16029 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16030 parseBool(n) { | |
| 16031 if (n == "true") return true; | |
| 16032 if (n == "false") return false; | |
| 16033 if (n == null) return null; | |
| 16034 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16035 } | |
| 16036 if (query.length > 0) { | |
| 16037 for (var part in query.split("&")) { | |
| 16038 var keyvalue = part.split("="); | |
| 16039 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16040 } | |
| 16041 } | |
| 16042 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId)); | |
| 16043 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16044 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 16045 unittest.expect(queryMap["definitionsOnly"].first, unittest.equals("$arg
_definitionsOnly")); | |
| 16046 unittest.expect(queryMap["enabled"].first, unittest.equals("$arg_enabled
")); | |
| 16047 unittest.expect(queryMap["eventTagTypes"], unittest.equals(arg_eventTagT
ypes)); | |
| 16048 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16049 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16050 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16051 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16052 | |
| 16053 | |
| 16054 var h = { | |
| 16055 "content-type" : "application/json; charset=utf-8", | |
| 16056 }; | |
| 16057 var resp = convert.JSON.encode(buildEventTagsListResponse()); | |
| 16058 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16059 }), true); | |
| 16060 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) { | |
| 16061 checkEventTagsListResponse(response); | |
| 16062 }))); | |
| 16063 }); | |
| 16064 | |
| 16065 unittest.test("method--patch", () { | |
| 16066 | |
| 16067 var mock = new HttpServerMock(); | |
| 16068 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16069 var arg_request = buildEventTag(); | |
| 16070 var arg_profileId = "foo"; | |
| 16071 var arg_id = "foo"; | |
| 16072 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16073 var obj = new api.EventTag.fromJson(json); | |
| 16074 checkEventTag(obj); | |
| 16075 | |
| 16076 var path = (req.url).path; | |
| 16077 var pathOffset = 0; | |
| 16078 var index; | |
| 16079 var subPart; | |
| 16080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16081 pathOffset += 1; | |
| 16082 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16083 pathOffset += 18; | |
| 16084 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16085 pathOffset += 13; | |
| 16086 index = path.indexOf("/eventTags", pathOffset); | |
| 16087 unittest.expect(index >= 0, unittest.isTrue); | |
| 16088 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16089 pathOffset = index; | |
| 16090 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16091 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16092 pathOffset += 10; | |
| 16093 | |
| 16094 var query = (req.url).query; | |
| 16095 var queryOffset = 0; | |
| 16096 var queryMap = {}; | |
| 16097 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16098 parseBool(n) { | |
| 16099 if (n == "true") return true; | |
| 16100 if (n == "false") return false; | |
| 16101 if (n == null) return null; | |
| 16102 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16103 } | |
| 16104 if (query.length > 0) { | |
| 16105 for (var part in query.split("&")) { | |
| 16106 var keyvalue = part.split("="); | |
| 16107 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16108 } | |
| 16109 } | |
| 16110 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16111 | |
| 16112 | |
| 16113 var h = { | |
| 16114 "content-type" : "application/json; charset=utf-8", | |
| 16115 }; | |
| 16116 var resp = convert.JSON.encode(buildEventTag()); | |
| 16117 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16118 }), true); | |
| 16119 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.EventTag response) { | |
| 16120 checkEventTag(response); | |
| 16121 }))); | |
| 16122 }); | |
| 16123 | |
| 16124 unittest.test("method--update", () { | |
| 16125 | |
| 16126 var mock = new HttpServerMock(); | |
| 16127 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16128 var arg_request = buildEventTag(); | |
| 16129 var arg_profileId = "foo"; | |
| 16130 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16131 var obj = new api.EventTag.fromJson(json); | |
| 16132 checkEventTag(obj); | |
| 16133 | |
| 16134 var path = (req.url).path; | |
| 16135 var pathOffset = 0; | |
| 16136 var index; | |
| 16137 var subPart; | |
| 16138 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16139 pathOffset += 1; | |
| 16140 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16141 pathOffset += 18; | |
| 16142 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16143 pathOffset += 13; | |
| 16144 index = path.indexOf("/eventTags", pathOffset); | |
| 16145 unittest.expect(index >= 0, unittest.isTrue); | |
| 16146 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16147 pathOffset = index; | |
| 16148 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16149 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16150 pathOffset += 10; | |
| 16151 | |
| 16152 var query = (req.url).query; | |
| 16153 var queryOffset = 0; | |
| 16154 var queryMap = {}; | |
| 16155 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16156 parseBool(n) { | |
| 16157 if (n == "true") return true; | |
| 16158 if (n == "false") return false; | |
| 16159 if (n == null) return null; | |
| 16160 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16161 } | |
| 16162 if (query.length > 0) { | |
| 16163 for (var part in query.split("&")) { | |
| 16164 var keyvalue = part.split("="); | |
| 16165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16166 } | |
| 16167 } | |
| 16168 | |
| 16169 | |
| 16170 var h = { | |
| 16171 "content-type" : "application/json; charset=utf-8", | |
| 16172 }; | |
| 16173 var resp = convert.JSON.encode(buildEventTag()); | |
| 16174 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16175 }), true); | |
| 16176 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 16177 checkEventTag(response); | |
| 16178 }))); | |
| 16179 }); | |
| 16180 | |
| 16181 }); | |
| 16182 | |
| 16183 | |
| 16184 unittest.group("resource-FilesResourceApi", () { | |
| 16185 unittest.test("method--get", () { | |
| 16186 // TODO: Implement tests for media upload; | |
| 16187 // TODO: Implement tests for media download; | |
| 16188 | |
| 16189 var mock = new HttpServerMock(); | |
| 16190 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16191 var arg_reportId = "foo"; | |
| 16192 var arg_fileId = "foo"; | |
| 16193 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16194 var path = (req.url).path; | |
| 16195 var pathOffset = 0; | |
| 16196 var index; | |
| 16197 var subPart; | |
| 16198 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16199 pathOffset += 1; | |
| 16200 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16201 pathOffset += 18; | |
| 16202 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("reports/")); | |
| 16203 pathOffset += 8; | |
| 16204 index = path.indexOf("/files/", pathOffset); | |
| 16205 unittest.expect(index >= 0, unittest.isTrue); | |
| 16206 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16207 pathOffset = index; | |
| 16208 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 16209 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 16210 pathOffset += 7; | |
| 16211 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16212 pathOffset = path.length; | |
| 16213 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 16214 | |
| 16215 var query = (req.url).query; | |
| 16216 var queryOffset = 0; | |
| 16217 var queryMap = {}; | |
| 16218 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16219 parseBool(n) { | |
| 16220 if (n == "true") return true; | |
| 16221 if (n == "false") return false; | |
| 16222 if (n == null) return null; | |
| 16223 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16224 } | |
| 16225 if (query.length > 0) { | |
| 16226 for (var part in query.split("&")) { | |
| 16227 var keyvalue = part.split("="); | |
| 16228 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16229 } | |
| 16230 } | |
| 16231 | |
| 16232 | |
| 16233 var h = { | |
| 16234 "content-type" : "application/json; charset=utf-8", | |
| 16235 }; | |
| 16236 var resp = convert.JSON.encode(buildFile()); | |
| 16237 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16238 }), true); | |
| 16239 res.get(arg_reportId, arg_fileId).then(unittest.expectAsync(((api.File res
ponse) { | |
| 16240 checkFile(response); | |
| 16241 }))); | |
| 16242 }); | |
| 16243 | |
| 16244 unittest.test("method--list", () { | |
| 16245 | |
| 16246 var mock = new HttpServerMock(); | |
| 16247 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16248 var arg_profileId = "foo"; | |
| 16249 var arg_maxResults = 42; | |
| 16250 var arg_pageToken = "foo"; | |
| 16251 var arg_scope = "foo"; | |
| 16252 var arg_sortField = "foo"; | |
| 16253 var arg_sortOrder = "foo"; | |
| 16254 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16255 var path = (req.url).path; | |
| 16256 var pathOffset = 0; | |
| 16257 var index; | |
| 16258 var subPart; | |
| 16259 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16260 pathOffset += 1; | |
| 16261 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16262 pathOffset += 18; | |
| 16263 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16264 pathOffset += 13; | |
| 16265 index = path.indexOf("/files", pathOffset); | |
| 16266 unittest.expect(index >= 0, unittest.isTrue); | |
| 16267 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16268 pathOffset = index; | |
| 16269 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16270 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 16271 pathOffset += 6; | |
| 16272 | |
| 16273 var query = (req.url).query; | |
| 16274 var queryOffset = 0; | |
| 16275 var queryMap = {}; | |
| 16276 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16277 parseBool(n) { | |
| 16278 if (n == "true") return true; | |
| 16279 if (n == "false") return false; | |
| 16280 if (n == null) return null; | |
| 16281 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16282 } | |
| 16283 if (query.length > 0) { | |
| 16284 for (var part in query.split("&")) { | |
| 16285 var keyvalue = part.split("="); | |
| 16286 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16287 } | |
| 16288 } | |
| 16289 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16290 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16291 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 16292 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16293 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16294 | |
| 16295 | |
| 16296 var h = { | |
| 16297 "content-type" : "application/json; charset=utf-8", | |
| 16298 }; | |
| 16299 var resp = convert.JSON.encode(buildFileList()); | |
| 16300 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16301 }), true); | |
| 16302 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) { | |
| 16303 checkFileList(response); | |
| 16304 }))); | |
| 16305 }); | |
| 16306 | |
| 16307 }); | |
| 16308 | |
| 16309 | |
| 16310 unittest.group("resource-FloodlightActivitiesResourceApi", () { | |
| 16311 unittest.test("method--delete", () { | |
| 16312 | |
| 16313 var mock = new HttpServerMock(); | |
| 16314 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16315 var arg_profileId = "foo"; | |
| 16316 var arg_id = "foo"; | |
| 16317 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16318 var path = (req.url).path; | |
| 16319 var pathOffset = 0; | |
| 16320 var index; | |
| 16321 var subPart; | |
| 16322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16323 pathOffset += 1; | |
| 16324 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16325 pathOffset += 18; | |
| 16326 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16327 pathOffset += 13; | |
| 16328 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16329 unittest.expect(index >= 0, unittest.isTrue); | |
| 16330 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16331 pathOffset = index; | |
| 16332 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16333 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16334 pathOffset += 22; | |
| 16335 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16336 pathOffset = path.length; | |
| 16337 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16338 | |
| 16339 var query = (req.url).query; | |
| 16340 var queryOffset = 0; | |
| 16341 var queryMap = {}; | |
| 16342 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16343 parseBool(n) { | |
| 16344 if (n == "true") return true; | |
| 16345 if (n == "false") return false; | |
| 16346 if (n == null) return null; | |
| 16347 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16348 } | |
| 16349 if (query.length > 0) { | |
| 16350 for (var part in query.split("&")) { | |
| 16351 var keyvalue = part.split("="); | |
| 16352 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16353 } | |
| 16354 } | |
| 16355 | |
| 16356 | |
| 16357 var h = { | |
| 16358 "content-type" : "application/json; charset=utf-8", | |
| 16359 }; | |
| 16360 var resp = ""; | |
| 16361 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16362 }), true); | |
| 16363 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16364 }); | |
| 16365 | |
| 16366 unittest.test("method--generatetag", () { | |
| 16367 | |
| 16368 var mock = new HttpServerMock(); | |
| 16369 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16370 var arg_profileId = "foo"; | |
| 16371 var arg_floodlightActivityId = "foo"; | |
| 16372 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16373 var path = (req.url).path; | |
| 16374 var pathOffset = 0; | |
| 16375 var index; | |
| 16376 var subPart; | |
| 16377 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16378 pathOffset += 1; | |
| 16379 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16380 pathOffset += 18; | |
| 16381 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16382 pathOffset += 13; | |
| 16383 index = path.indexOf("/floodlightActivities/generatetag", pathOffset); | |
| 16384 unittest.expect(index >= 0, unittest.isTrue); | |
| 16385 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16386 pathOffset = index; | |
| 16387 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16388 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/floodlightActivities/generatetag")); | |
| 16389 pathOffset += 33; | |
| 16390 | |
| 16391 var query = (req.url).query; | |
| 16392 var queryOffset = 0; | |
| 16393 var queryMap = {}; | |
| 16394 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16395 parseBool(n) { | |
| 16396 if (n == "true") return true; | |
| 16397 if (n == "false") return false; | |
| 16398 if (n == null) return null; | |
| 16399 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16400 } | |
| 16401 if (query.length > 0) { | |
| 16402 for (var part in query.split("&")) { | |
| 16403 var keyvalue = part.split("="); | |
| 16404 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16405 } | |
| 16406 } | |
| 16407 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 16408 | |
| 16409 | |
| 16410 var h = { | |
| 16411 "content-type" : "application/json; charset=utf-8", | |
| 16412 }; | |
| 16413 var resp = convert.JSON.encode(buildFloodlightActivitiesGenerateTagRespo
nse()); | |
| 16414 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16415 }), true); | |
| 16416 res.generatetag(arg_profileId, floodlightActivityId: arg_floodlightActivit
yId).then(unittest.expectAsync(((api.FloodlightActivitiesGenerateTagResponse res
ponse) { | |
| 16417 checkFloodlightActivitiesGenerateTagResponse(response); | |
| 16418 }))); | |
| 16419 }); | |
| 16420 | |
| 16421 unittest.test("method--get", () { | |
| 16422 | |
| 16423 var mock = new HttpServerMock(); | |
| 16424 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16425 var arg_profileId = "foo"; | |
| 16426 var arg_id = "foo"; | |
| 16427 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16428 var path = (req.url).path; | |
| 16429 var pathOffset = 0; | |
| 16430 var index; | |
| 16431 var subPart; | |
| 16432 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16433 pathOffset += 1; | |
| 16434 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16435 pathOffset += 18; | |
| 16436 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16437 pathOffset += 13; | |
| 16438 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16439 unittest.expect(index >= 0, unittest.isTrue); | |
| 16440 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16441 pathOffset = index; | |
| 16442 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16443 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16444 pathOffset += 22; | |
| 16445 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16446 pathOffset = path.length; | |
| 16447 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16448 | |
| 16449 var query = (req.url).query; | |
| 16450 var queryOffset = 0; | |
| 16451 var queryMap = {}; | |
| 16452 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16453 parseBool(n) { | |
| 16454 if (n == "true") return true; | |
| 16455 if (n == "false") return false; | |
| 16456 if (n == null) return null; | |
| 16457 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16458 } | |
| 16459 if (query.length > 0) { | |
| 16460 for (var part in query.split("&")) { | |
| 16461 var keyvalue = part.split("="); | |
| 16462 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16463 } | |
| 16464 } | |
| 16465 | |
| 16466 | |
| 16467 var h = { | |
| 16468 "content-type" : "application/json; charset=utf-8", | |
| 16469 }; | |
| 16470 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16471 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16472 }), true); | |
| 16473 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivity response) { | |
| 16474 checkFloodlightActivity(response); | |
| 16475 }))); | |
| 16476 }); | |
| 16477 | |
| 16478 unittest.test("method--insert", () { | |
| 16479 | |
| 16480 var mock = new HttpServerMock(); | |
| 16481 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16482 var arg_request = buildFloodlightActivity(); | |
| 16483 var arg_profileId = "foo"; | |
| 16484 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16485 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16486 checkFloodlightActivity(obj); | |
| 16487 | |
| 16488 var path = (req.url).path; | |
| 16489 var pathOffset = 0; | |
| 16490 var index; | |
| 16491 var subPart; | |
| 16492 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16493 pathOffset += 1; | |
| 16494 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16495 pathOffset += 18; | |
| 16496 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16497 pathOffset += 13; | |
| 16498 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16499 unittest.expect(index >= 0, unittest.isTrue); | |
| 16500 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16501 pathOffset = index; | |
| 16502 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16503 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16504 pathOffset += 21; | |
| 16505 | |
| 16506 var query = (req.url).query; | |
| 16507 var queryOffset = 0; | |
| 16508 var queryMap = {}; | |
| 16509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16510 parseBool(n) { | |
| 16511 if (n == "true") return true; | |
| 16512 if (n == "false") return false; | |
| 16513 if (n == null) return null; | |
| 16514 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16515 } | |
| 16516 if (query.length > 0) { | |
| 16517 for (var part in query.split("&")) { | |
| 16518 var keyvalue = part.split("="); | |
| 16519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16520 } | |
| 16521 } | |
| 16522 | |
| 16523 | |
| 16524 var h = { | |
| 16525 "content-type" : "application/json; charset=utf-8", | |
| 16526 }; | |
| 16527 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16528 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16529 }), true); | |
| 16530 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16531 checkFloodlightActivity(response); | |
| 16532 }))); | |
| 16533 }); | |
| 16534 | |
| 16535 unittest.test("method--list", () { | |
| 16536 | |
| 16537 var mock = new HttpServerMock(); | |
| 16538 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16539 var arg_profileId = "foo"; | |
| 16540 var arg_advertiserId = "foo"; | |
| 16541 var arg_floodlightActivityGroupIds = buildUnnamed2108(); | |
| 16542 var arg_floodlightActivityGroupName = "foo"; | |
| 16543 var arg_floodlightActivityGroupTagString = "foo"; | |
| 16544 var arg_floodlightActivityGroupType = "foo"; | |
| 16545 var arg_floodlightConfigurationId = "foo"; | |
| 16546 var arg_ids = buildUnnamed2109(); | |
| 16547 var arg_maxResults = 42; | |
| 16548 var arg_pageToken = "foo"; | |
| 16549 var arg_searchString = "foo"; | |
| 16550 var arg_sortField = "foo"; | |
| 16551 var arg_sortOrder = "foo"; | |
| 16552 var arg_tagString = "foo"; | |
| 16553 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16554 var path = (req.url).path; | |
| 16555 var pathOffset = 0; | |
| 16556 var index; | |
| 16557 var subPart; | |
| 16558 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16559 pathOffset += 1; | |
| 16560 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16561 pathOffset += 18; | |
| 16562 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16563 pathOffset += 13; | |
| 16564 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16565 unittest.expect(index >= 0, unittest.isTrue); | |
| 16566 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16567 pathOffset = index; | |
| 16568 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16569 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16570 pathOffset += 21; | |
| 16571 | |
| 16572 var query = (req.url).query; | |
| 16573 var queryOffset = 0; | |
| 16574 var queryMap = {}; | |
| 16575 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16576 parseBool(n) { | |
| 16577 if (n == "true") return true; | |
| 16578 if (n == "false") return false; | |
| 16579 if (n == null) return null; | |
| 16580 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16581 } | |
| 16582 if (query.length > 0) { | |
| 16583 for (var part in query.split("&")) { | |
| 16584 var keyvalue = part.split("="); | |
| 16585 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16586 } | |
| 16587 } | |
| 16588 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16589 unittest.expect(queryMap["floodlightActivityGroupIds"], unittest.equals(
arg_floodlightActivityGroupIds)); | |
| 16590 unittest.expect(queryMap["floodlightActivityGroupName"].first, unittest.
equals(arg_floodlightActivityGroupName)); | |
| 16591 unittest.expect(queryMap["floodlightActivityGroupTagString"].first, unit
test.equals(arg_floodlightActivityGroupTagString)); | |
| 16592 unittest.expect(queryMap["floodlightActivityGroupType"].first, unittest.
equals(arg_floodlightActivityGroupType)); | |
| 16593 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16594 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16595 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16596 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16597 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16598 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16599 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16600 unittest.expect(queryMap["tagString"].first, unittest.equals(arg_tagStri
ng)); | |
| 16601 | |
| 16602 | |
| 16603 var h = { | |
| 16604 "content-type" : "application/json; charset=utf-8", | |
| 16605 }; | |
| 16606 var resp = convert.JSON.encode(buildFloodlightActivitiesListResponse()); | |
| 16607 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16608 }), true); | |
| 16609 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) { | |
| 16610 checkFloodlightActivitiesListResponse(response); | |
| 16611 }))); | |
| 16612 }); | |
| 16613 | |
| 16614 unittest.test("method--patch", () { | |
| 16615 | |
| 16616 var mock = new HttpServerMock(); | |
| 16617 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16618 var arg_request = buildFloodlightActivity(); | |
| 16619 var arg_profileId = "foo"; | |
| 16620 var arg_id = "foo"; | |
| 16621 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16622 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16623 checkFloodlightActivity(obj); | |
| 16624 | |
| 16625 var path = (req.url).path; | |
| 16626 var pathOffset = 0; | |
| 16627 var index; | |
| 16628 var subPart; | |
| 16629 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16630 pathOffset += 1; | |
| 16631 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16632 pathOffset += 18; | |
| 16633 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16634 pathOffset += 13; | |
| 16635 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16636 unittest.expect(index >= 0, unittest.isTrue); | |
| 16637 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16638 pathOffset = index; | |
| 16639 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16640 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16641 pathOffset += 21; | |
| 16642 | |
| 16643 var query = (req.url).query; | |
| 16644 var queryOffset = 0; | |
| 16645 var queryMap = {}; | |
| 16646 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16647 parseBool(n) { | |
| 16648 if (n == "true") return true; | |
| 16649 if (n == "false") return false; | |
| 16650 if (n == null) return null; | |
| 16651 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16652 } | |
| 16653 if (query.length > 0) { | |
| 16654 for (var part in query.split("&")) { | |
| 16655 var keyvalue = part.split("="); | |
| 16656 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16657 } | |
| 16658 } | |
| 16659 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16660 | |
| 16661 | |
| 16662 var h = { | |
| 16663 "content-type" : "application/json; charset=utf-8", | |
| 16664 }; | |
| 16665 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16666 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16667 }), true); | |
| 16668 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivity response) { | |
| 16669 checkFloodlightActivity(response); | |
| 16670 }))); | |
| 16671 }); | |
| 16672 | |
| 16673 unittest.test("method--update", () { | |
| 16674 | |
| 16675 var mock = new HttpServerMock(); | |
| 16676 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16677 var arg_request = buildFloodlightActivity(); | |
| 16678 var arg_profileId = "foo"; | |
| 16679 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16680 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16681 checkFloodlightActivity(obj); | |
| 16682 | |
| 16683 var path = (req.url).path; | |
| 16684 var pathOffset = 0; | |
| 16685 var index; | |
| 16686 var subPart; | |
| 16687 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16688 pathOffset += 1; | |
| 16689 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16690 pathOffset += 18; | |
| 16691 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16692 pathOffset += 13; | |
| 16693 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16694 unittest.expect(index >= 0, unittest.isTrue); | |
| 16695 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16696 pathOffset = index; | |
| 16697 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16698 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16699 pathOffset += 21; | |
| 16700 | |
| 16701 var query = (req.url).query; | |
| 16702 var queryOffset = 0; | |
| 16703 var queryMap = {}; | |
| 16704 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16705 parseBool(n) { | |
| 16706 if (n == "true") return true; | |
| 16707 if (n == "false") return false; | |
| 16708 if (n == null) return null; | |
| 16709 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16710 } | |
| 16711 if (query.length > 0) { | |
| 16712 for (var part in query.split("&")) { | |
| 16713 var keyvalue = part.split("="); | |
| 16714 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16715 } | |
| 16716 } | |
| 16717 | |
| 16718 | |
| 16719 var h = { | |
| 16720 "content-type" : "application/json; charset=utf-8", | |
| 16721 }; | |
| 16722 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16723 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16724 }), true); | |
| 16725 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16726 checkFloodlightActivity(response); | |
| 16727 }))); | |
| 16728 }); | |
| 16729 | |
| 16730 }); | |
| 16731 | |
| 16732 | |
| 16733 unittest.group("resource-FloodlightActivityGroupsResourceApi", () { | |
| 16734 unittest.test("method--get", () { | |
| 16735 | |
| 16736 var mock = new HttpServerMock(); | |
| 16737 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16738 var arg_profileId = "foo"; | |
| 16739 var arg_id = "foo"; | |
| 16740 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16741 var path = (req.url).path; | |
| 16742 var pathOffset = 0; | |
| 16743 var index; | |
| 16744 var subPart; | |
| 16745 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16746 pathOffset += 1; | |
| 16747 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16748 pathOffset += 18; | |
| 16749 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16750 pathOffset += 13; | |
| 16751 index = path.indexOf("/floodlightActivityGroups/", pathOffset); | |
| 16752 unittest.expect(index >= 0, unittest.isTrue); | |
| 16753 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16754 pathOffset = index; | |
| 16755 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16756 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightActivityGroups/")); | |
| 16757 pathOffset += 26; | |
| 16758 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16759 pathOffset = path.length; | |
| 16760 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16761 | |
| 16762 var query = (req.url).query; | |
| 16763 var queryOffset = 0; | |
| 16764 var queryMap = {}; | |
| 16765 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16766 parseBool(n) { | |
| 16767 if (n == "true") return true; | |
| 16768 if (n == "false") return false; | |
| 16769 if (n == null) return null; | |
| 16770 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16771 } | |
| 16772 if (query.length > 0) { | |
| 16773 for (var part in query.split("&")) { | |
| 16774 var keyvalue = part.split("="); | |
| 16775 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16776 } | |
| 16777 } | |
| 16778 | |
| 16779 | |
| 16780 var h = { | |
| 16781 "content-type" : "application/json; charset=utf-8", | |
| 16782 }; | |
| 16783 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16784 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16785 }), true); | |
| 16786 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivityGroup response) { | |
| 16787 checkFloodlightActivityGroup(response); | |
| 16788 }))); | |
| 16789 }); | |
| 16790 | |
| 16791 unittest.test("method--insert", () { | |
| 16792 | |
| 16793 var mock = new HttpServerMock(); | |
| 16794 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16795 var arg_request = buildFloodlightActivityGroup(); | |
| 16796 var arg_profileId = "foo"; | |
| 16797 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16798 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16799 checkFloodlightActivityGroup(obj); | |
| 16800 | |
| 16801 var path = (req.url).path; | |
| 16802 var pathOffset = 0; | |
| 16803 var index; | |
| 16804 var subPart; | |
| 16805 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16806 pathOffset += 1; | |
| 16807 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16808 pathOffset += 18; | |
| 16809 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16810 pathOffset += 13; | |
| 16811 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16812 unittest.expect(index >= 0, unittest.isTrue); | |
| 16813 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16814 pathOffset = index; | |
| 16815 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16816 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16817 pathOffset += 25; | |
| 16818 | |
| 16819 var query = (req.url).query; | |
| 16820 var queryOffset = 0; | |
| 16821 var queryMap = {}; | |
| 16822 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16823 parseBool(n) { | |
| 16824 if (n == "true") return true; | |
| 16825 if (n == "false") return false; | |
| 16826 if (n == null) return null; | |
| 16827 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16828 } | |
| 16829 if (query.length > 0) { | |
| 16830 for (var part in query.split("&")) { | |
| 16831 var keyvalue = part.split("="); | |
| 16832 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16833 } | |
| 16834 } | |
| 16835 | |
| 16836 | |
| 16837 var h = { | |
| 16838 "content-type" : "application/json; charset=utf-8", | |
| 16839 }; | |
| 16840 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16841 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16842 }), true); | |
| 16843 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 16844 checkFloodlightActivityGroup(response); | |
| 16845 }))); | |
| 16846 }); | |
| 16847 | |
| 16848 unittest.test("method--list", () { | |
| 16849 | |
| 16850 var mock = new HttpServerMock(); | |
| 16851 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16852 var arg_profileId = "foo"; | |
| 16853 var arg_advertiserId = "foo"; | |
| 16854 var arg_floodlightConfigurationId = "foo"; | |
| 16855 var arg_ids = buildUnnamed2110(); | |
| 16856 var arg_maxResults = 42; | |
| 16857 var arg_pageToken = "foo"; | |
| 16858 var arg_searchString = "foo"; | |
| 16859 var arg_sortField = "foo"; | |
| 16860 var arg_sortOrder = "foo"; | |
| 16861 var arg_type = "foo"; | |
| 16862 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16863 var path = (req.url).path; | |
| 16864 var pathOffset = 0; | |
| 16865 var index; | |
| 16866 var subPart; | |
| 16867 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16868 pathOffset += 1; | |
| 16869 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16870 pathOffset += 18; | |
| 16871 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16872 pathOffset += 13; | |
| 16873 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16874 unittest.expect(index >= 0, unittest.isTrue); | |
| 16875 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16876 pathOffset = index; | |
| 16877 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16878 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16879 pathOffset += 25; | |
| 16880 | |
| 16881 var query = (req.url).query; | |
| 16882 var queryOffset = 0; | |
| 16883 var queryMap = {}; | |
| 16884 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16885 parseBool(n) { | |
| 16886 if (n == "true") return true; | |
| 16887 if (n == "false") return false; | |
| 16888 if (n == null) return null; | |
| 16889 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16890 } | |
| 16891 if (query.length > 0) { | |
| 16892 for (var part in query.split("&")) { | |
| 16893 var keyvalue = part.split("="); | |
| 16894 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16895 } | |
| 16896 } | |
| 16897 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16898 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16899 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16900 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16901 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16902 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16903 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16904 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16905 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 16906 | |
| 16907 | |
| 16908 var h = { | |
| 16909 "content-type" : "application/json; charset=utf-8", | |
| 16910 }; | |
| 16911 var resp = convert.JSON.encode(buildFloodlightActivityGroupsListResponse
()); | |
| 16912 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16913 }), true); | |
| 16914 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) { | |
| 16915 checkFloodlightActivityGroupsListResponse(response); | |
| 16916 }))); | |
| 16917 }); | |
| 16918 | |
| 16919 unittest.test("method--patch", () { | |
| 16920 | |
| 16921 var mock = new HttpServerMock(); | |
| 16922 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16923 var arg_request = buildFloodlightActivityGroup(); | |
| 16924 var arg_profileId = "foo"; | |
| 16925 var arg_id = "foo"; | |
| 16926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16927 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16928 checkFloodlightActivityGroup(obj); | |
| 16929 | |
| 16930 var path = (req.url).path; | |
| 16931 var pathOffset = 0; | |
| 16932 var index; | |
| 16933 var subPart; | |
| 16934 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16935 pathOffset += 1; | |
| 16936 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16937 pathOffset += 18; | |
| 16938 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16939 pathOffset += 13; | |
| 16940 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16941 unittest.expect(index >= 0, unittest.isTrue); | |
| 16942 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16943 pathOffset = index; | |
| 16944 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16945 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16946 pathOffset += 25; | |
| 16947 | |
| 16948 var query = (req.url).query; | |
| 16949 var queryOffset = 0; | |
| 16950 var queryMap = {}; | |
| 16951 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16952 parseBool(n) { | |
| 16953 if (n == "true") return true; | |
| 16954 if (n == "false") return false; | |
| 16955 if (n == null) return null; | |
| 16956 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16957 } | |
| 16958 if (query.length > 0) { | |
| 16959 for (var part in query.split("&")) { | |
| 16960 var keyvalue = part.split("="); | |
| 16961 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16962 } | |
| 16963 } | |
| 16964 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16965 | |
| 16966 | |
| 16967 var h = { | |
| 16968 "content-type" : "application/json; charset=utf-8", | |
| 16969 }; | |
| 16970 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16971 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16972 }), true); | |
| 16973 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivityGroup response) { | |
| 16974 checkFloodlightActivityGroup(response); | |
| 16975 }))); | |
| 16976 }); | |
| 16977 | |
| 16978 unittest.test("method--update", () { | |
| 16979 | |
| 16980 var mock = new HttpServerMock(); | |
| 16981 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16982 var arg_request = buildFloodlightActivityGroup(); | |
| 16983 var arg_profileId = "foo"; | |
| 16984 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16985 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16986 checkFloodlightActivityGroup(obj); | |
| 16987 | |
| 16988 var path = (req.url).path; | |
| 16989 var pathOffset = 0; | |
| 16990 var index; | |
| 16991 var subPart; | |
| 16992 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16993 pathOffset += 1; | |
| 16994 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 16995 pathOffset += 18; | |
| 16996 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16997 pathOffset += 13; | |
| 16998 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16999 unittest.expect(index >= 0, unittest.isTrue); | |
| 17000 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17001 pathOffset = index; | |
| 17002 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17003 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17004 pathOffset += 25; | |
| 17005 | |
| 17006 var query = (req.url).query; | |
| 17007 var queryOffset = 0; | |
| 17008 var queryMap = {}; | |
| 17009 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17010 parseBool(n) { | |
| 17011 if (n == "true") return true; | |
| 17012 if (n == "false") return false; | |
| 17013 if (n == null) return null; | |
| 17014 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17015 } | |
| 17016 if (query.length > 0) { | |
| 17017 for (var part in query.split("&")) { | |
| 17018 var keyvalue = part.split("="); | |
| 17019 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17020 } | |
| 17021 } | |
| 17022 | |
| 17023 | |
| 17024 var h = { | |
| 17025 "content-type" : "application/json; charset=utf-8", | |
| 17026 }; | |
| 17027 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17028 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17029 }), true); | |
| 17030 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 17031 checkFloodlightActivityGroup(response); | |
| 17032 }))); | |
| 17033 }); | |
| 17034 | |
| 17035 }); | |
| 17036 | |
| 17037 | |
| 17038 unittest.group("resource-FloodlightConfigurationsResourceApi", () { | |
| 17039 unittest.test("method--get", () { | |
| 17040 | |
| 17041 var mock = new HttpServerMock(); | |
| 17042 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17043 var arg_profileId = "foo"; | |
| 17044 var arg_id = "foo"; | |
| 17045 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17046 var path = (req.url).path; | |
| 17047 var pathOffset = 0; | |
| 17048 var index; | |
| 17049 var subPart; | |
| 17050 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17051 pathOffset += 1; | |
| 17052 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17053 pathOffset += 18; | |
| 17054 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17055 pathOffset += 13; | |
| 17056 index = path.indexOf("/floodlightConfigurations/", pathOffset); | |
| 17057 unittest.expect(index >= 0, unittest.isTrue); | |
| 17058 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17059 pathOffset = index; | |
| 17060 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17061 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightConfigurations/")); | |
| 17062 pathOffset += 26; | |
| 17063 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17064 pathOffset = path.length; | |
| 17065 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17066 | |
| 17067 var query = (req.url).query; | |
| 17068 var queryOffset = 0; | |
| 17069 var queryMap = {}; | |
| 17070 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17071 parseBool(n) { | |
| 17072 if (n == "true") return true; | |
| 17073 if (n == "false") return false; | |
| 17074 if (n == null) return null; | |
| 17075 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17076 } | |
| 17077 if (query.length > 0) { | |
| 17078 for (var part in query.split("&")) { | |
| 17079 var keyvalue = part.split("="); | |
| 17080 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17081 } | |
| 17082 } | |
| 17083 | |
| 17084 | |
| 17085 var h = { | |
| 17086 "content-type" : "application/json; charset=utf-8", | |
| 17087 }; | |
| 17088 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17089 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17090 }), true); | |
| 17091 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightC
onfiguration response) { | |
| 17092 checkFloodlightConfiguration(response); | |
| 17093 }))); | |
| 17094 }); | |
| 17095 | |
| 17096 unittest.test("method--list", () { | |
| 17097 | |
| 17098 var mock = new HttpServerMock(); | |
| 17099 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17100 var arg_profileId = "foo"; | |
| 17101 var arg_ids = buildUnnamed2111(); | |
| 17102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17103 var path = (req.url).path; | |
| 17104 var pathOffset = 0; | |
| 17105 var index; | |
| 17106 var subPart; | |
| 17107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17108 pathOffset += 1; | |
| 17109 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17110 pathOffset += 18; | |
| 17111 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17112 pathOffset += 13; | |
| 17113 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17114 unittest.expect(index >= 0, unittest.isTrue); | |
| 17115 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17116 pathOffset = index; | |
| 17117 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17118 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17119 pathOffset += 25; | |
| 17120 | |
| 17121 var query = (req.url).query; | |
| 17122 var queryOffset = 0; | |
| 17123 var queryMap = {}; | |
| 17124 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17125 parseBool(n) { | |
| 17126 if (n == "true") return true; | |
| 17127 if (n == "false") return false; | |
| 17128 if (n == null) return null; | |
| 17129 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17130 } | |
| 17131 if (query.length > 0) { | |
| 17132 for (var part in query.split("&")) { | |
| 17133 var keyvalue = part.split("="); | |
| 17134 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17135 } | |
| 17136 } | |
| 17137 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17138 | |
| 17139 | |
| 17140 var h = { | |
| 17141 "content-type" : "application/json; charset=utf-8", | |
| 17142 }; | |
| 17143 var resp = convert.JSON.encode(buildFloodlightConfigurationsListResponse
()); | |
| 17144 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17145 }), true); | |
| 17146 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.Floo
dlightConfigurationsListResponse response) { | |
| 17147 checkFloodlightConfigurationsListResponse(response); | |
| 17148 }))); | |
| 17149 }); | |
| 17150 | |
| 17151 unittest.test("method--patch", () { | |
| 17152 | |
| 17153 var mock = new HttpServerMock(); | |
| 17154 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17155 var arg_request = buildFloodlightConfiguration(); | |
| 17156 var arg_profileId = "foo"; | |
| 17157 var arg_id = "foo"; | |
| 17158 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17159 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17160 checkFloodlightConfiguration(obj); | |
| 17161 | |
| 17162 var path = (req.url).path; | |
| 17163 var pathOffset = 0; | |
| 17164 var index; | |
| 17165 var subPart; | |
| 17166 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17167 pathOffset += 1; | |
| 17168 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17169 pathOffset += 18; | |
| 17170 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17171 pathOffset += 13; | |
| 17172 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17173 unittest.expect(index >= 0, unittest.isTrue); | |
| 17174 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17175 pathOffset = index; | |
| 17176 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17177 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17178 pathOffset += 25; | |
| 17179 | |
| 17180 var query = (req.url).query; | |
| 17181 var queryOffset = 0; | |
| 17182 var queryMap = {}; | |
| 17183 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17184 parseBool(n) { | |
| 17185 if (n == "true") return true; | |
| 17186 if (n == "false") return false; | |
| 17187 if (n == null) return null; | |
| 17188 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17189 } | |
| 17190 if (query.length > 0) { | |
| 17191 for (var part in query.split("&")) { | |
| 17192 var keyvalue = part.split("="); | |
| 17193 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17194 } | |
| 17195 } | |
| 17196 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17197 | |
| 17198 | |
| 17199 var h = { | |
| 17200 "content-type" : "application/json; charset=utf-8", | |
| 17201 }; | |
| 17202 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17203 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17204 }), true); | |
| 17205 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightConfiguration response) { | |
| 17206 checkFloodlightConfiguration(response); | |
| 17207 }))); | |
| 17208 }); | |
| 17209 | |
| 17210 unittest.test("method--update", () { | |
| 17211 | |
| 17212 var mock = new HttpServerMock(); | |
| 17213 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17214 var arg_request = buildFloodlightConfiguration(); | |
| 17215 var arg_profileId = "foo"; | |
| 17216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17217 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17218 checkFloodlightConfiguration(obj); | |
| 17219 | |
| 17220 var path = (req.url).path; | |
| 17221 var pathOffset = 0; | |
| 17222 var index; | |
| 17223 var subPart; | |
| 17224 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17225 pathOffset += 1; | |
| 17226 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17227 pathOffset += 18; | |
| 17228 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17229 pathOffset += 13; | |
| 17230 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17231 unittest.expect(index >= 0, unittest.isTrue); | |
| 17232 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17233 pathOffset = index; | |
| 17234 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17235 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17236 pathOffset += 25; | |
| 17237 | |
| 17238 var query = (req.url).query; | |
| 17239 var queryOffset = 0; | |
| 17240 var queryMap = {}; | |
| 17241 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17242 parseBool(n) { | |
| 17243 if (n == "true") return true; | |
| 17244 if (n == "false") return false; | |
| 17245 if (n == null) return null; | |
| 17246 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17247 } | |
| 17248 if (query.length > 0) { | |
| 17249 for (var part in query.split("&")) { | |
| 17250 var keyvalue = part.split("="); | |
| 17251 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17252 } | |
| 17253 } | |
| 17254 | |
| 17255 | |
| 17256 var h = { | |
| 17257 "content-type" : "application/json; charset=utf-8", | |
| 17258 }; | |
| 17259 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17260 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17261 }), true); | |
| 17262 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightConfiguration response) { | |
| 17263 checkFloodlightConfiguration(response); | |
| 17264 }))); | |
| 17265 }); | |
| 17266 | |
| 17267 }); | |
| 17268 | |
| 17269 | |
| 17270 unittest.group("resource-InventoryItemsResourceApi", () { | |
| 17271 unittest.test("method--get", () { | |
| 17272 | |
| 17273 var mock = new HttpServerMock(); | |
| 17274 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17275 var arg_profileId = "foo"; | |
| 17276 var arg_projectId = "foo"; | |
| 17277 var arg_id = "foo"; | |
| 17278 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17279 var path = (req.url).path; | |
| 17280 var pathOffset = 0; | |
| 17281 var index; | |
| 17282 var subPart; | |
| 17283 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17284 pathOffset += 1; | |
| 17285 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17286 pathOffset += 18; | |
| 17287 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17288 pathOffset += 13; | |
| 17289 index = path.indexOf("/projects/", pathOffset); | |
| 17290 unittest.expect(index >= 0, unittest.isTrue); | |
| 17291 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17292 pathOffset = index; | |
| 17293 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17294 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17295 pathOffset += 10; | |
| 17296 index = path.indexOf("/inventoryItems/", pathOffset); | |
| 17297 unittest.expect(index >= 0, unittest.isTrue); | |
| 17298 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17299 pathOffset = index; | |
| 17300 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17301 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/inventoryItems/")); | |
| 17302 pathOffset += 16; | |
| 17303 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17304 pathOffset = path.length; | |
| 17305 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17306 | |
| 17307 var query = (req.url).query; | |
| 17308 var queryOffset = 0; | |
| 17309 var queryMap = {}; | |
| 17310 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17311 parseBool(n) { | |
| 17312 if (n == "true") return true; | |
| 17313 if (n == "false") return false; | |
| 17314 if (n == null) return null; | |
| 17315 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17316 } | |
| 17317 if (query.length > 0) { | |
| 17318 for (var part in query.split("&")) { | |
| 17319 var keyvalue = part.split("="); | |
| 17320 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17321 } | |
| 17322 } | |
| 17323 | |
| 17324 | |
| 17325 var h = { | |
| 17326 "content-type" : "application/json; charset=utf-8", | |
| 17327 }; | |
| 17328 var resp = convert.JSON.encode(buildInventoryItem()); | |
| 17329 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17330 }), true); | |
| 17331 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.InventoryItem response) { | |
| 17332 checkInventoryItem(response); | |
| 17333 }))); | |
| 17334 }); | |
| 17335 | |
| 17336 unittest.test("method--list", () { | |
| 17337 | |
| 17338 var mock = new HttpServerMock(); | |
| 17339 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17340 var arg_profileId = "foo"; | |
| 17341 var arg_projectId = "foo"; | |
| 17342 var arg_ids = buildUnnamed2112(); | |
| 17343 var arg_inPlan = true; | |
| 17344 var arg_maxResults = 42; | |
| 17345 var arg_orderId = buildUnnamed2113(); | |
| 17346 var arg_pageToken = "foo"; | |
| 17347 var arg_siteId = buildUnnamed2114(); | |
| 17348 var arg_sortField = "foo"; | |
| 17349 var arg_sortOrder = "foo"; | |
| 17350 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17351 var path = (req.url).path; | |
| 17352 var pathOffset = 0; | |
| 17353 var index; | |
| 17354 var subPart; | |
| 17355 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17356 pathOffset += 1; | |
| 17357 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17358 pathOffset += 18; | |
| 17359 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17360 pathOffset += 13; | |
| 17361 index = path.indexOf("/projects/", pathOffset); | |
| 17362 unittest.expect(index >= 0, unittest.isTrue); | |
| 17363 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17364 pathOffset = index; | |
| 17365 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17366 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17367 pathOffset += 10; | |
| 17368 index = path.indexOf("/inventoryItems", pathOffset); | |
| 17369 unittest.expect(index >= 0, unittest.isTrue); | |
| 17370 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17371 pathOffset = index; | |
| 17372 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17373 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/inventoryItems")); | |
| 17374 pathOffset += 15; | |
| 17375 | |
| 17376 var query = (req.url).query; | |
| 17377 var queryOffset = 0; | |
| 17378 var queryMap = {}; | |
| 17379 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17380 parseBool(n) { | |
| 17381 if (n == "true") return true; | |
| 17382 if (n == "false") return false; | |
| 17383 if (n == null) return null; | |
| 17384 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17385 } | |
| 17386 if (query.length > 0) { | |
| 17387 for (var part in query.split("&")) { | |
| 17388 var keyvalue = part.split("="); | |
| 17389 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17390 } | |
| 17391 } | |
| 17392 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17393 unittest.expect(queryMap["inPlan"].first, unittest.equals("$arg_inPlan")
); | |
| 17394 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 17395 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 17396 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 17397 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 17398 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 17399 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 17400 | |
| 17401 | |
| 17402 var h = { | |
| 17403 "content-type" : "application/json; charset=utf-8", | |
| 17404 }; | |
| 17405 var resp = convert.JSON.encode(buildInventoryItemsListResponse()); | |
| 17406 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17407 }), true); | |
| 17408 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) { | |
| 17409 checkInventoryItemsListResponse(response); | |
| 17410 }))); | |
| 17411 }); | |
| 17412 | |
| 17413 }); | |
| 17414 | |
| 17415 | |
| 17416 unittest.group("resource-LandingPagesResourceApi", () { | |
| 17417 unittest.test("method--delete", () { | |
| 17418 | |
| 17419 var mock = new HttpServerMock(); | |
| 17420 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17421 var arg_profileId = "foo"; | |
| 17422 var arg_campaignId = "foo"; | |
| 17423 var arg_id = "foo"; | |
| 17424 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17425 var path = (req.url).path; | |
| 17426 var pathOffset = 0; | |
| 17427 var index; | |
| 17428 var subPart; | |
| 17429 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17430 pathOffset += 1; | |
| 17431 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17432 pathOffset += 18; | |
| 17433 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17434 pathOffset += 13; | |
| 17435 index = path.indexOf("/campaigns/", pathOffset); | |
| 17436 unittest.expect(index >= 0, unittest.isTrue); | |
| 17437 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17438 pathOffset = index; | |
| 17439 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17440 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17441 pathOffset += 11; | |
| 17442 index = path.indexOf("/landingPages/", pathOffset); | |
| 17443 unittest.expect(index >= 0, unittest.isTrue); | |
| 17444 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17445 pathOffset = index; | |
| 17446 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17447 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17448 pathOffset += 14; | |
| 17449 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17450 pathOffset = path.length; | |
| 17451 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17452 | |
| 17453 var query = (req.url).query; | |
| 17454 var queryOffset = 0; | |
| 17455 var queryMap = {}; | |
| 17456 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17457 parseBool(n) { | |
| 17458 if (n == "true") return true; | |
| 17459 if (n == "false") return false; | |
| 17460 if (n == null) return null; | |
| 17461 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17462 } | |
| 17463 if (query.length > 0) { | |
| 17464 for (var part in query.split("&")) { | |
| 17465 var keyvalue = part.split("="); | |
| 17466 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17467 } | |
| 17468 } | |
| 17469 | |
| 17470 | |
| 17471 var h = { | |
| 17472 "content-type" : "application/json; charset=utf-8", | |
| 17473 }; | |
| 17474 var resp = ""; | |
| 17475 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17476 }), true); | |
| 17477 res.delete(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsyn
c((_) {})); | |
| 17478 }); | |
| 17479 | |
| 17480 unittest.test("method--get", () { | |
| 17481 | |
| 17482 var mock = new HttpServerMock(); | |
| 17483 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17484 var arg_profileId = "foo"; | |
| 17485 var arg_campaignId = "foo"; | |
| 17486 var arg_id = "foo"; | |
| 17487 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17488 var path = (req.url).path; | |
| 17489 var pathOffset = 0; | |
| 17490 var index; | |
| 17491 var subPart; | |
| 17492 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17493 pathOffset += 1; | |
| 17494 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17495 pathOffset += 18; | |
| 17496 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17497 pathOffset += 13; | |
| 17498 index = path.indexOf("/campaigns/", pathOffset); | |
| 17499 unittest.expect(index >= 0, unittest.isTrue); | |
| 17500 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17501 pathOffset = index; | |
| 17502 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17503 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17504 pathOffset += 11; | |
| 17505 index = path.indexOf("/landingPages/", pathOffset); | |
| 17506 unittest.expect(index >= 0, unittest.isTrue); | |
| 17507 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17508 pathOffset = index; | |
| 17509 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17510 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17511 pathOffset += 14; | |
| 17512 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17513 pathOffset = path.length; | |
| 17514 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17515 | |
| 17516 var query = (req.url).query; | |
| 17517 var queryOffset = 0; | |
| 17518 var queryMap = {}; | |
| 17519 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17520 parseBool(n) { | |
| 17521 if (n == "true") return true; | |
| 17522 if (n == "false") return false; | |
| 17523 if (n == null) return null; | |
| 17524 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17525 } | |
| 17526 if (query.length > 0) { | |
| 17527 for (var part in query.split("&")) { | |
| 17528 var keyvalue = part.split("="); | |
| 17529 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17530 } | |
| 17531 } | |
| 17532 | |
| 17533 | |
| 17534 var h = { | |
| 17535 "content-type" : "application/json; charset=utf-8", | |
| 17536 }; | |
| 17537 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17538 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17539 }), true); | |
| 17540 res.get(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsync((
(api.LandingPage response) { | |
| 17541 checkLandingPage(response); | |
| 17542 }))); | |
| 17543 }); | |
| 17544 | |
| 17545 unittest.test("method--insert", () { | |
| 17546 | |
| 17547 var mock = new HttpServerMock(); | |
| 17548 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17549 var arg_request = buildLandingPage(); | |
| 17550 var arg_profileId = "foo"; | |
| 17551 var arg_campaignId = "foo"; | |
| 17552 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17553 var obj = new api.LandingPage.fromJson(json); | |
| 17554 checkLandingPage(obj); | |
| 17555 | |
| 17556 var path = (req.url).path; | |
| 17557 var pathOffset = 0; | |
| 17558 var index; | |
| 17559 var subPart; | |
| 17560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17561 pathOffset += 1; | |
| 17562 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17563 pathOffset += 18; | |
| 17564 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17565 pathOffset += 13; | |
| 17566 index = path.indexOf("/campaigns/", pathOffset); | |
| 17567 unittest.expect(index >= 0, unittest.isTrue); | |
| 17568 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17569 pathOffset = index; | |
| 17570 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17571 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17572 pathOffset += 11; | |
| 17573 index = path.indexOf("/landingPages", pathOffset); | |
| 17574 unittest.expect(index >= 0, unittest.isTrue); | |
| 17575 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17576 pathOffset = index; | |
| 17577 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17578 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17579 pathOffset += 13; | |
| 17580 | |
| 17581 var query = (req.url).query; | |
| 17582 var queryOffset = 0; | |
| 17583 var queryMap = {}; | |
| 17584 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17585 parseBool(n) { | |
| 17586 if (n == "true") return true; | |
| 17587 if (n == "false") return false; | |
| 17588 if (n == null) return null; | |
| 17589 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17590 } | |
| 17591 if (query.length > 0) { | |
| 17592 for (var part in query.split("&")) { | |
| 17593 var keyvalue = part.split("="); | |
| 17594 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17595 } | |
| 17596 } | |
| 17597 | |
| 17598 | |
| 17599 var h = { | |
| 17600 "content-type" : "application/json; charset=utf-8", | |
| 17601 }; | |
| 17602 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17603 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17604 }), true); | |
| 17605 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17606 checkLandingPage(response); | |
| 17607 }))); | |
| 17608 }); | |
| 17609 | |
| 17610 unittest.test("method--list", () { | |
| 17611 | |
| 17612 var mock = new HttpServerMock(); | |
| 17613 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17614 var arg_profileId = "foo"; | |
| 17615 var arg_campaignId = "foo"; | |
| 17616 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17617 var path = (req.url).path; | |
| 17618 var pathOffset = 0; | |
| 17619 var index; | |
| 17620 var subPart; | |
| 17621 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17622 pathOffset += 1; | |
| 17623 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17624 pathOffset += 18; | |
| 17625 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17626 pathOffset += 13; | |
| 17627 index = path.indexOf("/campaigns/", pathOffset); | |
| 17628 unittest.expect(index >= 0, unittest.isTrue); | |
| 17629 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17630 pathOffset = index; | |
| 17631 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17632 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17633 pathOffset += 11; | |
| 17634 index = path.indexOf("/landingPages", pathOffset); | |
| 17635 unittest.expect(index >= 0, unittest.isTrue); | |
| 17636 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17637 pathOffset = index; | |
| 17638 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17639 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17640 pathOffset += 13; | |
| 17641 | |
| 17642 var query = (req.url).query; | |
| 17643 var queryOffset = 0; | |
| 17644 var queryMap = {}; | |
| 17645 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17646 parseBool(n) { | |
| 17647 if (n == "true") return true; | |
| 17648 if (n == "false") return false; | |
| 17649 if (n == null) return null; | |
| 17650 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17651 } | |
| 17652 if (query.length > 0) { | |
| 17653 for (var part in query.split("&")) { | |
| 17654 var keyvalue = part.split("="); | |
| 17655 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17656 } | |
| 17657 } | |
| 17658 | |
| 17659 | |
| 17660 var h = { | |
| 17661 "content-type" : "application/json; charset=utf-8", | |
| 17662 }; | |
| 17663 var resp = convert.JSON.encode(buildLandingPagesListResponse()); | |
| 17664 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17665 }), true); | |
| 17666 res.list(arg_profileId, arg_campaignId).then(unittest.expectAsync(((api.La
ndingPagesListResponse response) { | |
| 17667 checkLandingPagesListResponse(response); | |
| 17668 }))); | |
| 17669 }); | |
| 17670 | |
| 17671 unittest.test("method--patch", () { | |
| 17672 | |
| 17673 var mock = new HttpServerMock(); | |
| 17674 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17675 var arg_request = buildLandingPage(); | |
| 17676 var arg_profileId = "foo"; | |
| 17677 var arg_campaignId = "foo"; | |
| 17678 var arg_id = "foo"; | |
| 17679 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17680 var obj = new api.LandingPage.fromJson(json); | |
| 17681 checkLandingPage(obj); | |
| 17682 | |
| 17683 var path = (req.url).path; | |
| 17684 var pathOffset = 0; | |
| 17685 var index; | |
| 17686 var subPart; | |
| 17687 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17688 pathOffset += 1; | |
| 17689 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17690 pathOffset += 18; | |
| 17691 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17692 pathOffset += 13; | |
| 17693 index = path.indexOf("/campaigns/", pathOffset); | |
| 17694 unittest.expect(index >= 0, unittest.isTrue); | |
| 17695 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17696 pathOffset = index; | |
| 17697 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17698 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17699 pathOffset += 11; | |
| 17700 index = path.indexOf("/landingPages", pathOffset); | |
| 17701 unittest.expect(index >= 0, unittest.isTrue); | |
| 17702 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17703 pathOffset = index; | |
| 17704 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17705 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17706 pathOffset += 13; | |
| 17707 | |
| 17708 var query = (req.url).query; | |
| 17709 var queryOffset = 0; | |
| 17710 var queryMap = {}; | |
| 17711 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17712 parseBool(n) { | |
| 17713 if (n == "true") return true; | |
| 17714 if (n == "false") return false; | |
| 17715 if (n == null) return null; | |
| 17716 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17717 } | |
| 17718 if (query.length > 0) { | |
| 17719 for (var part in query.split("&")) { | |
| 17720 var keyvalue = part.split("="); | |
| 17721 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17722 } | |
| 17723 } | |
| 17724 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17725 | |
| 17726 | |
| 17727 var h = { | |
| 17728 "content-type" : "application/json; charset=utf-8", | |
| 17729 }; | |
| 17730 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17731 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17732 }), true); | |
| 17733 res.patch(arg_request, arg_profileId, arg_campaignId, arg_id).then(unittes
t.expectAsync(((api.LandingPage response) { | |
| 17734 checkLandingPage(response); | |
| 17735 }))); | |
| 17736 }); | |
| 17737 | |
| 17738 unittest.test("method--update", () { | |
| 17739 | |
| 17740 var mock = new HttpServerMock(); | |
| 17741 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17742 var arg_request = buildLandingPage(); | |
| 17743 var arg_profileId = "foo"; | |
| 17744 var arg_campaignId = "foo"; | |
| 17745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17746 var obj = new api.LandingPage.fromJson(json); | |
| 17747 checkLandingPage(obj); | |
| 17748 | |
| 17749 var path = (req.url).path; | |
| 17750 var pathOffset = 0; | |
| 17751 var index; | |
| 17752 var subPart; | |
| 17753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17754 pathOffset += 1; | |
| 17755 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17756 pathOffset += 18; | |
| 17757 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17758 pathOffset += 13; | |
| 17759 index = path.indexOf("/campaigns/", pathOffset); | |
| 17760 unittest.expect(index >= 0, unittest.isTrue); | |
| 17761 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17762 pathOffset = index; | |
| 17763 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17764 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17765 pathOffset += 11; | |
| 17766 index = path.indexOf("/landingPages", pathOffset); | |
| 17767 unittest.expect(index >= 0, unittest.isTrue); | |
| 17768 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17769 pathOffset = index; | |
| 17770 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17771 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17772 pathOffset += 13; | |
| 17773 | |
| 17774 var query = (req.url).query; | |
| 17775 var queryOffset = 0; | |
| 17776 var queryMap = {}; | |
| 17777 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17778 parseBool(n) { | |
| 17779 if (n == "true") return true; | |
| 17780 if (n == "false") return false; | |
| 17781 if (n == null) return null; | |
| 17782 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17783 } | |
| 17784 if (query.length > 0) { | |
| 17785 for (var part in query.split("&")) { | |
| 17786 var keyvalue = part.split("="); | |
| 17787 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17788 } | |
| 17789 } | |
| 17790 | |
| 17791 | |
| 17792 var h = { | |
| 17793 "content-type" : "application/json; charset=utf-8", | |
| 17794 }; | |
| 17795 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17796 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17797 }), true); | |
| 17798 res.update(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17799 checkLandingPage(response); | |
| 17800 }))); | |
| 17801 }); | |
| 17802 | |
| 17803 }); | |
| 17804 | |
| 17805 | |
| 17806 unittest.group("resource-MetrosResourceApi", () { | |
| 17807 unittest.test("method--list", () { | |
| 17808 | |
| 17809 var mock = new HttpServerMock(); | |
| 17810 api.MetrosResourceApi res = new api.DfareportingApi(mock).metros; | |
| 17811 var arg_profileId = "foo"; | |
| 17812 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17813 var path = (req.url).path; | |
| 17814 var pathOffset = 0; | |
| 17815 var index; | |
| 17816 var subPart; | |
| 17817 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17818 pathOffset += 1; | |
| 17819 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17820 pathOffset += 18; | |
| 17821 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17822 pathOffset += 13; | |
| 17823 index = path.indexOf("/metros", pathOffset); | |
| 17824 unittest.expect(index >= 0, unittest.isTrue); | |
| 17825 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17826 pathOffset = index; | |
| 17827 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17828 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/metros")); | |
| 17829 pathOffset += 7; | |
| 17830 | |
| 17831 var query = (req.url).query; | |
| 17832 var queryOffset = 0; | |
| 17833 var queryMap = {}; | |
| 17834 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17835 parseBool(n) { | |
| 17836 if (n == "true") return true; | |
| 17837 if (n == "false") return false; | |
| 17838 if (n == null) return null; | |
| 17839 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17840 } | |
| 17841 if (query.length > 0) { | |
| 17842 for (var part in query.split("&")) { | |
| 17843 var keyvalue = part.split("="); | |
| 17844 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17845 } | |
| 17846 } | |
| 17847 | |
| 17848 | |
| 17849 var h = { | |
| 17850 "content-type" : "application/json; charset=utf-8", | |
| 17851 }; | |
| 17852 var resp = convert.JSON.encode(buildMetrosListResponse()); | |
| 17853 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17854 }), true); | |
| 17855 res.list(arg_profileId).then(unittest.expectAsync(((api.MetrosListResponse
response) { | |
| 17856 checkMetrosListResponse(response); | |
| 17857 }))); | |
| 17858 }); | |
| 17859 | |
| 17860 }); | |
| 17861 | |
| 17862 | |
| 17863 unittest.group("resource-MobileCarriersResourceApi", () { | |
| 17864 unittest.test("method--get", () { | |
| 17865 | |
| 17866 var mock = new HttpServerMock(); | |
| 17867 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17868 var arg_profileId = "foo"; | |
| 17869 var arg_id = "foo"; | |
| 17870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17871 var path = (req.url).path; | |
| 17872 var pathOffset = 0; | |
| 17873 var index; | |
| 17874 var subPart; | |
| 17875 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17876 pathOffset += 1; | |
| 17877 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17878 pathOffset += 18; | |
| 17879 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17880 pathOffset += 13; | |
| 17881 index = path.indexOf("/mobileCarriers/", pathOffset); | |
| 17882 unittest.expect(index >= 0, unittest.isTrue); | |
| 17883 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17884 pathOffset = index; | |
| 17885 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17886 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/mobileCarriers/")); | |
| 17887 pathOffset += 16; | |
| 17888 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17889 pathOffset = path.length; | |
| 17890 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17891 | |
| 17892 var query = (req.url).query; | |
| 17893 var queryOffset = 0; | |
| 17894 var queryMap = {}; | |
| 17895 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17896 parseBool(n) { | |
| 17897 if (n == "true") return true; | |
| 17898 if (n == "false") return false; | |
| 17899 if (n == null) return null; | |
| 17900 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17901 } | |
| 17902 if (query.length > 0) { | |
| 17903 for (var part in query.split("&")) { | |
| 17904 var keyvalue = part.split("="); | |
| 17905 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17906 } | |
| 17907 } | |
| 17908 | |
| 17909 | |
| 17910 var h = { | |
| 17911 "content-type" : "application/json; charset=utf-8", | |
| 17912 }; | |
| 17913 var resp = convert.JSON.encode(buildMobileCarrier()); | |
| 17914 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17915 }), true); | |
| 17916 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.MobileCarri
er response) { | |
| 17917 checkMobileCarrier(response); | |
| 17918 }))); | |
| 17919 }); | |
| 17920 | |
| 17921 unittest.test("method--list", () { | |
| 17922 | |
| 17923 var mock = new HttpServerMock(); | |
| 17924 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17925 var arg_profileId = "foo"; | |
| 17926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17927 var path = (req.url).path; | |
| 17928 var pathOffset = 0; | |
| 17929 var index; | |
| 17930 var subPart; | |
| 17931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17932 pathOffset += 1; | |
| 17933 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17934 pathOffset += 18; | |
| 17935 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17936 pathOffset += 13; | |
| 17937 index = path.indexOf("/mobileCarriers", pathOffset); | |
| 17938 unittest.expect(index >= 0, unittest.isTrue); | |
| 17939 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17940 pathOffset = index; | |
| 17941 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17942 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/mobileCarriers")); | |
| 17943 pathOffset += 15; | |
| 17944 | |
| 17945 var query = (req.url).query; | |
| 17946 var queryOffset = 0; | |
| 17947 var queryMap = {}; | |
| 17948 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17949 parseBool(n) { | |
| 17950 if (n == "true") return true; | |
| 17951 if (n == "false") return false; | |
| 17952 if (n == null) return null; | |
| 17953 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17954 } | |
| 17955 if (query.length > 0) { | |
| 17956 for (var part in query.split("&")) { | |
| 17957 var keyvalue = part.split("="); | |
| 17958 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17959 } | |
| 17960 } | |
| 17961 | |
| 17962 | |
| 17963 var h = { | |
| 17964 "content-type" : "application/json; charset=utf-8", | |
| 17965 }; | |
| 17966 var resp = convert.JSON.encode(buildMobileCarriersListResponse()); | |
| 17967 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17968 }), true); | |
| 17969 res.list(arg_profileId).then(unittest.expectAsync(((api.MobileCarriersList
Response response) { | |
| 17970 checkMobileCarriersListResponse(response); | |
| 17971 }))); | |
| 17972 }); | |
| 17973 | |
| 17974 }); | |
| 17975 | |
| 17976 | |
| 17977 unittest.group("resource-OperatingSystemVersionsResourceApi", () { | |
| 17978 unittest.test("method--get", () { | |
| 17979 | |
| 17980 var mock = new HttpServerMock(); | |
| 17981 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 17982 var arg_profileId = "foo"; | |
| 17983 var arg_id = "foo"; | |
| 17984 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17985 var path = (req.url).path; | |
| 17986 var pathOffset = 0; | |
| 17987 var index; | |
| 17988 var subPart; | |
| 17989 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17990 pathOffset += 1; | |
| 17991 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 17992 pathOffset += 18; | |
| 17993 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17994 pathOffset += 13; | |
| 17995 index = path.indexOf("/operatingSystemVersions/", pathOffset); | |
| 17996 unittest.expect(index >= 0, unittest.isTrue); | |
| 17997 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17998 pathOffset = index; | |
| 17999 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18000 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/operatingSystemVersions/")); | |
| 18001 pathOffset += 25; | |
| 18002 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18003 pathOffset = path.length; | |
| 18004 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18005 | |
| 18006 var query = (req.url).query; | |
| 18007 var queryOffset = 0; | |
| 18008 var queryMap = {}; | |
| 18009 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18010 parseBool(n) { | |
| 18011 if (n == "true") return true; | |
| 18012 if (n == "false") return false; | |
| 18013 if (n == null) return null; | |
| 18014 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18015 } | |
| 18016 if (query.length > 0) { | |
| 18017 for (var part in query.split("&")) { | |
| 18018 var keyvalue = part.split("="); | |
| 18019 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18020 } | |
| 18021 } | |
| 18022 | |
| 18023 | |
| 18024 var h = { | |
| 18025 "content-type" : "application/json; charset=utf-8", | |
| 18026 }; | |
| 18027 var resp = convert.JSON.encode(buildOperatingSystemVersion()); | |
| 18028 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18029 }), true); | |
| 18030 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.OperatingSy
stemVersion response) { | |
| 18031 checkOperatingSystemVersion(response); | |
| 18032 }))); | |
| 18033 }); | |
| 18034 | |
| 18035 unittest.test("method--list", () { | |
| 18036 | |
| 18037 var mock = new HttpServerMock(); | |
| 18038 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18039 var arg_profileId = "foo"; | |
| 18040 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18041 var path = (req.url).path; | |
| 18042 var pathOffset = 0; | |
| 18043 var index; | |
| 18044 var subPart; | |
| 18045 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18046 pathOffset += 1; | |
| 18047 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18048 pathOffset += 18; | |
| 18049 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18050 pathOffset += 13; | |
| 18051 index = path.indexOf("/operatingSystemVersions", pathOffset); | |
| 18052 unittest.expect(index >= 0, unittest.isTrue); | |
| 18053 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18054 pathOffset = index; | |
| 18055 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18056 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/operatingSystemVersions")); | |
| 18057 pathOffset += 24; | |
| 18058 | |
| 18059 var query = (req.url).query; | |
| 18060 var queryOffset = 0; | |
| 18061 var queryMap = {}; | |
| 18062 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18063 parseBool(n) { | |
| 18064 if (n == "true") return true; | |
| 18065 if (n == "false") return false; | |
| 18066 if (n == null) return null; | |
| 18067 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18068 } | |
| 18069 if (query.length > 0) { | |
| 18070 for (var part in query.split("&")) { | |
| 18071 var keyvalue = part.split("="); | |
| 18072 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18073 } | |
| 18074 } | |
| 18075 | |
| 18076 | |
| 18077 var h = { | |
| 18078 "content-type" : "application/json; charset=utf-8", | |
| 18079 }; | |
| 18080 var resp = convert.JSON.encode(buildOperatingSystemVersionsListResponse(
)); | |
| 18081 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18082 }), true); | |
| 18083 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemVer
sionsListResponse response) { | |
| 18084 checkOperatingSystemVersionsListResponse(response); | |
| 18085 }))); | |
| 18086 }); | |
| 18087 | |
| 18088 }); | |
| 18089 | |
| 18090 | |
| 18091 unittest.group("resource-OperatingSystemsResourceApi", () { | |
| 18092 unittest.test("method--get", () { | |
| 18093 | |
| 18094 var mock = new HttpServerMock(); | |
| 18095 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18096 var arg_profileId = "foo"; | |
| 18097 var arg_dartId = "foo"; | |
| 18098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18099 var path = (req.url).path; | |
| 18100 var pathOffset = 0; | |
| 18101 var index; | |
| 18102 var subPart; | |
| 18103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18104 pathOffset += 1; | |
| 18105 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18106 pathOffset += 18; | |
| 18107 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18108 pathOffset += 13; | |
| 18109 index = path.indexOf("/operatingSystems/", pathOffset); | |
| 18110 unittest.expect(index >= 0, unittest.isTrue); | |
| 18111 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18112 pathOffset = index; | |
| 18113 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18114 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/operatingSystems/")); | |
| 18115 pathOffset += 18; | |
| 18116 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18117 pathOffset = path.length; | |
| 18118 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 18119 | |
| 18120 var query = (req.url).query; | |
| 18121 var queryOffset = 0; | |
| 18122 var queryMap = {}; | |
| 18123 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18124 parseBool(n) { | |
| 18125 if (n == "true") return true; | |
| 18126 if (n == "false") return false; | |
| 18127 if (n == null) return null; | |
| 18128 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18129 } | |
| 18130 if (query.length > 0) { | |
| 18131 for (var part in query.split("&")) { | |
| 18132 var keyvalue = part.split("="); | |
| 18133 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18134 } | |
| 18135 } | |
| 18136 | |
| 18137 | |
| 18138 var h = { | |
| 18139 "content-type" : "application/json; charset=utf-8", | |
| 18140 }; | |
| 18141 var resp = convert.JSON.encode(buildOperatingSystem()); | |
| 18142 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18143 }), true); | |
| 18144 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Operati
ngSystem response) { | |
| 18145 checkOperatingSystem(response); | |
| 18146 }))); | |
| 18147 }); | |
| 18148 | |
| 18149 unittest.test("method--list", () { | |
| 18150 | |
| 18151 var mock = new HttpServerMock(); | |
| 18152 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18153 var arg_profileId = "foo"; | |
| 18154 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18155 var path = (req.url).path; | |
| 18156 var pathOffset = 0; | |
| 18157 var index; | |
| 18158 var subPart; | |
| 18159 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18160 pathOffset += 1; | |
| 18161 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18162 pathOffset += 18; | |
| 18163 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18164 pathOffset += 13; | |
| 18165 index = path.indexOf("/operatingSystems", pathOffset); | |
| 18166 unittest.expect(index >= 0, unittest.isTrue); | |
| 18167 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18168 pathOffset = index; | |
| 18169 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18170 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/operatingSystems")); | |
| 18171 pathOffset += 17; | |
| 18172 | |
| 18173 var query = (req.url).query; | |
| 18174 var queryOffset = 0; | |
| 18175 var queryMap = {}; | |
| 18176 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18177 parseBool(n) { | |
| 18178 if (n == "true") return true; | |
| 18179 if (n == "false") return false; | |
| 18180 if (n == null) return null; | |
| 18181 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18182 } | |
| 18183 if (query.length > 0) { | |
| 18184 for (var part in query.split("&")) { | |
| 18185 var keyvalue = part.split("="); | |
| 18186 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18187 } | |
| 18188 } | |
| 18189 | |
| 18190 | |
| 18191 var h = { | |
| 18192 "content-type" : "application/json; charset=utf-8", | |
| 18193 }; | |
| 18194 var resp = convert.JSON.encode(buildOperatingSystemsListResponse()); | |
| 18195 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18196 }), true); | |
| 18197 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemsLi
stResponse response) { | |
| 18198 checkOperatingSystemsListResponse(response); | |
| 18199 }))); | |
| 18200 }); | |
| 18201 | |
| 18202 }); | |
| 18203 | |
| 18204 | |
| 18205 unittest.group("resource-OrderDocumentsResourceApi", () { | |
| 18206 unittest.test("method--get", () { | |
| 18207 | |
| 18208 var mock = new HttpServerMock(); | |
| 18209 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18210 var arg_profileId = "foo"; | |
| 18211 var arg_projectId = "foo"; | |
| 18212 var arg_id = "foo"; | |
| 18213 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18214 var path = (req.url).path; | |
| 18215 var pathOffset = 0; | |
| 18216 var index; | |
| 18217 var subPart; | |
| 18218 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18219 pathOffset += 1; | |
| 18220 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18221 pathOffset += 18; | |
| 18222 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18223 pathOffset += 13; | |
| 18224 index = path.indexOf("/projects/", pathOffset); | |
| 18225 unittest.expect(index >= 0, unittest.isTrue); | |
| 18226 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18227 pathOffset = index; | |
| 18228 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18229 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18230 pathOffset += 10; | |
| 18231 index = path.indexOf("/orderDocuments/", pathOffset); | |
| 18232 unittest.expect(index >= 0, unittest.isTrue); | |
| 18233 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18234 pathOffset = index; | |
| 18235 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18236 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/orderDocuments/")); | |
| 18237 pathOffset += 16; | |
| 18238 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18239 pathOffset = path.length; | |
| 18240 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18241 | |
| 18242 var query = (req.url).query; | |
| 18243 var queryOffset = 0; | |
| 18244 var queryMap = {}; | |
| 18245 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18246 parseBool(n) { | |
| 18247 if (n == "true") return true; | |
| 18248 if (n == "false") return false; | |
| 18249 if (n == null) return null; | |
| 18250 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18251 } | |
| 18252 if (query.length > 0) { | |
| 18253 for (var part in query.split("&")) { | |
| 18254 var keyvalue = part.split("="); | |
| 18255 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18256 } | |
| 18257 } | |
| 18258 | |
| 18259 | |
| 18260 var h = { | |
| 18261 "content-type" : "application/json; charset=utf-8", | |
| 18262 }; | |
| 18263 var resp = convert.JSON.encode(buildOrderDocument()); | |
| 18264 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18265 }), true); | |
| 18266 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.OrderDocument response) { | |
| 18267 checkOrderDocument(response); | |
| 18268 }))); | |
| 18269 }); | |
| 18270 | |
| 18271 unittest.test("method--list", () { | |
| 18272 | |
| 18273 var mock = new HttpServerMock(); | |
| 18274 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18275 var arg_profileId = "foo"; | |
| 18276 var arg_projectId = "foo"; | |
| 18277 var arg_approved = true; | |
| 18278 var arg_ids = buildUnnamed2115(); | |
| 18279 var arg_maxResults = 42; | |
| 18280 var arg_orderId = buildUnnamed2116(); | |
| 18281 var arg_pageToken = "foo"; | |
| 18282 var arg_searchString = "foo"; | |
| 18283 var arg_siteId = buildUnnamed2117(); | |
| 18284 var arg_sortField = "foo"; | |
| 18285 var arg_sortOrder = "foo"; | |
| 18286 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18287 var path = (req.url).path; | |
| 18288 var pathOffset = 0; | |
| 18289 var index; | |
| 18290 var subPart; | |
| 18291 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18292 pathOffset += 1; | |
| 18293 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18294 pathOffset += 18; | |
| 18295 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18296 pathOffset += 13; | |
| 18297 index = path.indexOf("/projects/", pathOffset); | |
| 18298 unittest.expect(index >= 0, unittest.isTrue); | |
| 18299 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18300 pathOffset = index; | |
| 18301 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18302 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18303 pathOffset += 10; | |
| 18304 index = path.indexOf("/orderDocuments", pathOffset); | |
| 18305 unittest.expect(index >= 0, unittest.isTrue); | |
| 18306 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18307 pathOffset = index; | |
| 18308 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18309 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/orderDocuments")); | |
| 18310 pathOffset += 15; | |
| 18311 | |
| 18312 var query = (req.url).query; | |
| 18313 var queryOffset = 0; | |
| 18314 var queryMap = {}; | |
| 18315 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18316 parseBool(n) { | |
| 18317 if (n == "true") return true; | |
| 18318 if (n == "false") return false; | |
| 18319 if (n == null) return null; | |
| 18320 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18321 } | |
| 18322 if (query.length > 0) { | |
| 18323 for (var part in query.split("&")) { | |
| 18324 var keyvalue = part.split("="); | |
| 18325 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18326 } | |
| 18327 } | |
| 18328 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 18329 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18330 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18331 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 18332 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18333 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18334 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18335 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18336 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18337 | |
| 18338 | |
| 18339 var h = { | |
| 18340 "content-type" : "application/json; charset=utf-8", | |
| 18341 }; | |
| 18342 var resp = convert.JSON.encode(buildOrderDocumentsListResponse()); | |
| 18343 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18344 }), true); | |
| 18345 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) { | |
| 18346 checkOrderDocumentsListResponse(response); | |
| 18347 }))); | |
| 18348 }); | |
| 18349 | |
| 18350 }); | |
| 18351 | |
| 18352 | |
| 18353 unittest.group("resource-OrdersResourceApi", () { | |
| 18354 unittest.test("method--get", () { | |
| 18355 | |
| 18356 var mock = new HttpServerMock(); | |
| 18357 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18358 var arg_profileId = "foo"; | |
| 18359 var arg_projectId = "foo"; | |
| 18360 var arg_id = "foo"; | |
| 18361 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18362 var path = (req.url).path; | |
| 18363 var pathOffset = 0; | |
| 18364 var index; | |
| 18365 var subPart; | |
| 18366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18367 pathOffset += 1; | |
| 18368 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18369 pathOffset += 18; | |
| 18370 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18371 pathOffset += 13; | |
| 18372 index = path.indexOf("/projects/", pathOffset); | |
| 18373 unittest.expect(index >= 0, unittest.isTrue); | |
| 18374 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18375 pathOffset = index; | |
| 18376 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18377 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18378 pathOffset += 10; | |
| 18379 index = path.indexOf("/orders/", pathOffset); | |
| 18380 unittest.expect(index >= 0, unittest.isTrue); | |
| 18381 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18382 pathOffset = index; | |
| 18383 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18384 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/orders/")); | |
| 18385 pathOffset += 8; | |
| 18386 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18387 pathOffset = path.length; | |
| 18388 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18389 | |
| 18390 var query = (req.url).query; | |
| 18391 var queryOffset = 0; | |
| 18392 var queryMap = {}; | |
| 18393 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18394 parseBool(n) { | |
| 18395 if (n == "true") return true; | |
| 18396 if (n == "false") return false; | |
| 18397 if (n == null) return null; | |
| 18398 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18399 } | |
| 18400 if (query.length > 0) { | |
| 18401 for (var part in query.split("&")) { | |
| 18402 var keyvalue = part.split("="); | |
| 18403 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18404 } | |
| 18405 } | |
| 18406 | |
| 18407 | |
| 18408 var h = { | |
| 18409 "content-type" : "application/json; charset=utf-8", | |
| 18410 }; | |
| 18411 var resp = convert.JSON.encode(buildOrder()); | |
| 18412 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18413 }), true); | |
| 18414 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.Order response) { | |
| 18415 checkOrder(response); | |
| 18416 }))); | |
| 18417 }); | |
| 18418 | |
| 18419 unittest.test("method--list", () { | |
| 18420 | |
| 18421 var mock = new HttpServerMock(); | |
| 18422 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18423 var arg_profileId = "foo"; | |
| 18424 var arg_projectId = "foo"; | |
| 18425 var arg_ids = buildUnnamed2118(); | |
| 18426 var arg_maxResults = 42; | |
| 18427 var arg_pageToken = "foo"; | |
| 18428 var arg_searchString = "foo"; | |
| 18429 var arg_siteId = buildUnnamed2119(); | |
| 18430 var arg_sortField = "foo"; | |
| 18431 var arg_sortOrder = "foo"; | |
| 18432 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18433 var path = (req.url).path; | |
| 18434 var pathOffset = 0; | |
| 18435 var index; | |
| 18436 var subPart; | |
| 18437 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18438 pathOffset += 1; | |
| 18439 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18440 pathOffset += 18; | |
| 18441 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18442 pathOffset += 13; | |
| 18443 index = path.indexOf("/projects/", pathOffset); | |
| 18444 unittest.expect(index >= 0, unittest.isTrue); | |
| 18445 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18446 pathOffset = index; | |
| 18447 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18448 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18449 pathOffset += 10; | |
| 18450 index = path.indexOf("/orders", pathOffset); | |
| 18451 unittest.expect(index >= 0, unittest.isTrue); | |
| 18452 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18453 pathOffset = index; | |
| 18454 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18455 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/orders")); | |
| 18456 pathOffset += 7; | |
| 18457 | |
| 18458 var query = (req.url).query; | |
| 18459 var queryOffset = 0; | |
| 18460 var queryMap = {}; | |
| 18461 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18462 parseBool(n) { | |
| 18463 if (n == "true") return true; | |
| 18464 if (n == "false") return false; | |
| 18465 if (n == null) return null; | |
| 18466 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18467 } | |
| 18468 if (query.length > 0) { | |
| 18469 for (var part in query.split("&")) { | |
| 18470 var keyvalue = part.split("="); | |
| 18471 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18472 } | |
| 18473 } | |
| 18474 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18475 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18476 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18477 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18478 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18479 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18480 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18481 | |
| 18482 | |
| 18483 var h = { | |
| 18484 "content-type" : "application/json; charset=utf-8", | |
| 18485 }; | |
| 18486 var resp = convert.JSON.encode(buildOrdersListResponse()); | |
| 18487 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18488 }), true); | |
| 18489 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) { | |
| 18490 checkOrdersListResponse(response); | |
| 18491 }))); | |
| 18492 }); | |
| 18493 | |
| 18494 }); | |
| 18495 | |
| 18496 | |
| 18497 unittest.group("resource-PlacementGroupsResourceApi", () { | |
| 18498 unittest.test("method--get", () { | |
| 18499 | |
| 18500 var mock = new HttpServerMock(); | |
| 18501 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18502 var arg_profileId = "foo"; | |
| 18503 var arg_id = "foo"; | |
| 18504 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18505 var path = (req.url).path; | |
| 18506 var pathOffset = 0; | |
| 18507 var index; | |
| 18508 var subPart; | |
| 18509 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18510 pathOffset += 1; | |
| 18511 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18512 pathOffset += 18; | |
| 18513 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18514 pathOffset += 13; | |
| 18515 index = path.indexOf("/placementGroups/", pathOffset); | |
| 18516 unittest.expect(index >= 0, unittest.isTrue); | |
| 18517 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18518 pathOffset = index; | |
| 18519 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18520 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/placementGroups/")); | |
| 18521 pathOffset += 17; | |
| 18522 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18523 pathOffset = path.length; | |
| 18524 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18525 | |
| 18526 var query = (req.url).query; | |
| 18527 var queryOffset = 0; | |
| 18528 var queryMap = {}; | |
| 18529 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18530 parseBool(n) { | |
| 18531 if (n == "true") return true; | |
| 18532 if (n == "false") return false; | |
| 18533 if (n == null) return null; | |
| 18534 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18535 } | |
| 18536 if (query.length > 0) { | |
| 18537 for (var part in query.split("&")) { | |
| 18538 var keyvalue = part.split("="); | |
| 18539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18540 } | |
| 18541 } | |
| 18542 | |
| 18543 | |
| 18544 var h = { | |
| 18545 "content-type" : "application/json; charset=utf-8", | |
| 18546 }; | |
| 18547 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18548 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18549 }), true); | |
| 18550 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementGr
oup response) { | |
| 18551 checkPlacementGroup(response); | |
| 18552 }))); | |
| 18553 }); | |
| 18554 | |
| 18555 unittest.test("method--insert", () { | |
| 18556 | |
| 18557 var mock = new HttpServerMock(); | |
| 18558 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18559 var arg_request = buildPlacementGroup(); | |
| 18560 var arg_profileId = "foo"; | |
| 18561 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18562 var obj = new api.PlacementGroup.fromJson(json); | |
| 18563 checkPlacementGroup(obj); | |
| 18564 | |
| 18565 var path = (req.url).path; | |
| 18566 var pathOffset = 0; | |
| 18567 var index; | |
| 18568 var subPart; | |
| 18569 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18570 pathOffset += 1; | |
| 18571 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18572 pathOffset += 18; | |
| 18573 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18574 pathOffset += 13; | |
| 18575 index = path.indexOf("/placementGroups", pathOffset); | |
| 18576 unittest.expect(index >= 0, unittest.isTrue); | |
| 18577 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18578 pathOffset = index; | |
| 18579 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18580 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18581 pathOffset += 16; | |
| 18582 | |
| 18583 var query = (req.url).query; | |
| 18584 var queryOffset = 0; | |
| 18585 var queryMap = {}; | |
| 18586 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18587 parseBool(n) { | |
| 18588 if (n == "true") return true; | |
| 18589 if (n == "false") return false; | |
| 18590 if (n == null) return null; | |
| 18591 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18592 } | |
| 18593 if (query.length > 0) { | |
| 18594 for (var part in query.split("&")) { | |
| 18595 var keyvalue = part.split("="); | |
| 18596 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18597 } | |
| 18598 } | |
| 18599 | |
| 18600 | |
| 18601 var h = { | |
| 18602 "content-type" : "application/json; charset=utf-8", | |
| 18603 }; | |
| 18604 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18605 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18606 }), true); | |
| 18607 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18608 checkPlacementGroup(response); | |
| 18609 }))); | |
| 18610 }); | |
| 18611 | |
| 18612 unittest.test("method--list", () { | |
| 18613 | |
| 18614 var mock = new HttpServerMock(); | |
| 18615 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18616 var arg_profileId = "foo"; | |
| 18617 var arg_advertiserIds = buildUnnamed2120(); | |
| 18618 var arg_archived = true; | |
| 18619 var arg_campaignIds = buildUnnamed2121(); | |
| 18620 var arg_contentCategoryIds = buildUnnamed2122(); | |
| 18621 var arg_directorySiteIds = buildUnnamed2123(); | |
| 18622 var arg_ids = buildUnnamed2124(); | |
| 18623 var arg_maxEndDate = "foo"; | |
| 18624 var arg_maxResults = 42; | |
| 18625 var arg_maxStartDate = "foo"; | |
| 18626 var arg_minEndDate = "foo"; | |
| 18627 var arg_minStartDate = "foo"; | |
| 18628 var arg_pageToken = "foo"; | |
| 18629 var arg_placementGroupType = "foo"; | |
| 18630 var arg_placementStrategyIds = buildUnnamed2125(); | |
| 18631 var arg_pricingTypes = buildUnnamed2126(); | |
| 18632 var arg_searchString = "foo"; | |
| 18633 var arg_siteIds = buildUnnamed2127(); | |
| 18634 var arg_sortField = "foo"; | |
| 18635 var arg_sortOrder = "foo"; | |
| 18636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18637 var path = (req.url).path; | |
| 18638 var pathOffset = 0; | |
| 18639 var index; | |
| 18640 var subPart; | |
| 18641 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18642 pathOffset += 1; | |
| 18643 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18644 pathOffset += 18; | |
| 18645 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18646 pathOffset += 13; | |
| 18647 index = path.indexOf("/placementGroups", pathOffset); | |
| 18648 unittest.expect(index >= 0, unittest.isTrue); | |
| 18649 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18650 pathOffset = index; | |
| 18651 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18652 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18653 pathOffset += 16; | |
| 18654 | |
| 18655 var query = (req.url).query; | |
| 18656 var queryOffset = 0; | |
| 18657 var queryMap = {}; | |
| 18658 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18659 parseBool(n) { | |
| 18660 if (n == "true") return true; | |
| 18661 if (n == "false") return false; | |
| 18662 if (n == null) return null; | |
| 18663 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18664 } | |
| 18665 if (query.length > 0) { | |
| 18666 for (var part in query.split("&")) { | |
| 18667 var keyvalue = part.split("="); | |
| 18668 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18669 } | |
| 18670 } | |
| 18671 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 18672 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 18673 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 18674 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 18675 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 18676 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18677 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 18678 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18679 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 18680 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 18681 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 18682 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18683 unittest.expect(queryMap["placementGroupType"].first, unittest.equals(ar
g_placementGroupType)); | |
| 18684 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 18685 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 18686 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18687 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 18688 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18689 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18690 | |
| 18691 | |
| 18692 var h = { | |
| 18693 "content-type" : "application/json; charset=utf-8", | |
| 18694 }; | |
| 18695 var resp = convert.JSON.encode(buildPlacementGroupsListResponse()); | |
| 18696 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18697 }), true); | |
| 18698 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) { | |
| 18699 checkPlacementGroupsListResponse(response); | |
| 18700 }))); | |
| 18701 }); | |
| 18702 | |
| 18703 unittest.test("method--patch", () { | |
| 18704 | |
| 18705 var mock = new HttpServerMock(); | |
| 18706 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18707 var arg_request = buildPlacementGroup(); | |
| 18708 var arg_profileId = "foo"; | |
| 18709 var arg_id = "foo"; | |
| 18710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18711 var obj = new api.PlacementGroup.fromJson(json); | |
| 18712 checkPlacementGroup(obj); | |
| 18713 | |
| 18714 var path = (req.url).path; | |
| 18715 var pathOffset = 0; | |
| 18716 var index; | |
| 18717 var subPart; | |
| 18718 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18719 pathOffset += 1; | |
| 18720 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18721 pathOffset += 18; | |
| 18722 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18723 pathOffset += 13; | |
| 18724 index = path.indexOf("/placementGroups", pathOffset); | |
| 18725 unittest.expect(index >= 0, unittest.isTrue); | |
| 18726 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18727 pathOffset = index; | |
| 18728 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18729 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18730 pathOffset += 16; | |
| 18731 | |
| 18732 var query = (req.url).query; | |
| 18733 var queryOffset = 0; | |
| 18734 var queryMap = {}; | |
| 18735 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18736 parseBool(n) { | |
| 18737 if (n == "true") return true; | |
| 18738 if (n == "false") return false; | |
| 18739 if (n == null) return null; | |
| 18740 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18741 } | |
| 18742 if (query.length > 0) { | |
| 18743 for (var part in query.split("&")) { | |
| 18744 var keyvalue = part.split("="); | |
| 18745 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18746 } | |
| 18747 } | |
| 18748 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 18749 | |
| 18750 | |
| 18751 var h = { | |
| 18752 "content-type" : "application/json; charset=utf-8", | |
| 18753 }; | |
| 18754 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18755 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18756 }), true); | |
| 18757 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementGroup response) { | |
| 18758 checkPlacementGroup(response); | |
| 18759 }))); | |
| 18760 }); | |
| 18761 | |
| 18762 unittest.test("method--update", () { | |
| 18763 | |
| 18764 var mock = new HttpServerMock(); | |
| 18765 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18766 var arg_request = buildPlacementGroup(); | |
| 18767 var arg_profileId = "foo"; | |
| 18768 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18769 var obj = new api.PlacementGroup.fromJson(json); | |
| 18770 checkPlacementGroup(obj); | |
| 18771 | |
| 18772 var path = (req.url).path; | |
| 18773 var pathOffset = 0; | |
| 18774 var index; | |
| 18775 var subPart; | |
| 18776 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18777 pathOffset += 1; | |
| 18778 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18779 pathOffset += 18; | |
| 18780 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18781 pathOffset += 13; | |
| 18782 index = path.indexOf("/placementGroups", pathOffset); | |
| 18783 unittest.expect(index >= 0, unittest.isTrue); | |
| 18784 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18785 pathOffset = index; | |
| 18786 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18787 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18788 pathOffset += 16; | |
| 18789 | |
| 18790 var query = (req.url).query; | |
| 18791 var queryOffset = 0; | |
| 18792 var queryMap = {}; | |
| 18793 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18794 parseBool(n) { | |
| 18795 if (n == "true") return true; | |
| 18796 if (n == "false") return false; | |
| 18797 if (n == null) return null; | |
| 18798 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18799 } | |
| 18800 if (query.length > 0) { | |
| 18801 for (var part in query.split("&")) { | |
| 18802 var keyvalue = part.split("="); | |
| 18803 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18804 } | |
| 18805 } | |
| 18806 | |
| 18807 | |
| 18808 var h = { | |
| 18809 "content-type" : "application/json; charset=utf-8", | |
| 18810 }; | |
| 18811 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18812 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18813 }), true); | |
| 18814 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18815 checkPlacementGroup(response); | |
| 18816 }))); | |
| 18817 }); | |
| 18818 | |
| 18819 }); | |
| 18820 | |
| 18821 | |
| 18822 unittest.group("resource-PlacementStrategiesResourceApi", () { | |
| 18823 unittest.test("method--delete", () { | |
| 18824 | |
| 18825 var mock = new HttpServerMock(); | |
| 18826 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18827 var arg_profileId = "foo"; | |
| 18828 var arg_id = "foo"; | |
| 18829 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18830 var path = (req.url).path; | |
| 18831 var pathOffset = 0; | |
| 18832 var index; | |
| 18833 var subPart; | |
| 18834 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18835 pathOffset += 1; | |
| 18836 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18837 pathOffset += 18; | |
| 18838 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18839 pathOffset += 13; | |
| 18840 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18841 unittest.expect(index >= 0, unittest.isTrue); | |
| 18842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18843 pathOffset = index; | |
| 18844 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18845 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18846 pathOffset += 21; | |
| 18847 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18848 pathOffset = path.length; | |
| 18849 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18850 | |
| 18851 var query = (req.url).query; | |
| 18852 var queryOffset = 0; | |
| 18853 var queryMap = {}; | |
| 18854 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18855 parseBool(n) { | |
| 18856 if (n == "true") return true; | |
| 18857 if (n == "false") return false; | |
| 18858 if (n == null) return null; | |
| 18859 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18860 } | |
| 18861 if (query.length > 0) { | |
| 18862 for (var part in query.split("&")) { | |
| 18863 var keyvalue = part.split("="); | |
| 18864 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18865 } | |
| 18866 } | |
| 18867 | |
| 18868 | |
| 18869 var h = { | |
| 18870 "content-type" : "application/json; charset=utf-8", | |
| 18871 }; | |
| 18872 var resp = ""; | |
| 18873 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18874 }), true); | |
| 18875 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 18876 }); | |
| 18877 | |
| 18878 unittest.test("method--get", () { | |
| 18879 | |
| 18880 var mock = new HttpServerMock(); | |
| 18881 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18882 var arg_profileId = "foo"; | |
| 18883 var arg_id = "foo"; | |
| 18884 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18885 var path = (req.url).path; | |
| 18886 var pathOffset = 0; | |
| 18887 var index; | |
| 18888 var subPart; | |
| 18889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18890 pathOffset += 1; | |
| 18891 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18892 pathOffset += 18; | |
| 18893 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18894 pathOffset += 13; | |
| 18895 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18896 unittest.expect(index >= 0, unittest.isTrue); | |
| 18897 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18898 pathOffset = index; | |
| 18899 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18900 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18901 pathOffset += 21; | |
| 18902 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18903 pathOffset = path.length; | |
| 18904 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18905 | |
| 18906 var query = (req.url).query; | |
| 18907 var queryOffset = 0; | |
| 18908 var queryMap = {}; | |
| 18909 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18910 parseBool(n) { | |
| 18911 if (n == "true") return true; | |
| 18912 if (n == "false") return false; | |
| 18913 if (n == null) return null; | |
| 18914 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18915 } | |
| 18916 if (query.length > 0) { | |
| 18917 for (var part in query.split("&")) { | |
| 18918 var keyvalue = part.split("="); | |
| 18919 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18920 } | |
| 18921 } | |
| 18922 | |
| 18923 | |
| 18924 var h = { | |
| 18925 "content-type" : "application/json; charset=utf-8", | |
| 18926 }; | |
| 18927 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 18928 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18929 }), true); | |
| 18930 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementSt
rategy response) { | |
| 18931 checkPlacementStrategy(response); | |
| 18932 }))); | |
| 18933 }); | |
| 18934 | |
| 18935 unittest.test("method--insert", () { | |
| 18936 | |
| 18937 var mock = new HttpServerMock(); | |
| 18938 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18939 var arg_request = buildPlacementStrategy(); | |
| 18940 var arg_profileId = "foo"; | |
| 18941 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18942 var obj = new api.PlacementStrategy.fromJson(json); | |
| 18943 checkPlacementStrategy(obj); | |
| 18944 | |
| 18945 var path = (req.url).path; | |
| 18946 var pathOffset = 0; | |
| 18947 var index; | |
| 18948 var subPart; | |
| 18949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18950 pathOffset += 1; | |
| 18951 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 18952 pathOffset += 18; | |
| 18953 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18954 pathOffset += 13; | |
| 18955 index = path.indexOf("/placementStrategies", pathOffset); | |
| 18956 unittest.expect(index >= 0, unittest.isTrue); | |
| 18957 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18958 pathOffset = index; | |
| 18959 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18960 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 18961 pathOffset += 20; | |
| 18962 | |
| 18963 var query = (req.url).query; | |
| 18964 var queryOffset = 0; | |
| 18965 var queryMap = {}; | |
| 18966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18967 parseBool(n) { | |
| 18968 if (n == "true") return true; | |
| 18969 if (n == "false") return false; | |
| 18970 if (n == null) return null; | |
| 18971 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18972 } | |
| 18973 if (query.length > 0) { | |
| 18974 for (var part in query.split("&")) { | |
| 18975 var keyvalue = part.split("="); | |
| 18976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18977 } | |
| 18978 } | |
| 18979 | |
| 18980 | |
| 18981 var h = { | |
| 18982 "content-type" : "application/json; charset=utf-8", | |
| 18983 }; | |
| 18984 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 18985 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18986 }), true); | |
| 18987 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 18988 checkPlacementStrategy(response); | |
| 18989 }))); | |
| 18990 }); | |
| 18991 | |
| 18992 unittest.test("method--list", () { | |
| 18993 | |
| 18994 var mock = new HttpServerMock(); | |
| 18995 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18996 var arg_profileId = "foo"; | |
| 18997 var arg_ids = buildUnnamed2128(); | |
| 18998 var arg_maxResults = 42; | |
| 18999 var arg_pageToken = "foo"; | |
| 19000 var arg_searchString = "foo"; | |
| 19001 var arg_sortField = "foo"; | |
| 19002 var arg_sortOrder = "foo"; | |
| 19003 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19004 var path = (req.url).path; | |
| 19005 var pathOffset = 0; | |
| 19006 var index; | |
| 19007 var subPart; | |
| 19008 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19009 pathOffset += 1; | |
| 19010 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19011 pathOffset += 18; | |
| 19012 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19013 pathOffset += 13; | |
| 19014 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19015 unittest.expect(index >= 0, unittest.isTrue); | |
| 19016 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19017 pathOffset = index; | |
| 19018 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19019 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19020 pathOffset += 20; | |
| 19021 | |
| 19022 var query = (req.url).query; | |
| 19023 var queryOffset = 0; | |
| 19024 var queryMap = {}; | |
| 19025 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19026 parseBool(n) { | |
| 19027 if (n == "true") return true; | |
| 19028 if (n == "false") return false; | |
| 19029 if (n == null) return null; | |
| 19030 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19031 } | |
| 19032 if (query.length > 0) { | |
| 19033 for (var part in query.split("&")) { | |
| 19034 var keyvalue = part.split("="); | |
| 19035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19036 } | |
| 19037 } | |
| 19038 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19039 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19040 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19041 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19042 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19043 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19044 | |
| 19045 | |
| 19046 var h = { | |
| 19047 "content-type" : "application/json; charset=utf-8", | |
| 19048 }; | |
| 19049 var resp = convert.JSON.encode(buildPlacementStrategiesListResponse()); | |
| 19050 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19051 }), true); | |
| 19052 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) { | |
| 19053 checkPlacementStrategiesListResponse(response); | |
| 19054 }))); | |
| 19055 }); | |
| 19056 | |
| 19057 unittest.test("method--patch", () { | |
| 19058 | |
| 19059 var mock = new HttpServerMock(); | |
| 19060 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19061 var arg_request = buildPlacementStrategy(); | |
| 19062 var arg_profileId = "foo"; | |
| 19063 var arg_id = "foo"; | |
| 19064 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19065 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19066 checkPlacementStrategy(obj); | |
| 19067 | |
| 19068 var path = (req.url).path; | |
| 19069 var pathOffset = 0; | |
| 19070 var index; | |
| 19071 var subPart; | |
| 19072 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19073 pathOffset += 1; | |
| 19074 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19075 pathOffset += 18; | |
| 19076 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19077 pathOffset += 13; | |
| 19078 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19079 unittest.expect(index >= 0, unittest.isTrue); | |
| 19080 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19081 pathOffset = index; | |
| 19082 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19083 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19084 pathOffset += 20; | |
| 19085 | |
| 19086 var query = (req.url).query; | |
| 19087 var queryOffset = 0; | |
| 19088 var queryMap = {}; | |
| 19089 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19090 parseBool(n) { | |
| 19091 if (n == "true") return true; | |
| 19092 if (n == "false") return false; | |
| 19093 if (n == null) return null; | |
| 19094 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19095 } | |
| 19096 if (query.length > 0) { | |
| 19097 for (var part in query.split("&")) { | |
| 19098 var keyvalue = part.split("="); | |
| 19099 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19100 } | |
| 19101 } | |
| 19102 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19103 | |
| 19104 | |
| 19105 var h = { | |
| 19106 "content-type" : "application/json; charset=utf-8", | |
| 19107 }; | |
| 19108 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19109 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19110 }), true); | |
| 19111 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementStrategy response) { | |
| 19112 checkPlacementStrategy(response); | |
| 19113 }))); | |
| 19114 }); | |
| 19115 | |
| 19116 unittest.test("method--update", () { | |
| 19117 | |
| 19118 var mock = new HttpServerMock(); | |
| 19119 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19120 var arg_request = buildPlacementStrategy(); | |
| 19121 var arg_profileId = "foo"; | |
| 19122 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19123 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19124 checkPlacementStrategy(obj); | |
| 19125 | |
| 19126 var path = (req.url).path; | |
| 19127 var pathOffset = 0; | |
| 19128 var index; | |
| 19129 var subPart; | |
| 19130 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19131 pathOffset += 1; | |
| 19132 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19133 pathOffset += 18; | |
| 19134 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19135 pathOffset += 13; | |
| 19136 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19137 unittest.expect(index >= 0, unittest.isTrue); | |
| 19138 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19139 pathOffset = index; | |
| 19140 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19141 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19142 pathOffset += 20; | |
| 19143 | |
| 19144 var query = (req.url).query; | |
| 19145 var queryOffset = 0; | |
| 19146 var queryMap = {}; | |
| 19147 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19148 parseBool(n) { | |
| 19149 if (n == "true") return true; | |
| 19150 if (n == "false") return false; | |
| 19151 if (n == null) return null; | |
| 19152 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19153 } | |
| 19154 if (query.length > 0) { | |
| 19155 for (var part in query.split("&")) { | |
| 19156 var keyvalue = part.split("="); | |
| 19157 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19158 } | |
| 19159 } | |
| 19160 | |
| 19161 | |
| 19162 var h = { | |
| 19163 "content-type" : "application/json; charset=utf-8", | |
| 19164 }; | |
| 19165 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19166 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19167 }), true); | |
| 19168 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19169 checkPlacementStrategy(response); | |
| 19170 }))); | |
| 19171 }); | |
| 19172 | |
| 19173 }); | |
| 19174 | |
| 19175 | |
| 19176 unittest.group("resource-PlacementsResourceApi", () { | |
| 19177 unittest.test("method--generatetags", () { | |
| 19178 | |
| 19179 var mock = new HttpServerMock(); | |
| 19180 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19181 var arg_profileId = "foo"; | |
| 19182 var arg_campaignId = "foo"; | |
| 19183 var arg_placementIds = buildUnnamed2129(); | |
| 19184 var arg_tagFormats = buildUnnamed2130(); | |
| 19185 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19186 var path = (req.url).path; | |
| 19187 var pathOffset = 0; | |
| 19188 var index; | |
| 19189 var subPart; | |
| 19190 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19191 pathOffset += 1; | |
| 19192 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19193 pathOffset += 18; | |
| 19194 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19195 pathOffset += 13; | |
| 19196 index = path.indexOf("/placements/generatetags", pathOffset); | |
| 19197 unittest.expect(index >= 0, unittest.isTrue); | |
| 19198 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19199 pathOffset = index; | |
| 19200 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19201 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/placements/generatetags")); | |
| 19202 pathOffset += 24; | |
| 19203 | |
| 19204 var query = (req.url).query; | |
| 19205 var queryOffset = 0; | |
| 19206 var queryMap = {}; | |
| 19207 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19208 parseBool(n) { | |
| 19209 if (n == "true") return true; | |
| 19210 if (n == "false") return false; | |
| 19211 if (n == null) return null; | |
| 19212 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19213 } | |
| 19214 if (query.length > 0) { | |
| 19215 for (var part in query.split("&")) { | |
| 19216 var keyvalue = part.split("="); | |
| 19217 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19218 } | |
| 19219 } | |
| 19220 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 19221 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 19222 unittest.expect(queryMap["tagFormats"], unittest.equals(arg_tagFormats))
; | |
| 19223 | |
| 19224 | |
| 19225 var h = { | |
| 19226 "content-type" : "application/json; charset=utf-8", | |
| 19227 }; | |
| 19228 var resp = convert.JSON.encode(buildPlacementsGenerateTagsResponse()); | |
| 19229 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19230 }), true); | |
| 19231 res.generatetags(arg_profileId, campaignId: arg_campaignId, placementIds:
arg_placementIds, tagFormats: arg_tagFormats).then(unittest.expectAsync(((api.Pl
acementsGenerateTagsResponse response) { | |
| 19232 checkPlacementsGenerateTagsResponse(response); | |
| 19233 }))); | |
| 19234 }); | |
| 19235 | |
| 19236 unittest.test("method--get", () { | |
| 19237 | |
| 19238 var mock = new HttpServerMock(); | |
| 19239 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19240 var arg_profileId = "foo"; | |
| 19241 var arg_id = "foo"; | |
| 19242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19243 var path = (req.url).path; | |
| 19244 var pathOffset = 0; | |
| 19245 var index; | |
| 19246 var subPart; | |
| 19247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19248 pathOffset += 1; | |
| 19249 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19250 pathOffset += 18; | |
| 19251 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19252 pathOffset += 13; | |
| 19253 index = path.indexOf("/placements/", pathOffset); | |
| 19254 unittest.expect(index >= 0, unittest.isTrue); | |
| 19255 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19256 pathOffset = index; | |
| 19257 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19258 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/placements/")); | |
| 19259 pathOffset += 12; | |
| 19260 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19261 pathOffset = path.length; | |
| 19262 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19263 | |
| 19264 var query = (req.url).query; | |
| 19265 var queryOffset = 0; | |
| 19266 var queryMap = {}; | |
| 19267 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19268 parseBool(n) { | |
| 19269 if (n == "true") return true; | |
| 19270 if (n == "false") return false; | |
| 19271 if (n == null) return null; | |
| 19272 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19273 } | |
| 19274 if (query.length > 0) { | |
| 19275 for (var part in query.split("&")) { | |
| 19276 var keyvalue = part.split("="); | |
| 19277 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19278 } | |
| 19279 } | |
| 19280 | |
| 19281 | |
| 19282 var h = { | |
| 19283 "content-type" : "application/json; charset=utf-8", | |
| 19284 }; | |
| 19285 var resp = convert.JSON.encode(buildPlacement()); | |
| 19286 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19287 }), true); | |
| 19288 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Placement r
esponse) { | |
| 19289 checkPlacement(response); | |
| 19290 }))); | |
| 19291 }); | |
| 19292 | |
| 19293 unittest.test("method--insert", () { | |
| 19294 | |
| 19295 var mock = new HttpServerMock(); | |
| 19296 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19297 var arg_request = buildPlacement(); | |
| 19298 var arg_profileId = "foo"; | |
| 19299 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19300 var obj = new api.Placement.fromJson(json); | |
| 19301 checkPlacement(obj); | |
| 19302 | |
| 19303 var path = (req.url).path; | |
| 19304 var pathOffset = 0; | |
| 19305 var index; | |
| 19306 var subPart; | |
| 19307 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19308 pathOffset += 1; | |
| 19309 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19310 pathOffset += 18; | |
| 19311 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19312 pathOffset += 13; | |
| 19313 index = path.indexOf("/placements", pathOffset); | |
| 19314 unittest.expect(index >= 0, unittest.isTrue); | |
| 19315 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19316 pathOffset = index; | |
| 19317 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19318 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19319 pathOffset += 11; | |
| 19320 | |
| 19321 var query = (req.url).query; | |
| 19322 var queryOffset = 0; | |
| 19323 var queryMap = {}; | |
| 19324 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19325 parseBool(n) { | |
| 19326 if (n == "true") return true; | |
| 19327 if (n == "false") return false; | |
| 19328 if (n == null) return null; | |
| 19329 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19330 } | |
| 19331 if (query.length > 0) { | |
| 19332 for (var part in query.split("&")) { | |
| 19333 var keyvalue = part.split("="); | |
| 19334 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19335 } | |
| 19336 } | |
| 19337 | |
| 19338 | |
| 19339 var h = { | |
| 19340 "content-type" : "application/json; charset=utf-8", | |
| 19341 }; | |
| 19342 var resp = convert.JSON.encode(buildPlacement()); | |
| 19343 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19344 }), true); | |
| 19345 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19346 checkPlacement(response); | |
| 19347 }))); | |
| 19348 }); | |
| 19349 | |
| 19350 unittest.test("method--list", () { | |
| 19351 | |
| 19352 var mock = new HttpServerMock(); | |
| 19353 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19354 var arg_profileId = "foo"; | |
| 19355 var arg_advertiserIds = buildUnnamed2131(); | |
| 19356 var arg_archived = true; | |
| 19357 var arg_campaignIds = buildUnnamed2132(); | |
| 19358 var arg_compatibilities = buildUnnamed2133(); | |
| 19359 var arg_contentCategoryIds = buildUnnamed2134(); | |
| 19360 var arg_directorySiteIds = buildUnnamed2135(); | |
| 19361 var arg_groupIds = buildUnnamed2136(); | |
| 19362 var arg_ids = buildUnnamed2137(); | |
| 19363 var arg_maxEndDate = "foo"; | |
| 19364 var arg_maxResults = 42; | |
| 19365 var arg_maxStartDate = "foo"; | |
| 19366 var arg_minEndDate = "foo"; | |
| 19367 var arg_minStartDate = "foo"; | |
| 19368 var arg_pageToken = "foo"; | |
| 19369 var arg_paymentSource = "foo"; | |
| 19370 var arg_placementStrategyIds = buildUnnamed2138(); | |
| 19371 var arg_pricingTypes = buildUnnamed2139(); | |
| 19372 var arg_searchString = "foo"; | |
| 19373 var arg_siteIds = buildUnnamed2140(); | |
| 19374 var arg_sizeIds = buildUnnamed2141(); | |
| 19375 var arg_sortField = "foo"; | |
| 19376 var arg_sortOrder = "foo"; | |
| 19377 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19378 var path = (req.url).path; | |
| 19379 var pathOffset = 0; | |
| 19380 var index; | |
| 19381 var subPart; | |
| 19382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19383 pathOffset += 1; | |
| 19384 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19385 pathOffset += 18; | |
| 19386 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19387 pathOffset += 13; | |
| 19388 index = path.indexOf("/placements", pathOffset); | |
| 19389 unittest.expect(index >= 0, unittest.isTrue); | |
| 19390 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19391 pathOffset = index; | |
| 19392 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19393 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19394 pathOffset += 11; | |
| 19395 | |
| 19396 var query = (req.url).query; | |
| 19397 var queryOffset = 0; | |
| 19398 var queryMap = {}; | |
| 19399 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19400 parseBool(n) { | |
| 19401 if (n == "true") return true; | |
| 19402 if (n == "false") return false; | |
| 19403 if (n == null) return null; | |
| 19404 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19405 } | |
| 19406 if (query.length > 0) { | |
| 19407 for (var part in query.split("&")) { | |
| 19408 var keyvalue = part.split("="); | |
| 19409 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19410 } | |
| 19411 } | |
| 19412 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19413 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 19414 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 19415 unittest.expect(queryMap["compatibilities"], unittest.equals(arg_compati
bilities)); | |
| 19416 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 19417 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 19418 unittest.expect(queryMap["groupIds"], unittest.equals(arg_groupIds)); | |
| 19419 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19420 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 19421 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19422 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 19423 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 19424 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 19425 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19426 unittest.expect(queryMap["paymentSource"].first, unittest.equals(arg_pay
mentSource)); | |
| 19427 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 19428 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 19429 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19430 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 19431 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 19432 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19433 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19434 | |
| 19435 | |
| 19436 var h = { | |
| 19437 "content-type" : "application/json; charset=utf-8", | |
| 19438 }; | |
| 19439 var resp = convert.JSON.encode(buildPlacementsListResponse()); | |
| 19440 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19441 }), true); | |
| 19442 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) { | |
| 19443 checkPlacementsListResponse(response); | |
| 19444 }))); | |
| 19445 }); | |
| 19446 | |
| 19447 unittest.test("method--patch", () { | |
| 19448 | |
| 19449 var mock = new HttpServerMock(); | |
| 19450 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19451 var arg_request = buildPlacement(); | |
| 19452 var arg_profileId = "foo"; | |
| 19453 var arg_id = "foo"; | |
| 19454 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19455 var obj = new api.Placement.fromJson(json); | |
| 19456 checkPlacement(obj); | |
| 19457 | |
| 19458 var path = (req.url).path; | |
| 19459 var pathOffset = 0; | |
| 19460 var index; | |
| 19461 var subPart; | |
| 19462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19463 pathOffset += 1; | |
| 19464 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19465 pathOffset += 18; | |
| 19466 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19467 pathOffset += 13; | |
| 19468 index = path.indexOf("/placements", pathOffset); | |
| 19469 unittest.expect(index >= 0, unittest.isTrue); | |
| 19470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19471 pathOffset = index; | |
| 19472 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19473 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19474 pathOffset += 11; | |
| 19475 | |
| 19476 var query = (req.url).query; | |
| 19477 var queryOffset = 0; | |
| 19478 var queryMap = {}; | |
| 19479 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19480 parseBool(n) { | |
| 19481 if (n == "true") return true; | |
| 19482 if (n == "false") return false; | |
| 19483 if (n == null) return null; | |
| 19484 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19485 } | |
| 19486 if (query.length > 0) { | |
| 19487 for (var part in query.split("&")) { | |
| 19488 var keyvalue = part.split("="); | |
| 19489 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19490 } | |
| 19491 } | |
| 19492 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19493 | |
| 19494 | |
| 19495 var h = { | |
| 19496 "content-type" : "application/json; charset=utf-8", | |
| 19497 }; | |
| 19498 var resp = convert.JSON.encode(buildPlacement()); | |
| 19499 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19500 }), true); | |
| 19501 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Placement response) { | |
| 19502 checkPlacement(response); | |
| 19503 }))); | |
| 19504 }); | |
| 19505 | |
| 19506 unittest.test("method--update", () { | |
| 19507 | |
| 19508 var mock = new HttpServerMock(); | |
| 19509 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19510 var arg_request = buildPlacement(); | |
| 19511 var arg_profileId = "foo"; | |
| 19512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19513 var obj = new api.Placement.fromJson(json); | |
| 19514 checkPlacement(obj); | |
| 19515 | |
| 19516 var path = (req.url).path; | |
| 19517 var pathOffset = 0; | |
| 19518 var index; | |
| 19519 var subPart; | |
| 19520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19521 pathOffset += 1; | |
| 19522 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19523 pathOffset += 18; | |
| 19524 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19525 pathOffset += 13; | |
| 19526 index = path.indexOf("/placements", pathOffset); | |
| 19527 unittest.expect(index >= 0, unittest.isTrue); | |
| 19528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19529 pathOffset = index; | |
| 19530 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19531 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19532 pathOffset += 11; | |
| 19533 | |
| 19534 var query = (req.url).query; | |
| 19535 var queryOffset = 0; | |
| 19536 var queryMap = {}; | |
| 19537 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19538 parseBool(n) { | |
| 19539 if (n == "true") return true; | |
| 19540 if (n == "false") return false; | |
| 19541 if (n == null) return null; | |
| 19542 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19543 } | |
| 19544 if (query.length > 0) { | |
| 19545 for (var part in query.split("&")) { | |
| 19546 var keyvalue = part.split("="); | |
| 19547 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19548 } | |
| 19549 } | |
| 19550 | |
| 19551 | |
| 19552 var h = { | |
| 19553 "content-type" : "application/json; charset=utf-8", | |
| 19554 }; | |
| 19555 var resp = convert.JSON.encode(buildPlacement()); | |
| 19556 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19557 }), true); | |
| 19558 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19559 checkPlacement(response); | |
| 19560 }))); | |
| 19561 }); | |
| 19562 | |
| 19563 }); | |
| 19564 | |
| 19565 | |
| 19566 unittest.group("resource-PlatformTypesResourceApi", () { | |
| 19567 unittest.test("method--get", () { | |
| 19568 | |
| 19569 var mock = new HttpServerMock(); | |
| 19570 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19571 var arg_profileId = "foo"; | |
| 19572 var arg_id = "foo"; | |
| 19573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19574 var path = (req.url).path; | |
| 19575 var pathOffset = 0; | |
| 19576 var index; | |
| 19577 var subPart; | |
| 19578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19579 pathOffset += 1; | |
| 19580 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19581 pathOffset += 18; | |
| 19582 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19583 pathOffset += 13; | |
| 19584 index = path.indexOf("/platformTypes/", pathOffset); | |
| 19585 unittest.expect(index >= 0, unittest.isTrue); | |
| 19586 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19587 pathOffset = index; | |
| 19588 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19589 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/platformTypes/")); | |
| 19590 pathOffset += 15; | |
| 19591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19592 pathOffset = path.length; | |
| 19593 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19594 | |
| 19595 var query = (req.url).query; | |
| 19596 var queryOffset = 0; | |
| 19597 var queryMap = {}; | |
| 19598 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19599 parseBool(n) { | |
| 19600 if (n == "true") return true; | |
| 19601 if (n == "false") return false; | |
| 19602 if (n == null) return null; | |
| 19603 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19604 } | |
| 19605 if (query.length > 0) { | |
| 19606 for (var part in query.split("&")) { | |
| 19607 var keyvalue = part.split("="); | |
| 19608 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19609 } | |
| 19610 } | |
| 19611 | |
| 19612 | |
| 19613 var h = { | |
| 19614 "content-type" : "application/json; charset=utf-8", | |
| 19615 }; | |
| 19616 var resp = convert.JSON.encode(buildPlatformType()); | |
| 19617 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19618 }), true); | |
| 19619 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlatformTyp
e response) { | |
| 19620 checkPlatformType(response); | |
| 19621 }))); | |
| 19622 }); | |
| 19623 | |
| 19624 unittest.test("method--list", () { | |
| 19625 | |
| 19626 var mock = new HttpServerMock(); | |
| 19627 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19628 var arg_profileId = "foo"; | |
| 19629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19630 var path = (req.url).path; | |
| 19631 var pathOffset = 0; | |
| 19632 var index; | |
| 19633 var subPart; | |
| 19634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19635 pathOffset += 1; | |
| 19636 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19637 pathOffset += 18; | |
| 19638 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19639 pathOffset += 13; | |
| 19640 index = path.indexOf("/platformTypes", pathOffset); | |
| 19641 unittest.expect(index >= 0, unittest.isTrue); | |
| 19642 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19643 pathOffset = index; | |
| 19644 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19645 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/platformTypes")); | |
| 19646 pathOffset += 14; | |
| 19647 | |
| 19648 var query = (req.url).query; | |
| 19649 var queryOffset = 0; | |
| 19650 var queryMap = {}; | |
| 19651 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19652 parseBool(n) { | |
| 19653 if (n == "true") return true; | |
| 19654 if (n == "false") return false; | |
| 19655 if (n == null) return null; | |
| 19656 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19657 } | |
| 19658 if (query.length > 0) { | |
| 19659 for (var part in query.split("&")) { | |
| 19660 var keyvalue = part.split("="); | |
| 19661 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19662 } | |
| 19663 } | |
| 19664 | |
| 19665 | |
| 19666 var h = { | |
| 19667 "content-type" : "application/json; charset=utf-8", | |
| 19668 }; | |
| 19669 var resp = convert.JSON.encode(buildPlatformTypesListResponse()); | |
| 19670 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19671 }), true); | |
| 19672 res.list(arg_profileId).then(unittest.expectAsync(((api.PlatformTypesListR
esponse response) { | |
| 19673 checkPlatformTypesListResponse(response); | |
| 19674 }))); | |
| 19675 }); | |
| 19676 | |
| 19677 }); | |
| 19678 | |
| 19679 | |
| 19680 unittest.group("resource-PostalCodesResourceApi", () { | |
| 19681 unittest.test("method--get", () { | |
| 19682 | |
| 19683 var mock = new HttpServerMock(); | |
| 19684 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19685 var arg_profileId = "foo"; | |
| 19686 var arg_code = "foo"; | |
| 19687 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19688 var path = (req.url).path; | |
| 19689 var pathOffset = 0; | |
| 19690 var index; | |
| 19691 var subPart; | |
| 19692 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19693 pathOffset += 1; | |
| 19694 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19695 pathOffset += 18; | |
| 19696 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19697 pathOffset += 13; | |
| 19698 index = path.indexOf("/postalCodes/", pathOffset); | |
| 19699 unittest.expect(index >= 0, unittest.isTrue); | |
| 19700 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19701 pathOffset = index; | |
| 19702 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19703 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/postalCodes/")); | |
| 19704 pathOffset += 13; | |
| 19705 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19706 pathOffset = path.length; | |
| 19707 unittest.expect(subPart, unittest.equals("$arg_code")); | |
| 19708 | |
| 19709 var query = (req.url).query; | |
| 19710 var queryOffset = 0; | |
| 19711 var queryMap = {}; | |
| 19712 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19713 parseBool(n) { | |
| 19714 if (n == "true") return true; | |
| 19715 if (n == "false") return false; | |
| 19716 if (n == null) return null; | |
| 19717 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19718 } | |
| 19719 if (query.length > 0) { | |
| 19720 for (var part in query.split("&")) { | |
| 19721 var keyvalue = part.split("="); | |
| 19722 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19723 } | |
| 19724 } | |
| 19725 | |
| 19726 | |
| 19727 var h = { | |
| 19728 "content-type" : "application/json; charset=utf-8", | |
| 19729 }; | |
| 19730 var resp = convert.JSON.encode(buildPostalCode()); | |
| 19731 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19732 }), true); | |
| 19733 res.get(arg_profileId, arg_code).then(unittest.expectAsync(((api.PostalCod
e response) { | |
| 19734 checkPostalCode(response); | |
| 19735 }))); | |
| 19736 }); | |
| 19737 | |
| 19738 unittest.test("method--list", () { | |
| 19739 | |
| 19740 var mock = new HttpServerMock(); | |
| 19741 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19742 var arg_profileId = "foo"; | |
| 19743 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19744 var path = (req.url).path; | |
| 19745 var pathOffset = 0; | |
| 19746 var index; | |
| 19747 var subPart; | |
| 19748 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19749 pathOffset += 1; | |
| 19750 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19751 pathOffset += 18; | |
| 19752 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19753 pathOffset += 13; | |
| 19754 index = path.indexOf("/postalCodes", pathOffset); | |
| 19755 unittest.expect(index >= 0, unittest.isTrue); | |
| 19756 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19757 pathOffset = index; | |
| 19758 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19759 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/postalCodes")); | |
| 19760 pathOffset += 12; | |
| 19761 | |
| 19762 var query = (req.url).query; | |
| 19763 var queryOffset = 0; | |
| 19764 var queryMap = {}; | |
| 19765 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19766 parseBool(n) { | |
| 19767 if (n == "true") return true; | |
| 19768 if (n == "false") return false; | |
| 19769 if (n == null) return null; | |
| 19770 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19771 } | |
| 19772 if (query.length > 0) { | |
| 19773 for (var part in query.split("&")) { | |
| 19774 var keyvalue = part.split("="); | |
| 19775 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19776 } | |
| 19777 } | |
| 19778 | |
| 19779 | |
| 19780 var h = { | |
| 19781 "content-type" : "application/json; charset=utf-8", | |
| 19782 }; | |
| 19783 var resp = convert.JSON.encode(buildPostalCodesListResponse()); | |
| 19784 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19785 }), true); | |
| 19786 res.list(arg_profileId).then(unittest.expectAsync(((api.PostalCodesListRes
ponse response) { | |
| 19787 checkPostalCodesListResponse(response); | |
| 19788 }))); | |
| 19789 }); | |
| 19790 | |
| 19791 }); | |
| 19792 | |
| 19793 | |
| 19794 unittest.group("resource-ProjectsResourceApi", () { | |
| 19795 unittest.test("method--get", () { | |
| 19796 | |
| 19797 var mock = new HttpServerMock(); | |
| 19798 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19799 var arg_profileId = "foo"; | |
| 19800 var arg_id = "foo"; | |
| 19801 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19802 var path = (req.url).path; | |
| 19803 var pathOffset = 0; | |
| 19804 var index; | |
| 19805 var subPart; | |
| 19806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19807 pathOffset += 1; | |
| 19808 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19809 pathOffset += 18; | |
| 19810 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19811 pathOffset += 13; | |
| 19812 index = path.indexOf("/projects/", pathOffset); | |
| 19813 unittest.expect(index >= 0, unittest.isTrue); | |
| 19814 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19815 pathOffset = index; | |
| 19816 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19817 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 19818 pathOffset += 10; | |
| 19819 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19820 pathOffset = path.length; | |
| 19821 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19822 | |
| 19823 var query = (req.url).query; | |
| 19824 var queryOffset = 0; | |
| 19825 var queryMap = {}; | |
| 19826 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19827 parseBool(n) { | |
| 19828 if (n == "true") return true; | |
| 19829 if (n == "false") return false; | |
| 19830 if (n == null) return null; | |
| 19831 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19832 } | |
| 19833 if (query.length > 0) { | |
| 19834 for (var part in query.split("&")) { | |
| 19835 var keyvalue = part.split("="); | |
| 19836 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19837 } | |
| 19838 } | |
| 19839 | |
| 19840 | |
| 19841 var h = { | |
| 19842 "content-type" : "application/json; charset=utf-8", | |
| 19843 }; | |
| 19844 var resp = convert.JSON.encode(buildProject()); | |
| 19845 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19846 }), true); | |
| 19847 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Project res
ponse) { | |
| 19848 checkProject(response); | |
| 19849 }))); | |
| 19850 }); | |
| 19851 | |
| 19852 unittest.test("method--list", () { | |
| 19853 | |
| 19854 var mock = new HttpServerMock(); | |
| 19855 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19856 var arg_profileId = "foo"; | |
| 19857 var arg_advertiserIds = buildUnnamed2142(); | |
| 19858 var arg_ids = buildUnnamed2143(); | |
| 19859 var arg_maxResults = 42; | |
| 19860 var arg_pageToken = "foo"; | |
| 19861 var arg_searchString = "foo"; | |
| 19862 var arg_sortField = "foo"; | |
| 19863 var arg_sortOrder = "foo"; | |
| 19864 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19865 var path = (req.url).path; | |
| 19866 var pathOffset = 0; | |
| 19867 var index; | |
| 19868 var subPart; | |
| 19869 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19870 pathOffset += 1; | |
| 19871 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19872 pathOffset += 18; | |
| 19873 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19874 pathOffset += 13; | |
| 19875 index = path.indexOf("/projects", pathOffset); | |
| 19876 unittest.expect(index >= 0, unittest.isTrue); | |
| 19877 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19878 pathOffset = index; | |
| 19879 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19880 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/projects")); | |
| 19881 pathOffset += 9; | |
| 19882 | |
| 19883 var query = (req.url).query; | |
| 19884 var queryOffset = 0; | |
| 19885 var queryMap = {}; | |
| 19886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19887 parseBool(n) { | |
| 19888 if (n == "true") return true; | |
| 19889 if (n == "false") return false; | |
| 19890 if (n == null) return null; | |
| 19891 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19892 } | |
| 19893 if (query.length > 0) { | |
| 19894 for (var part in query.split("&")) { | |
| 19895 var keyvalue = part.split("="); | |
| 19896 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19897 } | |
| 19898 } | |
| 19899 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19900 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19901 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19902 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19903 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19904 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19905 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19906 | |
| 19907 | |
| 19908 var h = { | |
| 19909 "content-type" : "application/json; charset=utf-8", | |
| 19910 }; | |
| 19911 var resp = convert.JSON.encode(buildProjectsListResponse()); | |
| 19912 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19913 }), true); | |
| 19914 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) { | |
| 19915 checkProjectsListResponse(response); | |
| 19916 }))); | |
| 19917 }); | |
| 19918 | |
| 19919 }); | |
| 19920 | |
| 19921 | |
| 19922 unittest.group("resource-RegionsResourceApi", () { | |
| 19923 unittest.test("method--list", () { | |
| 19924 | |
| 19925 var mock = new HttpServerMock(); | |
| 19926 api.RegionsResourceApi res = new api.DfareportingApi(mock).regions; | |
| 19927 var arg_profileId = "foo"; | |
| 19928 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19929 var path = (req.url).path; | |
| 19930 var pathOffset = 0; | |
| 19931 var index; | |
| 19932 var subPart; | |
| 19933 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19934 pathOffset += 1; | |
| 19935 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19936 pathOffset += 18; | |
| 19937 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19938 pathOffset += 13; | |
| 19939 index = path.indexOf("/regions", pathOffset); | |
| 19940 unittest.expect(index >= 0, unittest.isTrue); | |
| 19941 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19942 pathOffset = index; | |
| 19943 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19944 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/regions")); | |
| 19945 pathOffset += 8; | |
| 19946 | |
| 19947 var query = (req.url).query; | |
| 19948 var queryOffset = 0; | |
| 19949 var queryMap = {}; | |
| 19950 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19951 parseBool(n) { | |
| 19952 if (n == "true") return true; | |
| 19953 if (n == "false") return false; | |
| 19954 if (n == null) return null; | |
| 19955 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19956 } | |
| 19957 if (query.length > 0) { | |
| 19958 for (var part in query.split("&")) { | |
| 19959 var keyvalue = part.split("="); | |
| 19960 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19961 } | |
| 19962 } | |
| 19963 | |
| 19964 | |
| 19965 var h = { | |
| 19966 "content-type" : "application/json; charset=utf-8", | |
| 19967 }; | |
| 19968 var resp = convert.JSON.encode(buildRegionsListResponse()); | |
| 19969 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19970 }), true); | |
| 19971 res.list(arg_profileId).then(unittest.expectAsync(((api.RegionsListRespons
e response) { | |
| 19972 checkRegionsListResponse(response); | |
| 19973 }))); | |
| 19974 }); | |
| 19975 | |
| 19976 }); | |
| 19977 | |
| 19978 | |
| 19979 unittest.group("resource-RemarketingListSharesResourceApi", () { | |
| 19980 unittest.test("method--get", () { | |
| 19981 | |
| 19982 var mock = new HttpServerMock(); | |
| 19983 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 19984 var arg_profileId = "foo"; | |
| 19985 var arg_remarketingListId = "foo"; | |
| 19986 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19987 var path = (req.url).path; | |
| 19988 var pathOffset = 0; | |
| 19989 var index; | |
| 19990 var subPart; | |
| 19991 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19992 pathOffset += 1; | |
| 19993 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 19994 pathOffset += 18; | |
| 19995 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19996 pathOffset += 13; | |
| 19997 index = path.indexOf("/remarketingListShares/", pathOffset); | |
| 19998 unittest.expect(index >= 0, unittest.isTrue); | |
| 19999 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20000 pathOffset = index; | |
| 20001 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20002 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/remarketingListShares/")); | |
| 20003 pathOffset += 23; | |
| 20004 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20005 pathOffset = path.length; | |
| 20006 unittest.expect(subPart, unittest.equals("$arg_remarketingListId")); | |
| 20007 | |
| 20008 var query = (req.url).query; | |
| 20009 var queryOffset = 0; | |
| 20010 var queryMap = {}; | |
| 20011 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20012 parseBool(n) { | |
| 20013 if (n == "true") return true; | |
| 20014 if (n == "false") return false; | |
| 20015 if (n == null) return null; | |
| 20016 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20017 } | |
| 20018 if (query.length > 0) { | |
| 20019 for (var part in query.split("&")) { | |
| 20020 var keyvalue = part.split("="); | |
| 20021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20022 } | |
| 20023 } | |
| 20024 | |
| 20025 | |
| 20026 var h = { | |
| 20027 "content-type" : "application/json; charset=utf-8", | |
| 20028 }; | |
| 20029 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20030 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20031 }), true); | |
| 20032 res.get(arg_profileId, arg_remarketingListId).then(unittest.expectAsync(((
api.RemarketingListShare response) { | |
| 20033 checkRemarketingListShare(response); | |
| 20034 }))); | |
| 20035 }); | |
| 20036 | |
| 20037 unittest.test("method--patch", () { | |
| 20038 | |
| 20039 var mock = new HttpServerMock(); | |
| 20040 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20041 var arg_request = buildRemarketingListShare(); | |
| 20042 var arg_profileId = "foo"; | |
| 20043 var arg_remarketingListId = "foo"; | |
| 20044 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20045 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20046 checkRemarketingListShare(obj); | |
| 20047 | |
| 20048 var path = (req.url).path; | |
| 20049 var pathOffset = 0; | |
| 20050 var index; | |
| 20051 var subPart; | |
| 20052 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20053 pathOffset += 1; | |
| 20054 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20055 pathOffset += 18; | |
| 20056 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20057 pathOffset += 13; | |
| 20058 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20059 unittest.expect(index >= 0, unittest.isTrue); | |
| 20060 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20061 pathOffset = index; | |
| 20062 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20063 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20064 pathOffset += 22; | |
| 20065 | |
| 20066 var query = (req.url).query; | |
| 20067 var queryOffset = 0; | |
| 20068 var queryMap = {}; | |
| 20069 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20070 parseBool(n) { | |
| 20071 if (n == "true") return true; | |
| 20072 if (n == "false") return false; | |
| 20073 if (n == null) return null; | |
| 20074 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20075 } | |
| 20076 if (query.length > 0) { | |
| 20077 for (var part in query.split("&")) { | |
| 20078 var keyvalue = part.split("="); | |
| 20079 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20080 } | |
| 20081 } | |
| 20082 unittest.expect(queryMap["remarketingListId"].first, unittest.equals(arg
_remarketingListId)); | |
| 20083 | |
| 20084 | |
| 20085 var h = { | |
| 20086 "content-type" : "application/json; charset=utf-8", | |
| 20087 }; | |
| 20088 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20089 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20090 }), true); | |
| 20091 res.patch(arg_request, arg_profileId, arg_remarketingListId).then(unittest
.expectAsync(((api.RemarketingListShare response) { | |
| 20092 checkRemarketingListShare(response); | |
| 20093 }))); | |
| 20094 }); | |
| 20095 | |
| 20096 unittest.test("method--update", () { | |
| 20097 | |
| 20098 var mock = new HttpServerMock(); | |
| 20099 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20100 var arg_request = buildRemarketingListShare(); | |
| 20101 var arg_profileId = "foo"; | |
| 20102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20103 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20104 checkRemarketingListShare(obj); | |
| 20105 | |
| 20106 var path = (req.url).path; | |
| 20107 var pathOffset = 0; | |
| 20108 var index; | |
| 20109 var subPart; | |
| 20110 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20111 pathOffset += 1; | |
| 20112 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20113 pathOffset += 18; | |
| 20114 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20115 pathOffset += 13; | |
| 20116 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20117 unittest.expect(index >= 0, unittest.isTrue); | |
| 20118 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20119 pathOffset = index; | |
| 20120 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20121 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20122 pathOffset += 22; | |
| 20123 | |
| 20124 var query = (req.url).query; | |
| 20125 var queryOffset = 0; | |
| 20126 var queryMap = {}; | |
| 20127 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20128 parseBool(n) { | |
| 20129 if (n == "true") return true; | |
| 20130 if (n == "false") return false; | |
| 20131 if (n == null) return null; | |
| 20132 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20133 } | |
| 20134 if (query.length > 0) { | |
| 20135 for (var part in query.split("&")) { | |
| 20136 var keyvalue = part.split("="); | |
| 20137 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20138 } | |
| 20139 } | |
| 20140 | |
| 20141 | |
| 20142 var h = { | |
| 20143 "content-type" : "application/json; charset=utf-8", | |
| 20144 }; | |
| 20145 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20146 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20147 }), true); | |
| 20148 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingListShare response) { | |
| 20149 checkRemarketingListShare(response); | |
| 20150 }))); | |
| 20151 }); | |
| 20152 | |
| 20153 }); | |
| 20154 | |
| 20155 | |
| 20156 unittest.group("resource-RemarketingListsResourceApi", () { | |
| 20157 unittest.test("method--get", () { | |
| 20158 | |
| 20159 var mock = new HttpServerMock(); | |
| 20160 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20161 var arg_profileId = "foo"; | |
| 20162 var arg_id = "foo"; | |
| 20163 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20164 var path = (req.url).path; | |
| 20165 var pathOffset = 0; | |
| 20166 var index; | |
| 20167 var subPart; | |
| 20168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20169 pathOffset += 1; | |
| 20170 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20171 pathOffset += 18; | |
| 20172 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20173 pathOffset += 13; | |
| 20174 index = path.indexOf("/remarketingLists/", pathOffset); | |
| 20175 unittest.expect(index >= 0, unittest.isTrue); | |
| 20176 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20177 pathOffset = index; | |
| 20178 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20179 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/remarketingLists/")); | |
| 20180 pathOffset += 18; | |
| 20181 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20182 pathOffset = path.length; | |
| 20183 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20184 | |
| 20185 var query = (req.url).query; | |
| 20186 var queryOffset = 0; | |
| 20187 var queryMap = {}; | |
| 20188 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20189 parseBool(n) { | |
| 20190 if (n == "true") return true; | |
| 20191 if (n == "false") return false; | |
| 20192 if (n == null) return null; | |
| 20193 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20194 } | |
| 20195 if (query.length > 0) { | |
| 20196 for (var part in query.split("&")) { | |
| 20197 var keyvalue = part.split("="); | |
| 20198 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20199 } | |
| 20200 } | |
| 20201 | |
| 20202 | |
| 20203 var h = { | |
| 20204 "content-type" : "application/json; charset=utf-8", | |
| 20205 }; | |
| 20206 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20207 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20208 }), true); | |
| 20209 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Remarketing
List response) { | |
| 20210 checkRemarketingList(response); | |
| 20211 }))); | |
| 20212 }); | |
| 20213 | |
| 20214 unittest.test("method--insert", () { | |
| 20215 | |
| 20216 var mock = new HttpServerMock(); | |
| 20217 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20218 var arg_request = buildRemarketingList(); | |
| 20219 var arg_profileId = "foo"; | |
| 20220 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20221 var obj = new api.RemarketingList.fromJson(json); | |
| 20222 checkRemarketingList(obj); | |
| 20223 | |
| 20224 var path = (req.url).path; | |
| 20225 var pathOffset = 0; | |
| 20226 var index; | |
| 20227 var subPart; | |
| 20228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20229 pathOffset += 1; | |
| 20230 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20231 pathOffset += 18; | |
| 20232 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20233 pathOffset += 13; | |
| 20234 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20235 unittest.expect(index >= 0, unittest.isTrue); | |
| 20236 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20237 pathOffset = index; | |
| 20238 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20239 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20240 pathOffset += 17; | |
| 20241 | |
| 20242 var query = (req.url).query; | |
| 20243 var queryOffset = 0; | |
| 20244 var queryMap = {}; | |
| 20245 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20246 parseBool(n) { | |
| 20247 if (n == "true") return true; | |
| 20248 if (n == "false") return false; | |
| 20249 if (n == null) return null; | |
| 20250 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20251 } | |
| 20252 if (query.length > 0) { | |
| 20253 for (var part in query.split("&")) { | |
| 20254 var keyvalue = part.split("="); | |
| 20255 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20256 } | |
| 20257 } | |
| 20258 | |
| 20259 | |
| 20260 var h = { | |
| 20261 "content-type" : "application/json; charset=utf-8", | |
| 20262 }; | |
| 20263 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20264 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20265 }), true); | |
| 20266 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20267 checkRemarketingList(response); | |
| 20268 }))); | |
| 20269 }); | |
| 20270 | |
| 20271 unittest.test("method--list", () { | |
| 20272 | |
| 20273 var mock = new HttpServerMock(); | |
| 20274 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20275 var arg_profileId = "foo"; | |
| 20276 var arg_advertiserId = "foo"; | |
| 20277 var arg_active = true; | |
| 20278 var arg_floodlightActivityId = "foo"; | |
| 20279 var arg_maxResults = 42; | |
| 20280 var arg_name = "foo"; | |
| 20281 var arg_pageToken = "foo"; | |
| 20282 var arg_sortField = "foo"; | |
| 20283 var arg_sortOrder = "foo"; | |
| 20284 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20285 var path = (req.url).path; | |
| 20286 var pathOffset = 0; | |
| 20287 var index; | |
| 20288 var subPart; | |
| 20289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20290 pathOffset += 1; | |
| 20291 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20292 pathOffset += 18; | |
| 20293 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20294 pathOffset += 13; | |
| 20295 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20296 unittest.expect(index >= 0, unittest.isTrue); | |
| 20297 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20298 pathOffset = index; | |
| 20299 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20300 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20301 pathOffset += 17; | |
| 20302 | |
| 20303 var query = (req.url).query; | |
| 20304 var queryOffset = 0; | |
| 20305 var queryMap = {}; | |
| 20306 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20307 parseBool(n) { | |
| 20308 if (n == "true") return true; | |
| 20309 if (n == "false") return false; | |
| 20310 if (n == null) return null; | |
| 20311 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20312 } | |
| 20313 if (query.length > 0) { | |
| 20314 for (var part in query.split("&")) { | |
| 20315 var keyvalue = part.split("="); | |
| 20316 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20317 } | |
| 20318 } | |
| 20319 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 20320 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 20321 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 20322 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20323 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 20324 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20325 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20326 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20327 | |
| 20328 | |
| 20329 var h = { | |
| 20330 "content-type" : "application/json; charset=utf-8", | |
| 20331 }; | |
| 20332 var resp = convert.JSON.encode(buildRemarketingListsListResponse()); | |
| 20333 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20334 }), true); | |
| 20335 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) { | |
| 20336 checkRemarketingListsListResponse(response); | |
| 20337 }))); | |
| 20338 }); | |
| 20339 | |
| 20340 unittest.test("method--patch", () { | |
| 20341 | |
| 20342 var mock = new HttpServerMock(); | |
| 20343 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20344 var arg_request = buildRemarketingList(); | |
| 20345 var arg_profileId = "foo"; | |
| 20346 var arg_id = "foo"; | |
| 20347 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20348 var obj = new api.RemarketingList.fromJson(json); | |
| 20349 checkRemarketingList(obj); | |
| 20350 | |
| 20351 var path = (req.url).path; | |
| 20352 var pathOffset = 0; | |
| 20353 var index; | |
| 20354 var subPart; | |
| 20355 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20356 pathOffset += 1; | |
| 20357 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20358 pathOffset += 18; | |
| 20359 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20360 pathOffset += 13; | |
| 20361 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20362 unittest.expect(index >= 0, unittest.isTrue); | |
| 20363 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20364 pathOffset = index; | |
| 20365 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20366 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20367 pathOffset += 17; | |
| 20368 | |
| 20369 var query = (req.url).query; | |
| 20370 var queryOffset = 0; | |
| 20371 var queryMap = {}; | |
| 20372 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20373 parseBool(n) { | |
| 20374 if (n == "true") return true; | |
| 20375 if (n == "false") return false; | |
| 20376 if (n == null) return null; | |
| 20377 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20378 } | |
| 20379 if (query.length > 0) { | |
| 20380 for (var part in query.split("&")) { | |
| 20381 var keyvalue = part.split("="); | |
| 20382 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20383 } | |
| 20384 } | |
| 20385 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 20386 | |
| 20387 | |
| 20388 var h = { | |
| 20389 "content-type" : "application/json; charset=utf-8", | |
| 20390 }; | |
| 20391 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20392 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20393 }), true); | |
| 20394 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.RemarketingList response) { | |
| 20395 checkRemarketingList(response); | |
| 20396 }))); | |
| 20397 }); | |
| 20398 | |
| 20399 unittest.test("method--update", () { | |
| 20400 | |
| 20401 var mock = new HttpServerMock(); | |
| 20402 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20403 var arg_request = buildRemarketingList(); | |
| 20404 var arg_profileId = "foo"; | |
| 20405 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20406 var obj = new api.RemarketingList.fromJson(json); | |
| 20407 checkRemarketingList(obj); | |
| 20408 | |
| 20409 var path = (req.url).path; | |
| 20410 var pathOffset = 0; | |
| 20411 var index; | |
| 20412 var subPart; | |
| 20413 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20414 pathOffset += 1; | |
| 20415 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20416 pathOffset += 18; | |
| 20417 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20418 pathOffset += 13; | |
| 20419 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20420 unittest.expect(index >= 0, unittest.isTrue); | |
| 20421 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20422 pathOffset = index; | |
| 20423 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20424 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20425 pathOffset += 17; | |
| 20426 | |
| 20427 var query = (req.url).query; | |
| 20428 var queryOffset = 0; | |
| 20429 var queryMap = {}; | |
| 20430 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20431 parseBool(n) { | |
| 20432 if (n == "true") return true; | |
| 20433 if (n == "false") return false; | |
| 20434 if (n == null) return null; | |
| 20435 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20436 } | |
| 20437 if (query.length > 0) { | |
| 20438 for (var part in query.split("&")) { | |
| 20439 var keyvalue = part.split("="); | |
| 20440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20441 } | |
| 20442 } | |
| 20443 | |
| 20444 | |
| 20445 var h = { | |
| 20446 "content-type" : "application/json; charset=utf-8", | |
| 20447 }; | |
| 20448 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20449 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20450 }), true); | |
| 20451 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20452 checkRemarketingList(response); | |
| 20453 }))); | |
| 20454 }); | |
| 20455 | |
| 20456 }); | |
| 20457 | |
| 20458 | |
| 20459 unittest.group("resource-ReportsResourceApi", () { | |
| 20460 unittest.test("method--delete", () { | |
| 20461 | |
| 20462 var mock = new HttpServerMock(); | |
| 20463 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20464 var arg_profileId = "foo"; | |
| 20465 var arg_reportId = "foo"; | |
| 20466 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20467 var path = (req.url).path; | |
| 20468 var pathOffset = 0; | |
| 20469 var index; | |
| 20470 var subPart; | |
| 20471 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20472 pathOffset += 1; | |
| 20473 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20474 pathOffset += 18; | |
| 20475 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20476 pathOffset += 13; | |
| 20477 index = path.indexOf("/reports/", pathOffset); | |
| 20478 unittest.expect(index >= 0, unittest.isTrue); | |
| 20479 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20480 pathOffset = index; | |
| 20481 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20482 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20483 pathOffset += 9; | |
| 20484 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20485 pathOffset = path.length; | |
| 20486 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20487 | |
| 20488 var query = (req.url).query; | |
| 20489 var queryOffset = 0; | |
| 20490 var queryMap = {}; | |
| 20491 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20492 parseBool(n) { | |
| 20493 if (n == "true") return true; | |
| 20494 if (n == "false") return false; | |
| 20495 if (n == null) return null; | |
| 20496 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20497 } | |
| 20498 if (query.length > 0) { | |
| 20499 for (var part in query.split("&")) { | |
| 20500 var keyvalue = part.split("="); | |
| 20501 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20502 } | |
| 20503 } | |
| 20504 | |
| 20505 | |
| 20506 var h = { | |
| 20507 "content-type" : "application/json; charset=utf-8", | |
| 20508 }; | |
| 20509 var resp = ""; | |
| 20510 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20511 }), true); | |
| 20512 res.delete(arg_profileId, arg_reportId).then(unittest.expectAsync((_) {}))
; | |
| 20513 }); | |
| 20514 | |
| 20515 unittest.test("method--get", () { | |
| 20516 | |
| 20517 var mock = new HttpServerMock(); | |
| 20518 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20519 var arg_profileId = "foo"; | |
| 20520 var arg_reportId = "foo"; | |
| 20521 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20522 var path = (req.url).path; | |
| 20523 var pathOffset = 0; | |
| 20524 var index; | |
| 20525 var subPart; | |
| 20526 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20527 pathOffset += 1; | |
| 20528 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20529 pathOffset += 18; | |
| 20530 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20531 pathOffset += 13; | |
| 20532 index = path.indexOf("/reports/", pathOffset); | |
| 20533 unittest.expect(index >= 0, unittest.isTrue); | |
| 20534 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20535 pathOffset = index; | |
| 20536 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20537 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20538 pathOffset += 9; | |
| 20539 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20540 pathOffset = path.length; | |
| 20541 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20542 | |
| 20543 var query = (req.url).query; | |
| 20544 var queryOffset = 0; | |
| 20545 var queryMap = {}; | |
| 20546 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20547 parseBool(n) { | |
| 20548 if (n == "true") return true; | |
| 20549 if (n == "false") return false; | |
| 20550 if (n == null) return null; | |
| 20551 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20552 } | |
| 20553 if (query.length > 0) { | |
| 20554 for (var part in query.split("&")) { | |
| 20555 var keyvalue = part.split("="); | |
| 20556 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20557 } | |
| 20558 } | |
| 20559 | |
| 20560 | |
| 20561 var h = { | |
| 20562 "content-type" : "application/json; charset=utf-8", | |
| 20563 }; | |
| 20564 var resp = convert.JSON.encode(buildReport()); | |
| 20565 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20566 }), true); | |
| 20567 res.get(arg_profileId, arg_reportId).then(unittest.expectAsync(((api.Repor
t response) { | |
| 20568 checkReport(response); | |
| 20569 }))); | |
| 20570 }); | |
| 20571 | |
| 20572 unittest.test("method--insert", () { | |
| 20573 | |
| 20574 var mock = new HttpServerMock(); | |
| 20575 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20576 var arg_request = buildReport(); | |
| 20577 var arg_profileId = "foo"; | |
| 20578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20579 var obj = new api.Report.fromJson(json); | |
| 20580 checkReport(obj); | |
| 20581 | |
| 20582 var path = (req.url).path; | |
| 20583 var pathOffset = 0; | |
| 20584 var index; | |
| 20585 var subPart; | |
| 20586 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20587 pathOffset += 1; | |
| 20588 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20589 pathOffset += 18; | |
| 20590 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20591 pathOffset += 13; | |
| 20592 index = path.indexOf("/reports", pathOffset); | |
| 20593 unittest.expect(index >= 0, unittest.isTrue); | |
| 20594 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20595 pathOffset = index; | |
| 20596 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20597 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20598 pathOffset += 8; | |
| 20599 | |
| 20600 var query = (req.url).query; | |
| 20601 var queryOffset = 0; | |
| 20602 var queryMap = {}; | |
| 20603 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20604 parseBool(n) { | |
| 20605 if (n == "true") return true; | |
| 20606 if (n == "false") return false; | |
| 20607 if (n == null) return null; | |
| 20608 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20609 } | |
| 20610 if (query.length > 0) { | |
| 20611 for (var part in query.split("&")) { | |
| 20612 var keyvalue = part.split("="); | |
| 20613 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20614 } | |
| 20615 } | |
| 20616 | |
| 20617 | |
| 20618 var h = { | |
| 20619 "content-type" : "application/json; charset=utf-8", | |
| 20620 }; | |
| 20621 var resp = convert.JSON.encode(buildReport()); | |
| 20622 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20623 }), true); | |
| 20624 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rep
ort response) { | |
| 20625 checkReport(response); | |
| 20626 }))); | |
| 20627 }); | |
| 20628 | |
| 20629 unittest.test("method--list", () { | |
| 20630 | |
| 20631 var mock = new HttpServerMock(); | |
| 20632 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20633 var arg_profileId = "foo"; | |
| 20634 var arg_maxResults = 42; | |
| 20635 var arg_pageToken = "foo"; | |
| 20636 var arg_scope = "foo"; | |
| 20637 var arg_sortField = "foo"; | |
| 20638 var arg_sortOrder = "foo"; | |
| 20639 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20640 var path = (req.url).path; | |
| 20641 var pathOffset = 0; | |
| 20642 var index; | |
| 20643 var subPart; | |
| 20644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20645 pathOffset += 1; | |
| 20646 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20647 pathOffset += 18; | |
| 20648 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20649 pathOffset += 13; | |
| 20650 index = path.indexOf("/reports", pathOffset); | |
| 20651 unittest.expect(index >= 0, unittest.isTrue); | |
| 20652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20653 pathOffset = index; | |
| 20654 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20655 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20656 pathOffset += 8; | |
| 20657 | |
| 20658 var query = (req.url).query; | |
| 20659 var queryOffset = 0; | |
| 20660 var queryMap = {}; | |
| 20661 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20662 parseBool(n) { | |
| 20663 if (n == "true") return true; | |
| 20664 if (n == "false") return false; | |
| 20665 if (n == null) return null; | |
| 20666 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20667 } | |
| 20668 if (query.length > 0) { | |
| 20669 for (var part in query.split("&")) { | |
| 20670 var keyvalue = part.split("="); | |
| 20671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20672 } | |
| 20673 } | |
| 20674 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20675 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20676 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 20677 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20678 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20679 | |
| 20680 | |
| 20681 var h = { | |
| 20682 "content-type" : "application/json; charset=utf-8", | |
| 20683 }; | |
| 20684 var resp = convert.JSON.encode(buildReportList()); | |
| 20685 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20686 }), true); | |
| 20687 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) { | |
| 20688 checkReportList(response); | |
| 20689 }))); | |
| 20690 }); | |
| 20691 | |
| 20692 unittest.test("method--patch", () { | |
| 20693 | |
| 20694 var mock = new HttpServerMock(); | |
| 20695 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20696 var arg_request = buildReport(); | |
| 20697 var arg_profileId = "foo"; | |
| 20698 var arg_reportId = "foo"; | |
| 20699 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20700 var obj = new api.Report.fromJson(json); | |
| 20701 checkReport(obj); | |
| 20702 | |
| 20703 var path = (req.url).path; | |
| 20704 var pathOffset = 0; | |
| 20705 var index; | |
| 20706 var subPart; | |
| 20707 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20708 pathOffset += 1; | |
| 20709 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20710 pathOffset += 18; | |
| 20711 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20712 pathOffset += 13; | |
| 20713 index = path.indexOf("/reports/", pathOffset); | |
| 20714 unittest.expect(index >= 0, unittest.isTrue); | |
| 20715 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20716 pathOffset = index; | |
| 20717 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20718 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20719 pathOffset += 9; | |
| 20720 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20721 pathOffset = path.length; | |
| 20722 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20723 | |
| 20724 var query = (req.url).query; | |
| 20725 var queryOffset = 0; | |
| 20726 var queryMap = {}; | |
| 20727 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20728 parseBool(n) { | |
| 20729 if (n == "true") return true; | |
| 20730 if (n == "false") return false; | |
| 20731 if (n == null) return null; | |
| 20732 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20733 } | |
| 20734 if (query.length > 0) { | |
| 20735 for (var part in query.split("&")) { | |
| 20736 var keyvalue = part.split("="); | |
| 20737 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20738 } | |
| 20739 } | |
| 20740 | |
| 20741 | |
| 20742 var h = { | |
| 20743 "content-type" : "application/json; charset=utf-8", | |
| 20744 }; | |
| 20745 var resp = convert.JSON.encode(buildReport()); | |
| 20746 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20747 }), true); | |
| 20748 res.patch(arg_request, arg_profileId, arg_reportId).then(unittest.expectAs
ync(((api.Report response) { | |
| 20749 checkReport(response); | |
| 20750 }))); | |
| 20751 }); | |
| 20752 | |
| 20753 unittest.test("method--run", () { | |
| 20754 | |
| 20755 var mock = new HttpServerMock(); | |
| 20756 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20757 var arg_profileId = "foo"; | |
| 20758 var arg_reportId = "foo"; | |
| 20759 var arg_synchronous = true; | |
| 20760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20761 var path = (req.url).path; | |
| 20762 var pathOffset = 0; | |
| 20763 var index; | |
| 20764 var subPart; | |
| 20765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20766 pathOffset += 1; | |
| 20767 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20768 pathOffset += 18; | |
| 20769 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20770 pathOffset += 13; | |
| 20771 index = path.indexOf("/reports/", pathOffset); | |
| 20772 unittest.expect(index >= 0, unittest.isTrue); | |
| 20773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20774 pathOffset = index; | |
| 20775 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20776 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20777 pathOffset += 9; | |
| 20778 index = path.indexOf("/run", pathOffset); | |
| 20779 unittest.expect(index >= 0, unittest.isTrue); | |
| 20780 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20781 pathOffset = index; | |
| 20782 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20783 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/run")); | |
| 20784 pathOffset += 4; | |
| 20785 | |
| 20786 var query = (req.url).query; | |
| 20787 var queryOffset = 0; | |
| 20788 var queryMap = {}; | |
| 20789 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20790 parseBool(n) { | |
| 20791 if (n == "true") return true; | |
| 20792 if (n == "false") return false; | |
| 20793 if (n == null) return null; | |
| 20794 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20795 } | |
| 20796 if (query.length > 0) { | |
| 20797 for (var part in query.split("&")) { | |
| 20798 var keyvalue = part.split("="); | |
| 20799 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20800 } | |
| 20801 } | |
| 20802 unittest.expect(queryMap["synchronous"].first, unittest.equals("$arg_syn
chronous")); | |
| 20803 | |
| 20804 | |
| 20805 var h = { | |
| 20806 "content-type" : "application/json; charset=utf-8", | |
| 20807 }; | |
| 20808 var resp = convert.JSON.encode(buildFile()); | |
| 20809 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20810 }), true); | |
| 20811 res.run(arg_profileId, arg_reportId, synchronous: arg_synchronous).then(un
ittest.expectAsync(((api.File response) { | |
| 20812 checkFile(response); | |
| 20813 }))); | |
| 20814 }); | |
| 20815 | |
| 20816 unittest.test("method--update", () { | |
| 20817 | |
| 20818 var mock = new HttpServerMock(); | |
| 20819 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20820 var arg_request = buildReport(); | |
| 20821 var arg_profileId = "foo"; | |
| 20822 var arg_reportId = "foo"; | |
| 20823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20824 var obj = new api.Report.fromJson(json); | |
| 20825 checkReport(obj); | |
| 20826 | |
| 20827 var path = (req.url).path; | |
| 20828 var pathOffset = 0; | |
| 20829 var index; | |
| 20830 var subPart; | |
| 20831 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20832 pathOffset += 1; | |
| 20833 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20834 pathOffset += 18; | |
| 20835 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20836 pathOffset += 13; | |
| 20837 index = path.indexOf("/reports/", pathOffset); | |
| 20838 unittest.expect(index >= 0, unittest.isTrue); | |
| 20839 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20840 pathOffset = index; | |
| 20841 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20842 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20843 pathOffset += 9; | |
| 20844 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20845 pathOffset = path.length; | |
| 20846 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20847 | |
| 20848 var query = (req.url).query; | |
| 20849 var queryOffset = 0; | |
| 20850 var queryMap = {}; | |
| 20851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20852 parseBool(n) { | |
| 20853 if (n == "true") return true; | |
| 20854 if (n == "false") return false; | |
| 20855 if (n == null) return null; | |
| 20856 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20857 } | |
| 20858 if (query.length > 0) { | |
| 20859 for (var part in query.split("&")) { | |
| 20860 var keyvalue = part.split("="); | |
| 20861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20862 } | |
| 20863 } | |
| 20864 | |
| 20865 | |
| 20866 var h = { | |
| 20867 "content-type" : "application/json; charset=utf-8", | |
| 20868 }; | |
| 20869 var resp = convert.JSON.encode(buildReport()); | |
| 20870 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20871 }), true); | |
| 20872 res.update(arg_request, arg_profileId, arg_reportId).then(unittest.expectA
sync(((api.Report response) { | |
| 20873 checkReport(response); | |
| 20874 }))); | |
| 20875 }); | |
| 20876 | |
| 20877 }); | |
| 20878 | |
| 20879 | |
| 20880 unittest.group("resource-ReportsCompatibleFieldsResourceApi", () { | |
| 20881 unittest.test("method--query", () { | |
| 20882 | |
| 20883 var mock = new HttpServerMock(); | |
| 20884 api.ReportsCompatibleFieldsResourceApi res = new api.DfareportingApi(mock)
.reports.compatibleFields; | |
| 20885 var arg_request = buildReport(); | |
| 20886 var arg_profileId = "foo"; | |
| 20887 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20888 var obj = new api.Report.fromJson(json); | |
| 20889 checkReport(obj); | |
| 20890 | |
| 20891 var path = (req.url).path; | |
| 20892 var pathOffset = 0; | |
| 20893 var index; | |
| 20894 var subPart; | |
| 20895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20896 pathOffset += 1; | |
| 20897 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20898 pathOffset += 18; | |
| 20899 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20900 pathOffset += 13; | |
| 20901 index = path.indexOf("/reports/compatiblefields/query", pathOffset); | |
| 20902 unittest.expect(index >= 0, unittest.isTrue); | |
| 20903 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20904 pathOffset = index; | |
| 20905 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20906 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("/reports/compatiblefields/query")); | |
| 20907 pathOffset += 31; | |
| 20908 | |
| 20909 var query = (req.url).query; | |
| 20910 var queryOffset = 0; | |
| 20911 var queryMap = {}; | |
| 20912 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20913 parseBool(n) { | |
| 20914 if (n == "true") return true; | |
| 20915 if (n == "false") return false; | |
| 20916 if (n == null) return null; | |
| 20917 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20918 } | |
| 20919 if (query.length > 0) { | |
| 20920 for (var part in query.split("&")) { | |
| 20921 var keyvalue = part.split("="); | |
| 20922 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20923 } | |
| 20924 } | |
| 20925 | |
| 20926 | |
| 20927 var h = { | |
| 20928 "content-type" : "application/json; charset=utf-8", | |
| 20929 }; | |
| 20930 var resp = convert.JSON.encode(buildCompatibleFields()); | |
| 20931 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20932 }), true); | |
| 20933 res.query(arg_request, arg_profileId).then(unittest.expectAsync(((api.Comp
atibleFields response) { | |
| 20934 checkCompatibleFields(response); | |
| 20935 }))); | |
| 20936 }); | |
| 20937 | |
| 20938 }); | |
| 20939 | |
| 20940 | |
| 20941 unittest.group("resource-ReportsFilesResourceApi", () { | |
| 20942 unittest.test("method--get", () { | |
| 20943 // TODO: Implement tests for media upload; | |
| 20944 // TODO: Implement tests for media download; | |
| 20945 | |
| 20946 var mock = new HttpServerMock(); | |
| 20947 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 20948 var arg_profileId = "foo"; | |
| 20949 var arg_reportId = "foo"; | |
| 20950 var arg_fileId = "foo"; | |
| 20951 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20952 var path = (req.url).path; | |
| 20953 var pathOffset = 0; | |
| 20954 var index; | |
| 20955 var subPart; | |
| 20956 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20957 pathOffset += 1; | |
| 20958 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 20959 pathOffset += 18; | |
| 20960 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20961 pathOffset += 13; | |
| 20962 index = path.indexOf("/reports/", pathOffset); | |
| 20963 unittest.expect(index >= 0, unittest.isTrue); | |
| 20964 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20965 pathOffset = index; | |
| 20966 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20967 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20968 pathOffset += 9; | |
| 20969 index = path.indexOf("/files/", pathOffset); | |
| 20970 unittest.expect(index >= 0, unittest.isTrue); | |
| 20971 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20972 pathOffset = index; | |
| 20973 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20974 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 20975 pathOffset += 7; | |
| 20976 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20977 pathOffset = path.length; | |
| 20978 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 20979 | |
| 20980 var query = (req.url).query; | |
| 20981 var queryOffset = 0; | |
| 20982 var queryMap = {}; | |
| 20983 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20984 parseBool(n) { | |
| 20985 if (n == "true") return true; | |
| 20986 if (n == "false") return false; | |
| 20987 if (n == null) return null; | |
| 20988 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20989 } | |
| 20990 if (query.length > 0) { | |
| 20991 for (var part in query.split("&")) { | |
| 20992 var keyvalue = part.split("="); | |
| 20993 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20994 } | |
| 20995 } | |
| 20996 | |
| 20997 | |
| 20998 var h = { | |
| 20999 "content-type" : "application/json; charset=utf-8", | |
| 21000 }; | |
| 21001 var resp = convert.JSON.encode(buildFile()); | |
| 21002 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21003 }), true); | |
| 21004 res.get(arg_profileId, arg_reportId, arg_fileId).then(unittest.expectAsync
(((api.File response) { | |
| 21005 checkFile(response); | |
| 21006 }))); | |
| 21007 }); | |
| 21008 | |
| 21009 unittest.test("method--list", () { | |
| 21010 | |
| 21011 var mock = new HttpServerMock(); | |
| 21012 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 21013 var arg_profileId = "foo"; | |
| 21014 var arg_reportId = "foo"; | |
| 21015 var arg_maxResults = 42; | |
| 21016 var arg_pageToken = "foo"; | |
| 21017 var arg_sortField = "foo"; | |
| 21018 var arg_sortOrder = "foo"; | |
| 21019 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21020 var path = (req.url).path; | |
| 21021 var pathOffset = 0; | |
| 21022 var index; | |
| 21023 var subPart; | |
| 21024 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21025 pathOffset += 1; | |
| 21026 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21027 pathOffset += 18; | |
| 21028 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21029 pathOffset += 13; | |
| 21030 index = path.indexOf("/reports/", pathOffset); | |
| 21031 unittest.expect(index >= 0, unittest.isTrue); | |
| 21032 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21033 pathOffset = index; | |
| 21034 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21035 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21036 pathOffset += 9; | |
| 21037 index = path.indexOf("/files", pathOffset); | |
| 21038 unittest.expect(index >= 0, unittest.isTrue); | |
| 21039 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21040 pathOffset = index; | |
| 21041 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21042 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 21043 pathOffset += 6; | |
| 21044 | |
| 21045 var query = (req.url).query; | |
| 21046 var queryOffset = 0; | |
| 21047 var queryMap = {}; | |
| 21048 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21049 parseBool(n) { | |
| 21050 if (n == "true") return true; | |
| 21051 if (n == "false") return false; | |
| 21052 if (n == null) return null; | |
| 21053 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21054 } | |
| 21055 if (query.length > 0) { | |
| 21056 for (var part in query.split("&")) { | |
| 21057 var keyvalue = part.split("="); | |
| 21058 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21059 } | |
| 21060 } | |
| 21061 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21062 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21063 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21064 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21065 | |
| 21066 | |
| 21067 var h = { | |
| 21068 "content-type" : "application/json; charset=utf-8", | |
| 21069 }; | |
| 21070 var resp = convert.JSON.encode(buildFileList()); | |
| 21071 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21072 }), true); | |
| 21073 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) { | |
| 21074 checkFileList(response); | |
| 21075 }))); | |
| 21076 }); | |
| 21077 | |
| 21078 }); | |
| 21079 | |
| 21080 | |
| 21081 unittest.group("resource-SitesResourceApi", () { | |
| 21082 unittest.test("method--get", () { | |
| 21083 | |
| 21084 var mock = new HttpServerMock(); | |
| 21085 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21086 var arg_profileId = "foo"; | |
| 21087 var arg_id = "foo"; | |
| 21088 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21089 var path = (req.url).path; | |
| 21090 var pathOffset = 0; | |
| 21091 var index; | |
| 21092 var subPart; | |
| 21093 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21094 pathOffset += 1; | |
| 21095 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21096 pathOffset += 18; | |
| 21097 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21098 pathOffset += 13; | |
| 21099 index = path.indexOf("/sites/", pathOffset); | |
| 21100 unittest.expect(index >= 0, unittest.isTrue); | |
| 21101 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21102 pathOffset = index; | |
| 21103 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21104 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sites/")); | |
| 21105 pathOffset += 7; | |
| 21106 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21107 pathOffset = path.length; | |
| 21108 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21109 | |
| 21110 var query = (req.url).query; | |
| 21111 var queryOffset = 0; | |
| 21112 var queryMap = {}; | |
| 21113 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21114 parseBool(n) { | |
| 21115 if (n == "true") return true; | |
| 21116 if (n == "false") return false; | |
| 21117 if (n == null) return null; | |
| 21118 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21119 } | |
| 21120 if (query.length > 0) { | |
| 21121 for (var part in query.split("&")) { | |
| 21122 var keyvalue = part.split("="); | |
| 21123 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21124 } | |
| 21125 } | |
| 21126 | |
| 21127 | |
| 21128 var h = { | |
| 21129 "content-type" : "application/json; charset=utf-8", | |
| 21130 }; | |
| 21131 var resp = convert.JSON.encode(buildSite()); | |
| 21132 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21133 }), true); | |
| 21134 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Site respon
se) { | |
| 21135 checkSite(response); | |
| 21136 }))); | |
| 21137 }); | |
| 21138 | |
| 21139 unittest.test("method--insert", () { | |
| 21140 | |
| 21141 var mock = new HttpServerMock(); | |
| 21142 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21143 var arg_request = buildSite(); | |
| 21144 var arg_profileId = "foo"; | |
| 21145 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21146 var obj = new api.Site.fromJson(json); | |
| 21147 checkSite(obj); | |
| 21148 | |
| 21149 var path = (req.url).path; | |
| 21150 var pathOffset = 0; | |
| 21151 var index; | |
| 21152 var subPart; | |
| 21153 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21154 pathOffset += 1; | |
| 21155 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21156 pathOffset += 18; | |
| 21157 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21158 pathOffset += 13; | |
| 21159 index = path.indexOf("/sites", pathOffset); | |
| 21160 unittest.expect(index >= 0, unittest.isTrue); | |
| 21161 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21162 pathOffset = index; | |
| 21163 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21164 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21165 pathOffset += 6; | |
| 21166 | |
| 21167 var query = (req.url).query; | |
| 21168 var queryOffset = 0; | |
| 21169 var queryMap = {}; | |
| 21170 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21171 parseBool(n) { | |
| 21172 if (n == "true") return true; | |
| 21173 if (n == "false") return false; | |
| 21174 if (n == null) return null; | |
| 21175 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21176 } | |
| 21177 if (query.length > 0) { | |
| 21178 for (var part in query.split("&")) { | |
| 21179 var keyvalue = part.split("="); | |
| 21180 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21181 } | |
| 21182 } | |
| 21183 | |
| 21184 | |
| 21185 var h = { | |
| 21186 "content-type" : "application/json; charset=utf-8", | |
| 21187 }; | |
| 21188 var resp = convert.JSON.encode(buildSite()); | |
| 21189 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21190 }), true); | |
| 21191 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21192 checkSite(response); | |
| 21193 }))); | |
| 21194 }); | |
| 21195 | |
| 21196 unittest.test("method--list", () { | |
| 21197 | |
| 21198 var mock = new HttpServerMock(); | |
| 21199 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21200 var arg_profileId = "foo"; | |
| 21201 var arg_acceptsInStreamVideoPlacements = true; | |
| 21202 var arg_acceptsInterstitialPlacements = true; | |
| 21203 var arg_acceptsPublisherPaidPlacements = true; | |
| 21204 var arg_adWordsSite = true; | |
| 21205 var arg_approved = true; | |
| 21206 var arg_campaignIds = buildUnnamed2144(); | |
| 21207 var arg_directorySiteIds = buildUnnamed2145(); | |
| 21208 var arg_ids = buildUnnamed2146(); | |
| 21209 var arg_maxResults = 42; | |
| 21210 var arg_pageToken = "foo"; | |
| 21211 var arg_searchString = "foo"; | |
| 21212 var arg_sortField = "foo"; | |
| 21213 var arg_sortOrder = "foo"; | |
| 21214 var arg_subaccountId = "foo"; | |
| 21215 var arg_unmappedSite = true; | |
| 21216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21217 var path = (req.url).path; | |
| 21218 var pathOffset = 0; | |
| 21219 var index; | |
| 21220 var subPart; | |
| 21221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21222 pathOffset += 1; | |
| 21223 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21224 pathOffset += 18; | |
| 21225 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21226 pathOffset += 13; | |
| 21227 index = path.indexOf("/sites", pathOffset); | |
| 21228 unittest.expect(index >= 0, unittest.isTrue); | |
| 21229 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21230 pathOffset = index; | |
| 21231 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21232 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21233 pathOffset += 6; | |
| 21234 | |
| 21235 var query = (req.url).query; | |
| 21236 var queryOffset = 0; | |
| 21237 var queryMap = {}; | |
| 21238 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21239 parseBool(n) { | |
| 21240 if (n == "true") return true; | |
| 21241 if (n == "false") return false; | |
| 21242 if (n == null) return null; | |
| 21243 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21244 } | |
| 21245 if (query.length > 0) { | |
| 21246 for (var part in query.split("&")) { | |
| 21247 var keyvalue = part.split("="); | |
| 21248 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21249 } | |
| 21250 } | |
| 21251 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 21252 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 21253 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 21254 unittest.expect(queryMap["adWordsSite"].first, unittest.equals("$arg_adW
ordsSite")); | |
| 21255 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 21256 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 21257 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 21258 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21259 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21260 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21261 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21262 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21263 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21264 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 21265 unittest.expect(queryMap["unmappedSite"].first, unittest.equals("$arg_un
mappedSite")); | |
| 21266 | |
| 21267 | |
| 21268 var h = { | |
| 21269 "content-type" : "application/json; charset=utf-8", | |
| 21270 }; | |
| 21271 var resp = convert.JSON.encode(buildSitesListResponse()); | |
| 21272 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21273 }), true); | |
| 21274 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) { | |
| 21275 checkSitesListResponse(response); | |
| 21276 }))); | |
| 21277 }); | |
| 21278 | |
| 21279 unittest.test("method--patch", () { | |
| 21280 | |
| 21281 var mock = new HttpServerMock(); | |
| 21282 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21283 var arg_request = buildSite(); | |
| 21284 var arg_profileId = "foo"; | |
| 21285 var arg_id = "foo"; | |
| 21286 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21287 var obj = new api.Site.fromJson(json); | |
| 21288 checkSite(obj); | |
| 21289 | |
| 21290 var path = (req.url).path; | |
| 21291 var pathOffset = 0; | |
| 21292 var index; | |
| 21293 var subPart; | |
| 21294 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21295 pathOffset += 1; | |
| 21296 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21297 pathOffset += 18; | |
| 21298 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21299 pathOffset += 13; | |
| 21300 index = path.indexOf("/sites", pathOffset); | |
| 21301 unittest.expect(index >= 0, unittest.isTrue); | |
| 21302 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21303 pathOffset = index; | |
| 21304 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21305 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21306 pathOffset += 6; | |
| 21307 | |
| 21308 var query = (req.url).query; | |
| 21309 var queryOffset = 0; | |
| 21310 var queryMap = {}; | |
| 21311 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21312 parseBool(n) { | |
| 21313 if (n == "true") return true; | |
| 21314 if (n == "false") return false; | |
| 21315 if (n == null) return null; | |
| 21316 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21317 } | |
| 21318 if (query.length > 0) { | |
| 21319 for (var part in query.split("&")) { | |
| 21320 var keyvalue = part.split("="); | |
| 21321 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21322 } | |
| 21323 } | |
| 21324 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21325 | |
| 21326 | |
| 21327 var h = { | |
| 21328 "content-type" : "application/json; charset=utf-8", | |
| 21329 }; | |
| 21330 var resp = convert.JSON.encode(buildSite()); | |
| 21331 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21332 }), true); | |
| 21333 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Site response) { | |
| 21334 checkSite(response); | |
| 21335 }))); | |
| 21336 }); | |
| 21337 | |
| 21338 unittest.test("method--update", () { | |
| 21339 | |
| 21340 var mock = new HttpServerMock(); | |
| 21341 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21342 var arg_request = buildSite(); | |
| 21343 var arg_profileId = "foo"; | |
| 21344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21345 var obj = new api.Site.fromJson(json); | |
| 21346 checkSite(obj); | |
| 21347 | |
| 21348 var path = (req.url).path; | |
| 21349 var pathOffset = 0; | |
| 21350 var index; | |
| 21351 var subPart; | |
| 21352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21353 pathOffset += 1; | |
| 21354 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21355 pathOffset += 18; | |
| 21356 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21357 pathOffset += 13; | |
| 21358 index = path.indexOf("/sites", pathOffset); | |
| 21359 unittest.expect(index >= 0, unittest.isTrue); | |
| 21360 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21361 pathOffset = index; | |
| 21362 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21363 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21364 pathOffset += 6; | |
| 21365 | |
| 21366 var query = (req.url).query; | |
| 21367 var queryOffset = 0; | |
| 21368 var queryMap = {}; | |
| 21369 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21370 parseBool(n) { | |
| 21371 if (n == "true") return true; | |
| 21372 if (n == "false") return false; | |
| 21373 if (n == null) return null; | |
| 21374 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21375 } | |
| 21376 if (query.length > 0) { | |
| 21377 for (var part in query.split("&")) { | |
| 21378 var keyvalue = part.split("="); | |
| 21379 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21380 } | |
| 21381 } | |
| 21382 | |
| 21383 | |
| 21384 var h = { | |
| 21385 "content-type" : "application/json; charset=utf-8", | |
| 21386 }; | |
| 21387 var resp = convert.JSON.encode(buildSite()); | |
| 21388 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21389 }), true); | |
| 21390 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21391 checkSite(response); | |
| 21392 }))); | |
| 21393 }); | |
| 21394 | |
| 21395 }); | |
| 21396 | |
| 21397 | |
| 21398 unittest.group("resource-SizesResourceApi", () { | |
| 21399 unittest.test("method--get", () { | |
| 21400 | |
| 21401 var mock = new HttpServerMock(); | |
| 21402 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21403 var arg_profileId = "foo"; | |
| 21404 var arg_id = "foo"; | |
| 21405 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21406 var path = (req.url).path; | |
| 21407 var pathOffset = 0; | |
| 21408 var index; | |
| 21409 var subPart; | |
| 21410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21411 pathOffset += 1; | |
| 21412 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21413 pathOffset += 18; | |
| 21414 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21415 pathOffset += 13; | |
| 21416 index = path.indexOf("/sizes/", pathOffset); | |
| 21417 unittest.expect(index >= 0, unittest.isTrue); | |
| 21418 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21419 pathOffset = index; | |
| 21420 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21421 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sizes/")); | |
| 21422 pathOffset += 7; | |
| 21423 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21424 pathOffset = path.length; | |
| 21425 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21426 | |
| 21427 var query = (req.url).query; | |
| 21428 var queryOffset = 0; | |
| 21429 var queryMap = {}; | |
| 21430 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21431 parseBool(n) { | |
| 21432 if (n == "true") return true; | |
| 21433 if (n == "false") return false; | |
| 21434 if (n == null) return null; | |
| 21435 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21436 } | |
| 21437 if (query.length > 0) { | |
| 21438 for (var part in query.split("&")) { | |
| 21439 var keyvalue = part.split("="); | |
| 21440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21441 } | |
| 21442 } | |
| 21443 | |
| 21444 | |
| 21445 var h = { | |
| 21446 "content-type" : "application/json; charset=utf-8", | |
| 21447 }; | |
| 21448 var resp = convert.JSON.encode(buildSize()); | |
| 21449 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21450 }), true); | |
| 21451 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Size respon
se) { | |
| 21452 checkSize(response); | |
| 21453 }))); | |
| 21454 }); | |
| 21455 | |
| 21456 unittest.test("method--insert", () { | |
| 21457 | |
| 21458 var mock = new HttpServerMock(); | |
| 21459 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21460 var arg_request = buildSize(); | |
| 21461 var arg_profileId = "foo"; | |
| 21462 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21463 var obj = new api.Size.fromJson(json); | |
| 21464 checkSize(obj); | |
| 21465 | |
| 21466 var path = (req.url).path; | |
| 21467 var pathOffset = 0; | |
| 21468 var index; | |
| 21469 var subPart; | |
| 21470 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21471 pathOffset += 1; | |
| 21472 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21473 pathOffset += 18; | |
| 21474 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21475 pathOffset += 13; | |
| 21476 index = path.indexOf("/sizes", pathOffset); | |
| 21477 unittest.expect(index >= 0, unittest.isTrue); | |
| 21478 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21479 pathOffset = index; | |
| 21480 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21481 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21482 pathOffset += 6; | |
| 21483 | |
| 21484 var query = (req.url).query; | |
| 21485 var queryOffset = 0; | |
| 21486 var queryMap = {}; | |
| 21487 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21488 parseBool(n) { | |
| 21489 if (n == "true") return true; | |
| 21490 if (n == "false") return false; | |
| 21491 if (n == null) return null; | |
| 21492 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21493 } | |
| 21494 if (query.length > 0) { | |
| 21495 for (var part in query.split("&")) { | |
| 21496 var keyvalue = part.split("="); | |
| 21497 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21498 } | |
| 21499 } | |
| 21500 | |
| 21501 | |
| 21502 var h = { | |
| 21503 "content-type" : "application/json; charset=utf-8", | |
| 21504 }; | |
| 21505 var resp = convert.JSON.encode(buildSize()); | |
| 21506 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21507 }), true); | |
| 21508 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Siz
e response) { | |
| 21509 checkSize(response); | |
| 21510 }))); | |
| 21511 }); | |
| 21512 | |
| 21513 unittest.test("method--list", () { | |
| 21514 | |
| 21515 var mock = new HttpServerMock(); | |
| 21516 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21517 var arg_profileId = "foo"; | |
| 21518 var arg_height = 42; | |
| 21519 var arg_iabStandard = true; | |
| 21520 var arg_ids = buildUnnamed2147(); | |
| 21521 var arg_width = 42; | |
| 21522 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21523 var path = (req.url).path; | |
| 21524 var pathOffset = 0; | |
| 21525 var index; | |
| 21526 var subPart; | |
| 21527 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21528 pathOffset += 1; | |
| 21529 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21530 pathOffset += 18; | |
| 21531 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21532 pathOffset += 13; | |
| 21533 index = path.indexOf("/sizes", pathOffset); | |
| 21534 unittest.expect(index >= 0, unittest.isTrue); | |
| 21535 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21536 pathOffset = index; | |
| 21537 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21538 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21539 pathOffset += 6; | |
| 21540 | |
| 21541 var query = (req.url).query; | |
| 21542 var queryOffset = 0; | |
| 21543 var queryMap = {}; | |
| 21544 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21545 parseBool(n) { | |
| 21546 if (n == "true") return true; | |
| 21547 if (n == "false") return false; | |
| 21548 if (n == null) return null; | |
| 21549 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21550 } | |
| 21551 if (query.length > 0) { | |
| 21552 for (var part in query.split("&")) { | |
| 21553 var keyvalue = part.split("="); | |
| 21554 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21555 } | |
| 21556 } | |
| 21557 unittest.expect(core.int.parse(queryMap["height"].first), unittest.equal
s(arg_height)); | |
| 21558 unittest.expect(queryMap["iabStandard"].first, unittest.equals("$arg_iab
Standard")); | |
| 21559 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21560 unittest.expect(core.int.parse(queryMap["width"].first), unittest.equals
(arg_width)); | |
| 21561 | |
| 21562 | |
| 21563 var h = { | |
| 21564 "content-type" : "application/json; charset=utf-8", | |
| 21565 }; | |
| 21566 var resp = convert.JSON.encode(buildSizesListResponse()); | |
| 21567 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21568 }), true); | |
| 21569 res.list(arg_profileId, height: arg_height, iabStandard: arg_iabStandard,
ids: arg_ids, width: arg_width).then(unittest.expectAsync(((api.SizesListRespons
e response) { | |
| 21570 checkSizesListResponse(response); | |
| 21571 }))); | |
| 21572 }); | |
| 21573 | |
| 21574 }); | |
| 21575 | |
| 21576 | |
| 21577 unittest.group("resource-SubaccountsResourceApi", () { | |
| 21578 unittest.test("method--get", () { | |
| 21579 | |
| 21580 var mock = new HttpServerMock(); | |
| 21581 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21582 var arg_profileId = "foo"; | |
| 21583 var arg_id = "foo"; | |
| 21584 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21585 var path = (req.url).path; | |
| 21586 var pathOffset = 0; | |
| 21587 var index; | |
| 21588 var subPart; | |
| 21589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21590 pathOffset += 1; | |
| 21591 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21592 pathOffset += 18; | |
| 21593 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21594 pathOffset += 13; | |
| 21595 index = path.indexOf("/subaccounts/", pathOffset); | |
| 21596 unittest.expect(index >= 0, unittest.isTrue); | |
| 21597 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21598 pathOffset = index; | |
| 21599 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21600 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/subaccounts/")); | |
| 21601 pathOffset += 13; | |
| 21602 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21603 pathOffset = path.length; | |
| 21604 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21605 | |
| 21606 var query = (req.url).query; | |
| 21607 var queryOffset = 0; | |
| 21608 var queryMap = {}; | |
| 21609 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21610 parseBool(n) { | |
| 21611 if (n == "true") return true; | |
| 21612 if (n == "false") return false; | |
| 21613 if (n == null) return null; | |
| 21614 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21615 } | |
| 21616 if (query.length > 0) { | |
| 21617 for (var part in query.split("&")) { | |
| 21618 var keyvalue = part.split("="); | |
| 21619 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21620 } | |
| 21621 } | |
| 21622 | |
| 21623 | |
| 21624 var h = { | |
| 21625 "content-type" : "application/json; charset=utf-8", | |
| 21626 }; | |
| 21627 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21628 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21629 }), true); | |
| 21630 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Subaccount
response) { | |
| 21631 checkSubaccount(response); | |
| 21632 }))); | |
| 21633 }); | |
| 21634 | |
| 21635 unittest.test("method--insert", () { | |
| 21636 | |
| 21637 var mock = new HttpServerMock(); | |
| 21638 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21639 var arg_request = buildSubaccount(); | |
| 21640 var arg_profileId = "foo"; | |
| 21641 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21642 var obj = new api.Subaccount.fromJson(json); | |
| 21643 checkSubaccount(obj); | |
| 21644 | |
| 21645 var path = (req.url).path; | |
| 21646 var pathOffset = 0; | |
| 21647 var index; | |
| 21648 var subPart; | |
| 21649 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21650 pathOffset += 1; | |
| 21651 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21652 pathOffset += 18; | |
| 21653 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21654 pathOffset += 13; | |
| 21655 index = path.indexOf("/subaccounts", pathOffset); | |
| 21656 unittest.expect(index >= 0, unittest.isTrue); | |
| 21657 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21658 pathOffset = index; | |
| 21659 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21660 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21661 pathOffset += 12; | |
| 21662 | |
| 21663 var query = (req.url).query; | |
| 21664 var queryOffset = 0; | |
| 21665 var queryMap = {}; | |
| 21666 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21667 parseBool(n) { | |
| 21668 if (n == "true") return true; | |
| 21669 if (n == "false") return false; | |
| 21670 if (n == null) return null; | |
| 21671 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21672 } | |
| 21673 if (query.length > 0) { | |
| 21674 for (var part in query.split("&")) { | |
| 21675 var keyvalue = part.split("="); | |
| 21676 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21677 } | |
| 21678 } | |
| 21679 | |
| 21680 | |
| 21681 var h = { | |
| 21682 "content-type" : "application/json; charset=utf-8", | |
| 21683 }; | |
| 21684 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21685 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21686 }), true); | |
| 21687 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21688 checkSubaccount(response); | |
| 21689 }))); | |
| 21690 }); | |
| 21691 | |
| 21692 unittest.test("method--list", () { | |
| 21693 | |
| 21694 var mock = new HttpServerMock(); | |
| 21695 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21696 var arg_profileId = "foo"; | |
| 21697 var arg_ids = buildUnnamed2148(); | |
| 21698 var arg_maxResults = 42; | |
| 21699 var arg_pageToken = "foo"; | |
| 21700 var arg_searchString = "foo"; | |
| 21701 var arg_sortField = "foo"; | |
| 21702 var arg_sortOrder = "foo"; | |
| 21703 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21704 var path = (req.url).path; | |
| 21705 var pathOffset = 0; | |
| 21706 var index; | |
| 21707 var subPart; | |
| 21708 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21709 pathOffset += 1; | |
| 21710 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21711 pathOffset += 18; | |
| 21712 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21713 pathOffset += 13; | |
| 21714 index = path.indexOf("/subaccounts", pathOffset); | |
| 21715 unittest.expect(index >= 0, unittest.isTrue); | |
| 21716 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21717 pathOffset = index; | |
| 21718 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21719 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21720 pathOffset += 12; | |
| 21721 | |
| 21722 var query = (req.url).query; | |
| 21723 var queryOffset = 0; | |
| 21724 var queryMap = {}; | |
| 21725 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21726 parseBool(n) { | |
| 21727 if (n == "true") return true; | |
| 21728 if (n == "false") return false; | |
| 21729 if (n == null) return null; | |
| 21730 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21731 } | |
| 21732 if (query.length > 0) { | |
| 21733 for (var part in query.split("&")) { | |
| 21734 var keyvalue = part.split("="); | |
| 21735 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21736 } | |
| 21737 } | |
| 21738 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21739 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21740 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21741 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21742 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21743 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21744 | |
| 21745 | |
| 21746 var h = { | |
| 21747 "content-type" : "application/json; charset=utf-8", | |
| 21748 }; | |
| 21749 var resp = convert.JSON.encode(buildSubaccountsListResponse()); | |
| 21750 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21751 }), true); | |
| 21752 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) { | |
| 21753 checkSubaccountsListResponse(response); | |
| 21754 }))); | |
| 21755 }); | |
| 21756 | |
| 21757 unittest.test("method--patch", () { | |
| 21758 | |
| 21759 var mock = new HttpServerMock(); | |
| 21760 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21761 var arg_request = buildSubaccount(); | |
| 21762 var arg_profileId = "foo"; | |
| 21763 var arg_id = "foo"; | |
| 21764 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21765 var obj = new api.Subaccount.fromJson(json); | |
| 21766 checkSubaccount(obj); | |
| 21767 | |
| 21768 var path = (req.url).path; | |
| 21769 var pathOffset = 0; | |
| 21770 var index; | |
| 21771 var subPart; | |
| 21772 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21773 pathOffset += 1; | |
| 21774 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21775 pathOffset += 18; | |
| 21776 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21777 pathOffset += 13; | |
| 21778 index = path.indexOf("/subaccounts", pathOffset); | |
| 21779 unittest.expect(index >= 0, unittest.isTrue); | |
| 21780 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21781 pathOffset = index; | |
| 21782 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21783 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21784 pathOffset += 12; | |
| 21785 | |
| 21786 var query = (req.url).query; | |
| 21787 var queryOffset = 0; | |
| 21788 var queryMap = {}; | |
| 21789 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21790 parseBool(n) { | |
| 21791 if (n == "true") return true; | |
| 21792 if (n == "false") return false; | |
| 21793 if (n == null) return null; | |
| 21794 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21795 } | |
| 21796 if (query.length > 0) { | |
| 21797 for (var part in query.split("&")) { | |
| 21798 var keyvalue = part.split("="); | |
| 21799 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21800 } | |
| 21801 } | |
| 21802 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21803 | |
| 21804 | |
| 21805 var h = { | |
| 21806 "content-type" : "application/json; charset=utf-8", | |
| 21807 }; | |
| 21808 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21809 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21810 }), true); | |
| 21811 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Subaccount response) { | |
| 21812 checkSubaccount(response); | |
| 21813 }))); | |
| 21814 }); | |
| 21815 | |
| 21816 unittest.test("method--update", () { | |
| 21817 | |
| 21818 var mock = new HttpServerMock(); | |
| 21819 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21820 var arg_request = buildSubaccount(); | |
| 21821 var arg_profileId = "foo"; | |
| 21822 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21823 var obj = new api.Subaccount.fromJson(json); | |
| 21824 checkSubaccount(obj); | |
| 21825 | |
| 21826 var path = (req.url).path; | |
| 21827 var pathOffset = 0; | |
| 21828 var index; | |
| 21829 var subPart; | |
| 21830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21831 pathOffset += 1; | |
| 21832 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21833 pathOffset += 18; | |
| 21834 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21835 pathOffset += 13; | |
| 21836 index = path.indexOf("/subaccounts", pathOffset); | |
| 21837 unittest.expect(index >= 0, unittest.isTrue); | |
| 21838 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21839 pathOffset = index; | |
| 21840 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21841 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21842 pathOffset += 12; | |
| 21843 | |
| 21844 var query = (req.url).query; | |
| 21845 var queryOffset = 0; | |
| 21846 var queryMap = {}; | |
| 21847 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21848 parseBool(n) { | |
| 21849 if (n == "true") return true; | |
| 21850 if (n == "false") return false; | |
| 21851 if (n == null) return null; | |
| 21852 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21853 } | |
| 21854 if (query.length > 0) { | |
| 21855 for (var part in query.split("&")) { | |
| 21856 var keyvalue = part.split("="); | |
| 21857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21858 } | |
| 21859 } | |
| 21860 | |
| 21861 | |
| 21862 var h = { | |
| 21863 "content-type" : "application/json; charset=utf-8", | |
| 21864 }; | |
| 21865 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21866 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21867 }), true); | |
| 21868 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21869 checkSubaccount(response); | |
| 21870 }))); | |
| 21871 }); | |
| 21872 | |
| 21873 }); | |
| 21874 | |
| 21875 | |
| 21876 unittest.group("resource-TargetableRemarketingListsResourceApi", () { | |
| 21877 unittest.test("method--get", () { | |
| 21878 | |
| 21879 var mock = new HttpServerMock(); | |
| 21880 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21881 var arg_profileId = "foo"; | |
| 21882 var arg_id = "foo"; | |
| 21883 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21884 var path = (req.url).path; | |
| 21885 var pathOffset = 0; | |
| 21886 var index; | |
| 21887 var subPart; | |
| 21888 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21889 pathOffset += 1; | |
| 21890 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21891 pathOffset += 18; | |
| 21892 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21893 pathOffset += 13; | |
| 21894 index = path.indexOf("/targetableRemarketingLists/", pathOffset); | |
| 21895 unittest.expect(index >= 0, unittest.isTrue); | |
| 21896 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21897 pathOffset = index; | |
| 21898 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21899 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("/targetableRemarketingLists/")); | |
| 21900 pathOffset += 28; | |
| 21901 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21902 pathOffset = path.length; | |
| 21903 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21904 | |
| 21905 var query = (req.url).query; | |
| 21906 var queryOffset = 0; | |
| 21907 var queryMap = {}; | |
| 21908 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21909 parseBool(n) { | |
| 21910 if (n == "true") return true; | |
| 21911 if (n == "false") return false; | |
| 21912 if (n == null) return null; | |
| 21913 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21914 } | |
| 21915 if (query.length > 0) { | |
| 21916 for (var part in query.split("&")) { | |
| 21917 var keyvalue = part.split("="); | |
| 21918 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21919 } | |
| 21920 } | |
| 21921 | |
| 21922 | |
| 21923 var h = { | |
| 21924 "content-type" : "application/json; charset=utf-8", | |
| 21925 }; | |
| 21926 var resp = convert.JSON.encode(buildTargetableRemarketingList()); | |
| 21927 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21928 }), true); | |
| 21929 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.TargetableR
emarketingList response) { | |
| 21930 checkTargetableRemarketingList(response); | |
| 21931 }))); | |
| 21932 }); | |
| 21933 | |
| 21934 unittest.test("method--list", () { | |
| 21935 | |
| 21936 var mock = new HttpServerMock(); | |
| 21937 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21938 var arg_profileId = "foo"; | |
| 21939 var arg_advertiserId = "foo"; | |
| 21940 var arg_active = true; | |
| 21941 var arg_maxResults = 42; | |
| 21942 var arg_name = "foo"; | |
| 21943 var arg_pageToken = "foo"; | |
| 21944 var arg_sortField = "foo"; | |
| 21945 var arg_sortOrder = "foo"; | |
| 21946 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21947 var path = (req.url).path; | |
| 21948 var pathOffset = 0; | |
| 21949 var index; | |
| 21950 var subPart; | |
| 21951 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21952 pathOffset += 1; | |
| 21953 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 21954 pathOffset += 18; | |
| 21955 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21956 pathOffset += 13; | |
| 21957 index = path.indexOf("/targetableRemarketingLists", pathOffset); | |
| 21958 unittest.expect(index >= 0, unittest.isTrue); | |
| 21959 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21960 pathOffset = index; | |
| 21961 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21962 unittest.expect(path.substring(pathOffset, pathOffset + 27), unittest.eq
uals("/targetableRemarketingLists")); | |
| 21963 pathOffset += 27; | |
| 21964 | |
| 21965 var query = (req.url).query; | |
| 21966 var queryOffset = 0; | |
| 21967 var queryMap = {}; | |
| 21968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21969 parseBool(n) { | |
| 21970 if (n == "true") return true; | |
| 21971 if (n == "false") return false; | |
| 21972 if (n == null) return null; | |
| 21973 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21974 } | |
| 21975 if (query.length > 0) { | |
| 21976 for (var part in query.split("&")) { | |
| 21977 var keyvalue = part.split("="); | |
| 21978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21979 } | |
| 21980 } | |
| 21981 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 21982 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 21983 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21984 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 21985 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21986 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21987 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21988 | |
| 21989 | |
| 21990 var h = { | |
| 21991 "content-type" : "application/json; charset=utf-8", | |
| 21992 }; | |
| 21993 var resp = convert.JSON.encode(buildTargetableRemarketingListsListRespon
se()); | |
| 21994 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21995 }), true); | |
| 21996 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) { | |
| 21997 checkTargetableRemarketingListsListResponse(response); | |
| 21998 }))); | |
| 21999 }); | |
| 22000 | |
| 22001 }); | |
| 22002 | |
| 22003 | |
| 22004 unittest.group("resource-UserProfilesResourceApi", () { | |
| 22005 unittest.test("method--get", () { | |
| 22006 | |
| 22007 var mock = new HttpServerMock(); | |
| 22008 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22009 var arg_profileId = "foo"; | |
| 22010 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22011 var path = (req.url).path; | |
| 22012 var pathOffset = 0; | |
| 22013 var index; | |
| 22014 var subPart; | |
| 22015 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22016 pathOffset += 1; | |
| 22017 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22018 pathOffset += 18; | |
| 22019 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22020 pathOffset += 13; | |
| 22021 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22022 pathOffset = path.length; | |
| 22023 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22024 | |
| 22025 var query = (req.url).query; | |
| 22026 var queryOffset = 0; | |
| 22027 var queryMap = {}; | |
| 22028 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22029 parseBool(n) { | |
| 22030 if (n == "true") return true; | |
| 22031 if (n == "false") return false; | |
| 22032 if (n == null) return null; | |
| 22033 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22034 } | |
| 22035 if (query.length > 0) { | |
| 22036 for (var part in query.split("&")) { | |
| 22037 var keyvalue = part.split("="); | |
| 22038 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22039 } | |
| 22040 } | |
| 22041 | |
| 22042 | |
| 22043 var h = { | |
| 22044 "content-type" : "application/json; charset=utf-8", | |
| 22045 }; | |
| 22046 var resp = convert.JSON.encode(buildUserProfile()); | |
| 22047 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22048 }), true); | |
| 22049 res.get(arg_profileId).then(unittest.expectAsync(((api.UserProfile respons
e) { | |
| 22050 checkUserProfile(response); | |
| 22051 }))); | |
| 22052 }); | |
| 22053 | |
| 22054 unittest.test("method--list", () { | |
| 22055 | |
| 22056 var mock = new HttpServerMock(); | |
| 22057 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22058 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22059 var path = (req.url).path; | |
| 22060 var pathOffset = 0; | |
| 22061 var index; | |
| 22062 var subPart; | |
| 22063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22064 pathOffset += 1; | |
| 22065 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22066 pathOffset += 18; | |
| 22067 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("userprofiles")); | |
| 22068 pathOffset += 12; | |
| 22069 | |
| 22070 var query = (req.url).query; | |
| 22071 var queryOffset = 0; | |
| 22072 var queryMap = {}; | |
| 22073 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22074 parseBool(n) { | |
| 22075 if (n == "true") return true; | |
| 22076 if (n == "false") return false; | |
| 22077 if (n == null) return null; | |
| 22078 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22079 } | |
| 22080 if (query.length > 0) { | |
| 22081 for (var part in query.split("&")) { | |
| 22082 var keyvalue = part.split("="); | |
| 22083 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22084 } | |
| 22085 } | |
| 22086 | |
| 22087 | |
| 22088 var h = { | |
| 22089 "content-type" : "application/json; charset=utf-8", | |
| 22090 }; | |
| 22091 var resp = convert.JSON.encode(buildUserProfileList()); | |
| 22092 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22093 }), true); | |
| 22094 res.list().then(unittest.expectAsync(((api.UserProfileList response) { | |
| 22095 checkUserProfileList(response); | |
| 22096 }))); | |
| 22097 }); | |
| 22098 | |
| 22099 }); | |
| 22100 | |
| 22101 | |
| 22102 unittest.group("resource-UserRolePermissionGroupsResourceApi", () { | |
| 22103 unittest.test("method--get", () { | |
| 22104 | |
| 22105 var mock = new HttpServerMock(); | |
| 22106 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22107 var arg_profileId = "foo"; | |
| 22108 var arg_id = "foo"; | |
| 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.3/")); | |
| 22117 pathOffset += 18; | |
| 22118 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22119 pathOffset += 13; | |
| 22120 index = path.indexOf("/userRolePermissionGroups/", pathOffset); | |
| 22121 unittest.expect(index >= 0, unittest.isTrue); | |
| 22122 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22123 pathOffset = index; | |
| 22124 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22125 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/userRolePermissionGroups/")); | |
| 22126 pathOffset += 26; | |
| 22127 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22128 pathOffset = path.length; | |
| 22129 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22130 | |
| 22131 var query = (req.url).query; | |
| 22132 var queryOffset = 0; | |
| 22133 var queryMap = {}; | |
| 22134 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22135 parseBool(n) { | |
| 22136 if (n == "true") return true; | |
| 22137 if (n == "false") return false; | |
| 22138 if (n == null) return null; | |
| 22139 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22140 } | |
| 22141 if (query.length > 0) { | |
| 22142 for (var part in query.split("&")) { | |
| 22143 var keyvalue = part.split("="); | |
| 22144 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22145 } | |
| 22146 } | |
| 22147 | |
| 22148 | |
| 22149 var h = { | |
| 22150 "content-type" : "application/json; charset=utf-8", | |
| 22151 }; | |
| 22152 var resp = convert.JSON.encode(buildUserRolePermissionGroup()); | |
| 22153 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22154 }), true); | |
| 22155 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
missionGroup response) { | |
| 22156 checkUserRolePermissionGroup(response); | |
| 22157 }))); | |
| 22158 }); | |
| 22159 | |
| 22160 unittest.test("method--list", () { | |
| 22161 | |
| 22162 var mock = new HttpServerMock(); | |
| 22163 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22164 var arg_profileId = "foo"; | |
| 22165 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22166 var path = (req.url).path; | |
| 22167 var pathOffset = 0; | |
| 22168 var index; | |
| 22169 var subPart; | |
| 22170 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22171 pathOffset += 1; | |
| 22172 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22173 pathOffset += 18; | |
| 22174 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22175 pathOffset += 13; | |
| 22176 index = path.indexOf("/userRolePermissionGroups", pathOffset); | |
| 22177 unittest.expect(index >= 0, unittest.isTrue); | |
| 22178 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22179 pathOffset = index; | |
| 22180 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22181 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/userRolePermissionGroups")); | |
| 22182 pathOffset += 25; | |
| 22183 | |
| 22184 var query = (req.url).query; | |
| 22185 var queryOffset = 0; | |
| 22186 var queryMap = {}; | |
| 22187 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22188 parseBool(n) { | |
| 22189 if (n == "true") return true; | |
| 22190 if (n == "false") return false; | |
| 22191 if (n == null) return null; | |
| 22192 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22193 } | |
| 22194 if (query.length > 0) { | |
| 22195 for (var part in query.split("&")) { | |
| 22196 var keyvalue = part.split("="); | |
| 22197 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22198 } | |
| 22199 } | |
| 22200 | |
| 22201 | |
| 22202 var h = { | |
| 22203 "content-type" : "application/json; charset=utf-8", | |
| 22204 }; | |
| 22205 var resp = convert.JSON.encode(buildUserRolePermissionGroupsListResponse
()); | |
| 22206 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22207 }), true); | |
| 22208 res.list(arg_profileId).then(unittest.expectAsync(((api.UserRolePermission
GroupsListResponse response) { | |
| 22209 checkUserRolePermissionGroupsListResponse(response); | |
| 22210 }))); | |
| 22211 }); | |
| 22212 | |
| 22213 }); | |
| 22214 | |
| 22215 | |
| 22216 unittest.group("resource-UserRolePermissionsResourceApi", () { | |
| 22217 unittest.test("method--get", () { | |
| 22218 | |
| 22219 var mock = new HttpServerMock(); | |
| 22220 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22221 var arg_profileId = "foo"; | |
| 22222 var arg_id = "foo"; | |
| 22223 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22224 var path = (req.url).path; | |
| 22225 var pathOffset = 0; | |
| 22226 var index; | |
| 22227 var subPart; | |
| 22228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22229 pathOffset += 1; | |
| 22230 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22231 pathOffset += 18; | |
| 22232 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22233 pathOffset += 13; | |
| 22234 index = path.indexOf("/userRolePermissions/", pathOffset); | |
| 22235 unittest.expect(index >= 0, unittest.isTrue); | |
| 22236 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22237 pathOffset = index; | |
| 22238 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22239 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/userRolePermissions/")); | |
| 22240 pathOffset += 21; | |
| 22241 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22242 pathOffset = path.length; | |
| 22243 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22244 | |
| 22245 var query = (req.url).query; | |
| 22246 var queryOffset = 0; | |
| 22247 var queryMap = {}; | |
| 22248 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22249 parseBool(n) { | |
| 22250 if (n == "true") return true; | |
| 22251 if (n == "false") return false; | |
| 22252 if (n == null) return null; | |
| 22253 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22254 } | |
| 22255 if (query.length > 0) { | |
| 22256 for (var part in query.split("&")) { | |
| 22257 var keyvalue = part.split("="); | |
| 22258 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22259 } | |
| 22260 } | |
| 22261 | |
| 22262 | |
| 22263 var h = { | |
| 22264 "content-type" : "application/json; charset=utf-8", | |
| 22265 }; | |
| 22266 var resp = convert.JSON.encode(buildUserRolePermission()); | |
| 22267 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22268 }), true); | |
| 22269 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
mission response) { | |
| 22270 checkUserRolePermission(response); | |
| 22271 }))); | |
| 22272 }); | |
| 22273 | |
| 22274 unittest.test("method--list", () { | |
| 22275 | |
| 22276 var mock = new HttpServerMock(); | |
| 22277 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22278 var arg_profileId = "foo"; | |
| 22279 var arg_ids = buildUnnamed2149(); | |
| 22280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22281 var path = (req.url).path; | |
| 22282 var pathOffset = 0; | |
| 22283 var index; | |
| 22284 var subPart; | |
| 22285 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22286 pathOffset += 1; | |
| 22287 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22288 pathOffset += 18; | |
| 22289 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22290 pathOffset += 13; | |
| 22291 index = path.indexOf("/userRolePermissions", pathOffset); | |
| 22292 unittest.expect(index >= 0, unittest.isTrue); | |
| 22293 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22294 pathOffset = index; | |
| 22295 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22296 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/userRolePermissions")); | |
| 22297 pathOffset += 20; | |
| 22298 | |
| 22299 var query = (req.url).query; | |
| 22300 var queryOffset = 0; | |
| 22301 var queryMap = {}; | |
| 22302 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22303 parseBool(n) { | |
| 22304 if (n == "true") return true; | |
| 22305 if (n == "false") return false; | |
| 22306 if (n == null) return null; | |
| 22307 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22308 } | |
| 22309 if (query.length > 0) { | |
| 22310 for (var part in query.split("&")) { | |
| 22311 var keyvalue = part.split("="); | |
| 22312 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22313 } | |
| 22314 } | |
| 22315 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22316 | |
| 22317 | |
| 22318 var h = { | |
| 22319 "content-type" : "application/json; charset=utf-8", | |
| 22320 }; | |
| 22321 var resp = convert.JSON.encode(buildUserRolePermissionsListResponse()); | |
| 22322 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22323 }), true); | |
| 22324 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.User
RolePermissionsListResponse response) { | |
| 22325 checkUserRolePermissionsListResponse(response); | |
| 22326 }))); | |
| 22327 }); | |
| 22328 | |
| 22329 }); | |
| 22330 | |
| 22331 | |
| 22332 unittest.group("resource-UserRolesResourceApi", () { | |
| 22333 unittest.test("method--delete", () { | |
| 22334 | |
| 22335 var mock = new HttpServerMock(); | |
| 22336 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22337 var arg_profileId = "foo"; | |
| 22338 var arg_id = "foo"; | |
| 22339 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22340 var path = (req.url).path; | |
| 22341 var pathOffset = 0; | |
| 22342 var index; | |
| 22343 var subPart; | |
| 22344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22345 pathOffset += 1; | |
| 22346 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22347 pathOffset += 18; | |
| 22348 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22349 pathOffset += 13; | |
| 22350 index = path.indexOf("/userRoles/", pathOffset); | |
| 22351 unittest.expect(index >= 0, unittest.isTrue); | |
| 22352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22353 pathOffset = index; | |
| 22354 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22355 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22356 pathOffset += 11; | |
| 22357 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22358 pathOffset = path.length; | |
| 22359 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22360 | |
| 22361 var query = (req.url).query; | |
| 22362 var queryOffset = 0; | |
| 22363 var queryMap = {}; | |
| 22364 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22365 parseBool(n) { | |
| 22366 if (n == "true") return true; | |
| 22367 if (n == "false") return false; | |
| 22368 if (n == null) return null; | |
| 22369 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22370 } | |
| 22371 if (query.length > 0) { | |
| 22372 for (var part in query.split("&")) { | |
| 22373 var keyvalue = part.split("="); | |
| 22374 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22375 } | |
| 22376 } | |
| 22377 | |
| 22378 | |
| 22379 var h = { | |
| 22380 "content-type" : "application/json; charset=utf-8", | |
| 22381 }; | |
| 22382 var resp = ""; | |
| 22383 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22384 }), true); | |
| 22385 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 22386 }); | |
| 22387 | |
| 22388 unittest.test("method--get", () { | |
| 22389 | |
| 22390 var mock = new HttpServerMock(); | |
| 22391 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22392 var arg_profileId = "foo"; | |
| 22393 var arg_id = "foo"; | |
| 22394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22395 var path = (req.url).path; | |
| 22396 var pathOffset = 0; | |
| 22397 var index; | |
| 22398 var subPart; | |
| 22399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22400 pathOffset += 1; | |
| 22401 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22402 pathOffset += 18; | |
| 22403 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22404 pathOffset += 13; | |
| 22405 index = path.indexOf("/userRoles/", pathOffset); | |
| 22406 unittest.expect(index >= 0, unittest.isTrue); | |
| 22407 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22408 pathOffset = index; | |
| 22409 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22410 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22411 pathOffset += 11; | |
| 22412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22413 pathOffset = path.length; | |
| 22414 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22415 | |
| 22416 var query = (req.url).query; | |
| 22417 var queryOffset = 0; | |
| 22418 var queryMap = {}; | |
| 22419 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22420 parseBool(n) { | |
| 22421 if (n == "true") return true; | |
| 22422 if (n == "false") return false; | |
| 22423 if (n == null) return null; | |
| 22424 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22425 } | |
| 22426 if (query.length > 0) { | |
| 22427 for (var part in query.split("&")) { | |
| 22428 var keyvalue = part.split("="); | |
| 22429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22430 } | |
| 22431 } | |
| 22432 | |
| 22433 | |
| 22434 var h = { | |
| 22435 "content-type" : "application/json; charset=utf-8", | |
| 22436 }; | |
| 22437 var resp = convert.JSON.encode(buildUserRole()); | |
| 22438 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22439 }), true); | |
| 22440 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRole re
sponse) { | |
| 22441 checkUserRole(response); | |
| 22442 }))); | |
| 22443 }); | |
| 22444 | |
| 22445 unittest.test("method--insert", () { | |
| 22446 | |
| 22447 var mock = new HttpServerMock(); | |
| 22448 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22449 var arg_request = buildUserRole(); | |
| 22450 var arg_profileId = "foo"; | |
| 22451 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22452 var obj = new api.UserRole.fromJson(json); | |
| 22453 checkUserRole(obj); | |
| 22454 | |
| 22455 var path = (req.url).path; | |
| 22456 var pathOffset = 0; | |
| 22457 var index; | |
| 22458 var subPart; | |
| 22459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22460 pathOffset += 1; | |
| 22461 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22462 pathOffset += 18; | |
| 22463 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22464 pathOffset += 13; | |
| 22465 index = path.indexOf("/userRoles", pathOffset); | |
| 22466 unittest.expect(index >= 0, unittest.isTrue); | |
| 22467 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22468 pathOffset = index; | |
| 22469 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22470 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22471 pathOffset += 10; | |
| 22472 | |
| 22473 var query = (req.url).query; | |
| 22474 var queryOffset = 0; | |
| 22475 var queryMap = {}; | |
| 22476 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22477 parseBool(n) { | |
| 22478 if (n == "true") return true; | |
| 22479 if (n == "false") return false; | |
| 22480 if (n == null) return null; | |
| 22481 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22482 } | |
| 22483 if (query.length > 0) { | |
| 22484 for (var part in query.split("&")) { | |
| 22485 var keyvalue = part.split("="); | |
| 22486 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22487 } | |
| 22488 } | |
| 22489 | |
| 22490 | |
| 22491 var h = { | |
| 22492 "content-type" : "application/json; charset=utf-8", | |
| 22493 }; | |
| 22494 var resp = convert.JSON.encode(buildUserRole()); | |
| 22495 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22496 }), true); | |
| 22497 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22498 checkUserRole(response); | |
| 22499 }))); | |
| 22500 }); | |
| 22501 | |
| 22502 unittest.test("method--list", () { | |
| 22503 | |
| 22504 var mock = new HttpServerMock(); | |
| 22505 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22506 var arg_profileId = "foo"; | |
| 22507 var arg_accountUserRoleOnly = true; | |
| 22508 var arg_ids = buildUnnamed2150(); | |
| 22509 var arg_maxResults = 42; | |
| 22510 var arg_pageToken = "foo"; | |
| 22511 var arg_searchString = "foo"; | |
| 22512 var arg_sortField = "foo"; | |
| 22513 var arg_sortOrder = "foo"; | |
| 22514 var arg_subaccountId = "foo"; | |
| 22515 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22516 var path = (req.url).path; | |
| 22517 var pathOffset = 0; | |
| 22518 var index; | |
| 22519 var subPart; | |
| 22520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22521 pathOffset += 1; | |
| 22522 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22523 pathOffset += 18; | |
| 22524 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22525 pathOffset += 13; | |
| 22526 index = path.indexOf("/userRoles", pathOffset); | |
| 22527 unittest.expect(index >= 0, unittest.isTrue); | |
| 22528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22529 pathOffset = index; | |
| 22530 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22531 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22532 pathOffset += 10; | |
| 22533 | |
| 22534 var query = (req.url).query; | |
| 22535 var queryOffset = 0; | |
| 22536 var queryMap = {}; | |
| 22537 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22538 parseBool(n) { | |
| 22539 if (n == "true") return true; | |
| 22540 if (n == "false") return false; | |
| 22541 if (n == null) return null; | |
| 22542 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22543 } | |
| 22544 if (query.length > 0) { | |
| 22545 for (var part in query.split("&")) { | |
| 22546 var keyvalue = part.split("="); | |
| 22547 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22548 } | |
| 22549 } | |
| 22550 unittest.expect(queryMap["accountUserRoleOnly"].first, unittest.equals("
$arg_accountUserRoleOnly")); | |
| 22551 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22552 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22553 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22554 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 22555 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22556 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22557 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 22558 | |
| 22559 | |
| 22560 var h = { | |
| 22561 "content-type" : "application/json; charset=utf-8", | |
| 22562 }; | |
| 22563 var resp = convert.JSON.encode(buildUserRolesListResponse()); | |
| 22564 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22565 }), true); | |
| 22566 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) { | |
| 22567 checkUserRolesListResponse(response); | |
| 22568 }))); | |
| 22569 }); | |
| 22570 | |
| 22571 unittest.test("method--patch", () { | |
| 22572 | |
| 22573 var mock = new HttpServerMock(); | |
| 22574 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22575 var arg_request = buildUserRole(); | |
| 22576 var arg_profileId = "foo"; | |
| 22577 var arg_id = "foo"; | |
| 22578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22579 var obj = new api.UserRole.fromJson(json); | |
| 22580 checkUserRole(obj); | |
| 22581 | |
| 22582 var path = (req.url).path; | |
| 22583 var pathOffset = 0; | |
| 22584 var index; | |
| 22585 var subPart; | |
| 22586 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22587 pathOffset += 1; | |
| 22588 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22589 pathOffset += 18; | |
| 22590 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22591 pathOffset += 13; | |
| 22592 index = path.indexOf("/userRoles", pathOffset); | |
| 22593 unittest.expect(index >= 0, unittest.isTrue); | |
| 22594 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22595 pathOffset = index; | |
| 22596 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22597 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22598 pathOffset += 10; | |
| 22599 | |
| 22600 var query = (req.url).query; | |
| 22601 var queryOffset = 0; | |
| 22602 var queryMap = {}; | |
| 22603 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22604 parseBool(n) { | |
| 22605 if (n == "true") return true; | |
| 22606 if (n == "false") return false; | |
| 22607 if (n == null) return null; | |
| 22608 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22609 } | |
| 22610 if (query.length > 0) { | |
| 22611 for (var part in query.split("&")) { | |
| 22612 var keyvalue = part.split("="); | |
| 22613 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22614 } | |
| 22615 } | |
| 22616 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 22617 | |
| 22618 | |
| 22619 var h = { | |
| 22620 "content-type" : "application/json; charset=utf-8", | |
| 22621 }; | |
| 22622 var resp = convert.JSON.encode(buildUserRole()); | |
| 22623 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22624 }), true); | |
| 22625 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.UserRole response) { | |
| 22626 checkUserRole(response); | |
| 22627 }))); | |
| 22628 }); | |
| 22629 | |
| 22630 unittest.test("method--update", () { | |
| 22631 | |
| 22632 var mock = new HttpServerMock(); | |
| 22633 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22634 var arg_request = buildUserRole(); | |
| 22635 var arg_profileId = "foo"; | |
| 22636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22637 var obj = new api.UserRole.fromJson(json); | |
| 22638 checkUserRole(obj); | |
| 22639 | |
| 22640 var path = (req.url).path; | |
| 22641 var pathOffset = 0; | |
| 22642 var index; | |
| 22643 var subPart; | |
| 22644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22645 pathOffset += 1; | |
| 22646 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.3/")); | |
| 22647 pathOffset += 18; | |
| 22648 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22649 pathOffset += 13; | |
| 22650 index = path.indexOf("/userRoles", pathOffset); | |
| 22651 unittest.expect(index >= 0, unittest.isTrue); | |
| 22652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22653 pathOffset = index; | |
| 22654 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22655 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22656 pathOffset += 10; | |
| 22657 | |
| 22658 var query = (req.url).query; | |
| 22659 var queryOffset = 0; | |
| 22660 var queryMap = {}; | |
| 22661 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22662 parseBool(n) { | |
| 22663 if (n == "true") return true; | |
| 22664 if (n == "false") return false; | |
| 22665 if (n == null) return null; | |
| 22666 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22667 } | |
| 22668 if (query.length > 0) { | |
| 22669 for (var part in query.split("&")) { | |
| 22670 var keyvalue = part.split("="); | |
| 22671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22672 } | |
| 22673 } | |
| 22674 | |
| 22675 | |
| 22676 var h = { | |
| 22677 "content-type" : "application/json; charset=utf-8", | |
| 22678 }; | |
| 22679 var resp = convert.JSON.encode(buildUserRole()); | |
| 22680 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22681 }), true); | |
| 22682 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22683 checkUserRole(response); | |
| 22684 }))); | |
| 22685 }); | |
| 22686 | |
| 22687 }); | |
| 22688 | |
| 22689 | |
| 22690 } | |
| 22691 | |
| OLD | NEW |