| // ignore_for_file: avoid_returning_null |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: cascade_invocations |
| // ignore_for_file: comment_references |
| // ignore_for_file: file_names |
| // ignore_for_file: library_names |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_final_locals |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: prefer_single_quotes |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_parenthesis |
| // ignore_for_file: unnecessary_string_interpolations |
| // ignore_for_file: unused_local_variable |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:googleapis/dfareporting/v3_4.dart' as api; |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import '../test_shared.dart'; |
| |
| core.List<core.String> buildUnnamed5315() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5315(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5316() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5316(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterAccount = 0; |
| api.Account buildAccount() { |
| var o = api.Account(); |
| buildCounterAccount++; |
| if (buildCounterAccount < 3) { |
| o.accountPermissionIds = buildUnnamed5315(); |
| o.accountProfile = 'foo'; |
| o.active = true; |
| o.activeAdsLimitTier = 'foo'; |
| o.activeViewOptOut = true; |
| o.availablePermissionIds = buildUnnamed5316(); |
| o.countryId = 'foo'; |
| o.currencyId = 'foo'; |
| o.defaultCreativeSizeId = 'foo'; |
| o.description = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.locale = 'foo'; |
| o.maximumImageSize = 'foo'; |
| o.name = 'foo'; |
| o.nielsenOcrEnabled = true; |
| o.reportsConfiguration = buildReportsConfiguration(); |
| o.shareReportsWithTwitter = true; |
| o.teaserSizeLimit = 'foo'; |
| } |
| buildCounterAccount--; |
| return o; |
| } |
| |
| void checkAccount(api.Account o) { |
| buildCounterAccount++; |
| if (buildCounterAccount < 3) { |
| checkUnnamed5315(o.accountPermissionIds!); |
| unittest.expect( |
| o.accountProfile!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.activeAdsLimitTier!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.activeViewOptOut!, unittest.isTrue); |
| checkUnnamed5316(o.availablePermissionIds!); |
| unittest.expect( |
| o.countryId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.currencyId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.defaultCreativeSizeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.description!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.locale!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.maximumImageSize!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.nielsenOcrEnabled!, unittest.isTrue); |
| checkReportsConfiguration( |
| o.reportsConfiguration! as api.ReportsConfiguration); |
| unittest.expect(o.shareReportsWithTwitter!, unittest.isTrue); |
| unittest.expect( |
| o.teaserSizeLimit!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccount--; |
| } |
| |
| core.int buildCounterAccountActiveAdSummary = 0; |
| api.AccountActiveAdSummary buildAccountActiveAdSummary() { |
| var o = api.AccountActiveAdSummary(); |
| buildCounterAccountActiveAdSummary++; |
| if (buildCounterAccountActiveAdSummary < 3) { |
| o.accountId = 'foo'; |
| o.activeAds = 'foo'; |
| o.activeAdsLimitTier = 'foo'; |
| o.availableAds = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterAccountActiveAdSummary--; |
| return o; |
| } |
| |
| void checkAccountActiveAdSummary(api.AccountActiveAdSummary o) { |
| buildCounterAccountActiveAdSummary++; |
| if (buildCounterAccountActiveAdSummary < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.activeAds!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.activeAdsLimitTier!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.availableAds!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountActiveAdSummary--; |
| } |
| |
| core.List<core.String> buildUnnamed5317() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5317(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterAccountPermission = 0; |
| api.AccountPermission buildAccountPermission() { |
| var o = api.AccountPermission(); |
| buildCounterAccountPermission++; |
| if (buildCounterAccountPermission < 3) { |
| o.accountProfiles = buildUnnamed5317(); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.level = 'foo'; |
| o.name = 'foo'; |
| o.permissionGroupId = 'foo'; |
| } |
| buildCounterAccountPermission--; |
| return o; |
| } |
| |
| void checkAccountPermission(api.AccountPermission o) { |
| buildCounterAccountPermission++; |
| if (buildCounterAccountPermission < 3) { |
| checkUnnamed5317(o.accountProfiles!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.level!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.permissionGroupId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountPermission--; |
| } |
| |
| core.int buildCounterAccountPermissionGroup = 0; |
| api.AccountPermissionGroup buildAccountPermissionGroup() { |
| var o = api.AccountPermissionGroup(); |
| buildCounterAccountPermissionGroup++; |
| if (buildCounterAccountPermissionGroup < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterAccountPermissionGroup--; |
| return o; |
| } |
| |
| void checkAccountPermissionGroup(api.AccountPermissionGroup o) { |
| buildCounterAccountPermissionGroup++; |
| if (buildCounterAccountPermissionGroup < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountPermissionGroup--; |
| } |
| |
| core.List<api.AccountPermissionGroup> buildUnnamed5318() { |
| var o = <api.AccountPermissionGroup>[]; |
| o.add(buildAccountPermissionGroup()); |
| o.add(buildAccountPermissionGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5318(core.List<api.AccountPermissionGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAccountPermissionGroup(o[0] as api.AccountPermissionGroup); |
| checkAccountPermissionGroup(o[1] as api.AccountPermissionGroup); |
| } |
| |
| core.int buildCounterAccountPermissionGroupsListResponse = 0; |
| api.AccountPermissionGroupsListResponse |
| buildAccountPermissionGroupsListResponse() { |
| var o = api.AccountPermissionGroupsListResponse(); |
| buildCounterAccountPermissionGroupsListResponse++; |
| if (buildCounterAccountPermissionGroupsListResponse < 3) { |
| o.accountPermissionGroups = buildUnnamed5318(); |
| o.kind = 'foo'; |
| } |
| buildCounterAccountPermissionGroupsListResponse--; |
| return o; |
| } |
| |
| void checkAccountPermissionGroupsListResponse( |
| api.AccountPermissionGroupsListResponse o) { |
| buildCounterAccountPermissionGroupsListResponse++; |
| if (buildCounterAccountPermissionGroupsListResponse < 3) { |
| checkUnnamed5318(o.accountPermissionGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountPermissionGroupsListResponse--; |
| } |
| |
| core.List<api.AccountPermission> buildUnnamed5319() { |
| var o = <api.AccountPermission>[]; |
| o.add(buildAccountPermission()); |
| o.add(buildAccountPermission()); |
| return o; |
| } |
| |
| void checkUnnamed5319(core.List<api.AccountPermission> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAccountPermission(o[0] as api.AccountPermission); |
| checkAccountPermission(o[1] as api.AccountPermission); |
| } |
| |
| core.int buildCounterAccountPermissionsListResponse = 0; |
| api.AccountPermissionsListResponse buildAccountPermissionsListResponse() { |
| var o = api.AccountPermissionsListResponse(); |
| buildCounterAccountPermissionsListResponse++; |
| if (buildCounterAccountPermissionsListResponse < 3) { |
| o.accountPermissions = buildUnnamed5319(); |
| o.kind = 'foo'; |
| } |
| buildCounterAccountPermissionsListResponse--; |
| return o; |
| } |
| |
| void checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { |
| buildCounterAccountPermissionsListResponse++; |
| if (buildCounterAccountPermissionsListResponse < 3) { |
| checkUnnamed5319(o.accountPermissions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountPermissionsListResponse--; |
| } |
| |
| core.int buildCounterAccountUserProfile = 0; |
| api.AccountUserProfile buildAccountUserProfile() { |
| var o = api.AccountUserProfile(); |
| buildCounterAccountUserProfile++; |
| if (buildCounterAccountUserProfile < 3) { |
| o.accountId = 'foo'; |
| o.active = true; |
| o.advertiserFilter = buildObjectFilter(); |
| o.campaignFilter = buildObjectFilter(); |
| o.comments = 'foo'; |
| o.email = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.locale = 'foo'; |
| o.name = 'foo'; |
| o.siteFilter = buildObjectFilter(); |
| o.subaccountId = 'foo'; |
| o.traffickerType = 'foo'; |
| o.userAccessType = 'foo'; |
| o.userRoleFilter = buildObjectFilter(); |
| o.userRoleId = 'foo'; |
| } |
| buildCounterAccountUserProfile--; |
| return o; |
| } |
| |
| void checkAccountUserProfile(api.AccountUserProfile o) { |
| buildCounterAccountUserProfile++; |
| if (buildCounterAccountUserProfile < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| checkObjectFilter(o.advertiserFilter! as api.ObjectFilter); |
| checkObjectFilter(o.campaignFilter! as api.ObjectFilter); |
| unittest.expect( |
| o.comments!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.email!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.locale!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkObjectFilter(o.siteFilter! as api.ObjectFilter); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.traffickerType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.userAccessType!, |
| unittest.equals('foo'), |
| ); |
| checkObjectFilter(o.userRoleFilter! as api.ObjectFilter); |
| unittest.expect( |
| o.userRoleId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountUserProfile--; |
| } |
| |
| core.List<api.AccountUserProfile> buildUnnamed5320() { |
| var o = <api.AccountUserProfile>[]; |
| o.add(buildAccountUserProfile()); |
| o.add(buildAccountUserProfile()); |
| return o; |
| } |
| |
| void checkUnnamed5320(core.List<api.AccountUserProfile> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAccountUserProfile(o[0] as api.AccountUserProfile); |
| checkAccountUserProfile(o[1] as api.AccountUserProfile); |
| } |
| |
| core.int buildCounterAccountUserProfilesListResponse = 0; |
| api.AccountUserProfilesListResponse buildAccountUserProfilesListResponse() { |
| var o = api.AccountUserProfilesListResponse(); |
| buildCounterAccountUserProfilesListResponse++; |
| if (buildCounterAccountUserProfilesListResponse < 3) { |
| o.accountUserProfiles = buildUnnamed5320(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAccountUserProfilesListResponse--; |
| return o; |
| } |
| |
| void checkAccountUserProfilesListResponse( |
| api.AccountUserProfilesListResponse o) { |
| buildCounterAccountUserProfilesListResponse++; |
| if (buildCounterAccountUserProfilesListResponse < 3) { |
| checkUnnamed5320(o.accountUserProfiles!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountUserProfilesListResponse--; |
| } |
| |
| core.List<api.Account> buildUnnamed5321() { |
| var o = <api.Account>[]; |
| o.add(buildAccount()); |
| o.add(buildAccount()); |
| return o; |
| } |
| |
| void checkUnnamed5321(core.List<api.Account> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAccount(o[0] as api.Account); |
| checkAccount(o[1] as api.Account); |
| } |
| |
| core.int buildCounterAccountsListResponse = 0; |
| api.AccountsListResponse buildAccountsListResponse() { |
| var o = api.AccountsListResponse(); |
| buildCounterAccountsListResponse++; |
| if (buildCounterAccountsListResponse < 3) { |
| o.accounts = buildUnnamed5321(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAccountsListResponse--; |
| return o; |
| } |
| |
| void checkAccountsListResponse(api.AccountsListResponse o) { |
| buildCounterAccountsListResponse++; |
| if (buildCounterAccountsListResponse < 3) { |
| checkUnnamed5321(o.accounts!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountsListResponse--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5322() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5322(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<core.String> buildUnnamed5323() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5323(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterActivities = 0; |
| api.Activities buildActivities() { |
| var o = api.Activities(); |
| buildCounterActivities++; |
| if (buildCounterActivities < 3) { |
| o.filters = buildUnnamed5322(); |
| o.kind = 'foo'; |
| o.metricNames = buildUnnamed5323(); |
| } |
| buildCounterActivities--; |
| return o; |
| } |
| |
| void checkActivities(api.Activities o) { |
| buildCounterActivities++; |
| if (buildCounterActivities < 3) { |
| checkUnnamed5322(o.filters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5323(o.metricNames!); |
| } |
| buildCounterActivities--; |
| } |
| |
| core.List<api.CreativeGroupAssignment> buildUnnamed5324() { |
| var o = <api.CreativeGroupAssignment>[]; |
| o.add(buildCreativeGroupAssignment()); |
| o.add(buildCreativeGroupAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed5324(core.List<api.CreativeGroupAssignment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeGroupAssignment(o[0] as api.CreativeGroupAssignment); |
| checkCreativeGroupAssignment(o[1] as api.CreativeGroupAssignment); |
| } |
| |
| core.List<api.EventTagOverride> buildUnnamed5325() { |
| var o = <api.EventTagOverride>[]; |
| o.add(buildEventTagOverride()); |
| o.add(buildEventTagOverride()); |
| return o; |
| } |
| |
| void checkUnnamed5325(core.List<api.EventTagOverride> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEventTagOverride(o[0] as api.EventTagOverride); |
| checkEventTagOverride(o[1] as api.EventTagOverride); |
| } |
| |
| core.List<api.PlacementAssignment> buildUnnamed5326() { |
| var o = <api.PlacementAssignment>[]; |
| o.add(buildPlacementAssignment()); |
| o.add(buildPlacementAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed5326(core.List<api.PlacementAssignment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlacementAssignment(o[0] as api.PlacementAssignment); |
| checkPlacementAssignment(o[1] as api.PlacementAssignment); |
| } |
| |
| core.int buildCounterAd = 0; |
| api.Ad buildAd() { |
| var o = api.Ad(); |
| buildCounterAd++; |
| if (buildCounterAd < 3) { |
| o.accountId = 'foo'; |
| o.active = true; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.archived = true; |
| o.audienceSegmentId = 'foo'; |
| o.campaignId = 'foo'; |
| o.campaignIdDimensionValue = buildDimensionValue(); |
| o.clickThroughUrl = buildClickThroughUrl(); |
| o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); |
| o.comments = 'foo'; |
| o.compatibility = 'foo'; |
| o.createInfo = buildLastModifiedInfo(); |
| o.creativeGroupAssignments = buildUnnamed5324(); |
| o.creativeRotation = buildCreativeRotation(); |
| o.dayPartTargeting = buildDayPartTargeting(); |
| o.defaultClickThroughEventTagProperties = |
| buildDefaultClickThroughEventTagProperties(); |
| o.deliverySchedule = buildDeliverySchedule(); |
| o.dynamicClickTracker = true; |
| o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.eventTagOverrides = buildUnnamed5325(); |
| o.geoTargeting = buildGeoTargeting(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.keyValueTargetingExpression = buildKeyValueTargetingExpression(); |
| o.kind = 'foo'; |
| o.languageTargeting = buildLanguageTargeting(); |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.placementAssignments = buildUnnamed5326(); |
| o.remarketingListExpression = buildListTargetingExpression(); |
| o.size = buildSize(); |
| o.sslCompliant = true; |
| o.sslRequired = true; |
| o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.subaccountId = 'foo'; |
| o.targetingTemplateId = 'foo'; |
| o.technologyTargeting = buildTechnologyTargeting(); |
| o.type = 'foo'; |
| } |
| buildCounterAd--; |
| return o; |
| } |
| |
| void checkAd(api.Ad o) { |
| buildCounterAd++; |
| if (buildCounterAd < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.archived!, unittest.isTrue); |
| unittest.expect( |
| o.audienceSegmentId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.campaignId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.campaignIdDimensionValue! as api.DimensionValue); |
| checkClickThroughUrl(o.clickThroughUrl! as api.ClickThroughUrl); |
| checkClickThroughUrlSuffixProperties(o.clickThroughUrlSuffixProperties! |
| as api.ClickThroughUrlSuffixProperties); |
| unittest.expect( |
| o.comments!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.compatibility!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.createInfo! as api.LastModifiedInfo); |
| checkUnnamed5324(o.creativeGroupAssignments!); |
| checkCreativeRotation(o.creativeRotation! as api.CreativeRotation); |
| checkDayPartTargeting(o.dayPartTargeting! as api.DayPartTargeting); |
| checkDefaultClickThroughEventTagProperties( |
| o.defaultClickThroughEventTagProperties! |
| as api.DefaultClickThroughEventTagProperties); |
| checkDeliverySchedule(o.deliverySchedule! as api.DeliverySchedule); |
| unittest.expect(o.dynamicClickTracker!, unittest.isTrue); |
| unittest.expect( |
| o.endTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| checkUnnamed5325(o.eventTagOverrides!); |
| checkGeoTargeting(o.geoTargeting! as api.GeoTargeting); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| checkKeyValueTargetingExpression( |
| o.keyValueTargetingExpression! as api.KeyValueTargetingExpression); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLanguageTargeting(o.languageTargeting! as api.LanguageTargeting); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5326(o.placementAssignments!); |
| checkListTargetingExpression( |
| o.remarketingListExpression! as api.ListTargetingExpression); |
| checkSize(o.size! as api.Size); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect(o.sslRequired!, unittest.isTrue); |
| unittest.expect( |
| o.startTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetingTemplateId!, |
| unittest.equals('foo'), |
| ); |
| checkTechnologyTargeting(o.technologyTargeting! as api.TechnologyTargeting); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAd--; |
| } |
| |
| core.int buildCounterAdBlockingConfiguration = 0; |
| api.AdBlockingConfiguration buildAdBlockingConfiguration() { |
| var o = api.AdBlockingConfiguration(); |
| buildCounterAdBlockingConfiguration++; |
| if (buildCounterAdBlockingConfiguration < 3) { |
| o.clickThroughUrl = 'foo'; |
| o.creativeBundleId = 'foo'; |
| o.enabled = true; |
| o.overrideClickThroughUrl = true; |
| } |
| buildCounterAdBlockingConfiguration--; |
| return o; |
| } |
| |
| void checkAdBlockingConfiguration(api.AdBlockingConfiguration o) { |
| buildCounterAdBlockingConfiguration++; |
| if (buildCounterAdBlockingConfiguration < 3) { |
| unittest.expect( |
| o.clickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.creativeBundleId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect(o.overrideClickThroughUrl!, unittest.isTrue); |
| } |
| buildCounterAdBlockingConfiguration--; |
| } |
| |
| core.int buildCounterAdSlot = 0; |
| api.AdSlot buildAdSlot() { |
| var o = api.AdSlot(); |
| buildCounterAdSlot++; |
| if (buildCounterAdSlot < 3) { |
| o.comment = 'foo'; |
| o.compatibility = 'foo'; |
| o.height = 'foo'; |
| o.linkedPlacementId = 'foo'; |
| o.name = 'foo'; |
| o.paymentSourceType = 'foo'; |
| o.primary = true; |
| o.width = 'foo'; |
| } |
| buildCounterAdSlot--; |
| return o; |
| } |
| |
| void checkAdSlot(api.AdSlot o) { |
| buildCounterAdSlot++; |
| if (buildCounterAdSlot < 3) { |
| unittest.expect( |
| o.comment!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.compatibility!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.height!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.linkedPlacementId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.paymentSourceType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.primary!, unittest.isTrue); |
| unittest.expect( |
| o.width!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdSlot--; |
| } |
| |
| core.List<api.Ad> buildUnnamed5327() { |
| var o = <api.Ad>[]; |
| o.add(buildAd()); |
| o.add(buildAd()); |
| return o; |
| } |
| |
| void checkUnnamed5327(core.List<api.Ad> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAd(o[0] as api.Ad); |
| checkAd(o[1] as api.Ad); |
| } |
| |
| core.int buildCounterAdsListResponse = 0; |
| api.AdsListResponse buildAdsListResponse() { |
| var o = api.AdsListResponse(); |
| buildCounterAdsListResponse++; |
| if (buildCounterAdsListResponse < 3) { |
| o.ads = buildUnnamed5327(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdsListResponse--; |
| return o; |
| } |
| |
| void checkAdsListResponse(api.AdsListResponse o) { |
| buildCounterAdsListResponse++; |
| if (buildCounterAdsListResponse < 3) { |
| checkUnnamed5327(o.ads!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdsListResponse--; |
| } |
| |
| core.int buildCounterAdvertiser = 0; |
| api.Advertiser buildAdvertiser() { |
| var o = api.Advertiser(); |
| buildCounterAdvertiser++; |
| if (buildCounterAdvertiser < 3) { |
| o.accountId = 'foo'; |
| o.advertiserGroupId = 'foo'; |
| o.clickThroughUrlSuffix = 'foo'; |
| o.defaultClickThroughEventTagId = 'foo'; |
| o.defaultEmail = 'foo'; |
| o.floodlightConfigurationId = 'foo'; |
| o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.originalFloodlightConfigurationId = 'foo'; |
| o.status = 'foo'; |
| o.subaccountId = 'foo'; |
| o.suspended = true; |
| } |
| buildCounterAdvertiser--; |
| return o; |
| } |
| |
| void checkAdvertiser(api.Advertiser o) { |
| buildCounterAdvertiser++; |
| if (buildCounterAdvertiser < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserGroupId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.clickThroughUrlSuffix!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.defaultClickThroughEventTagId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.defaultEmail!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.floodlightConfigurationIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.originalFloodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.suspended!, unittest.isTrue); |
| } |
| buildCounterAdvertiser--; |
| } |
| |
| core.int buildCounterAdvertiserGroup = 0; |
| api.AdvertiserGroup buildAdvertiserGroup() { |
| var o = api.AdvertiserGroup(); |
| buildCounterAdvertiserGroup++; |
| if (buildCounterAdvertiserGroup < 3) { |
| o.accountId = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterAdvertiserGroup--; |
| return o; |
| } |
| |
| void checkAdvertiserGroup(api.AdvertiserGroup o) { |
| buildCounterAdvertiserGroup++; |
| if (buildCounterAdvertiserGroup < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertiserGroup--; |
| } |
| |
| core.List<api.AdvertiserGroup> buildUnnamed5328() { |
| var o = <api.AdvertiserGroup>[]; |
| o.add(buildAdvertiserGroup()); |
| o.add(buildAdvertiserGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5328(core.List<api.AdvertiserGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdvertiserGroup(o[0] as api.AdvertiserGroup); |
| checkAdvertiserGroup(o[1] as api.AdvertiserGroup); |
| } |
| |
| core.int buildCounterAdvertiserGroupsListResponse = 0; |
| api.AdvertiserGroupsListResponse buildAdvertiserGroupsListResponse() { |
| var o = api.AdvertiserGroupsListResponse(); |
| buildCounterAdvertiserGroupsListResponse++; |
| if (buildCounterAdvertiserGroupsListResponse < 3) { |
| o.advertiserGroups = buildUnnamed5328(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertiserGroupsListResponse--; |
| return o; |
| } |
| |
| void checkAdvertiserGroupsListResponse(api.AdvertiserGroupsListResponse o) { |
| buildCounterAdvertiserGroupsListResponse++; |
| if (buildCounterAdvertiserGroupsListResponse < 3) { |
| checkUnnamed5328(o.advertiserGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertiserGroupsListResponse--; |
| } |
| |
| core.List<api.LandingPage> buildUnnamed5329() { |
| var o = <api.LandingPage>[]; |
| o.add(buildLandingPage()); |
| o.add(buildLandingPage()); |
| return o; |
| } |
| |
| void checkUnnamed5329(core.List<api.LandingPage> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLandingPage(o[0] as api.LandingPage); |
| checkLandingPage(o[1] as api.LandingPage); |
| } |
| |
| core.int buildCounterAdvertiserLandingPagesListResponse = 0; |
| api.AdvertiserLandingPagesListResponse |
| buildAdvertiserLandingPagesListResponse() { |
| var o = api.AdvertiserLandingPagesListResponse(); |
| buildCounterAdvertiserLandingPagesListResponse++; |
| if (buildCounterAdvertiserLandingPagesListResponse < 3) { |
| o.kind = 'foo'; |
| o.landingPages = buildUnnamed5329(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertiserLandingPagesListResponse--; |
| return o; |
| } |
| |
| void checkAdvertiserLandingPagesListResponse( |
| api.AdvertiserLandingPagesListResponse o) { |
| buildCounterAdvertiserLandingPagesListResponse++; |
| if (buildCounterAdvertiserLandingPagesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5329(o.landingPages!); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertiserLandingPagesListResponse--; |
| } |
| |
| core.List<api.Advertiser> buildUnnamed5330() { |
| var o = <api.Advertiser>[]; |
| o.add(buildAdvertiser()); |
| o.add(buildAdvertiser()); |
| return o; |
| } |
| |
| void checkUnnamed5330(core.List<api.Advertiser> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdvertiser(o[0] as api.Advertiser); |
| checkAdvertiser(o[1] as api.Advertiser); |
| } |
| |
| core.int buildCounterAdvertisersListResponse = 0; |
| api.AdvertisersListResponse buildAdvertisersListResponse() { |
| var o = api.AdvertisersListResponse(); |
| buildCounterAdvertisersListResponse++; |
| if (buildCounterAdvertisersListResponse < 3) { |
| o.advertisers = buildUnnamed5330(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertisersListResponse--; |
| return o; |
| } |
| |
| void checkAdvertisersListResponse(api.AdvertisersListResponse o) { |
| buildCounterAdvertisersListResponse++; |
| if (buildCounterAdvertisersListResponse < 3) { |
| checkUnnamed5330(o.advertisers!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertisersListResponse--; |
| } |
| |
| core.int buildCounterAudienceSegment = 0; |
| api.AudienceSegment buildAudienceSegment() { |
| var o = api.AudienceSegment(); |
| buildCounterAudienceSegment++; |
| if (buildCounterAudienceSegment < 3) { |
| o.allocation = 42; |
| o.id = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterAudienceSegment--; |
| return o; |
| } |
| |
| void checkAudienceSegment(api.AudienceSegment o) { |
| buildCounterAudienceSegment++; |
| if (buildCounterAudienceSegment < 3) { |
| unittest.expect( |
| o.allocation!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAudienceSegment--; |
| } |
| |
| core.List<api.AudienceSegment> buildUnnamed5331() { |
| var o = <api.AudienceSegment>[]; |
| o.add(buildAudienceSegment()); |
| o.add(buildAudienceSegment()); |
| return o; |
| } |
| |
| void checkUnnamed5331(core.List<api.AudienceSegment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAudienceSegment(o[0] as api.AudienceSegment); |
| checkAudienceSegment(o[1] as api.AudienceSegment); |
| } |
| |
| core.int buildCounterAudienceSegmentGroup = 0; |
| api.AudienceSegmentGroup buildAudienceSegmentGroup() { |
| var o = api.AudienceSegmentGroup(); |
| buildCounterAudienceSegmentGroup++; |
| if (buildCounterAudienceSegmentGroup < 3) { |
| o.audienceSegments = buildUnnamed5331(); |
| o.id = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterAudienceSegmentGroup--; |
| return o; |
| } |
| |
| void checkAudienceSegmentGroup(api.AudienceSegmentGroup o) { |
| buildCounterAudienceSegmentGroup++; |
| if (buildCounterAudienceSegmentGroup < 3) { |
| checkUnnamed5331(o.audienceSegments!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAudienceSegmentGroup--; |
| } |
| |
| core.int buildCounterBrowser = 0; |
| api.Browser buildBrowser() { |
| var o = api.Browser(); |
| buildCounterBrowser++; |
| if (buildCounterBrowser < 3) { |
| o.browserVersionId = 'foo'; |
| o.dartId = 'foo'; |
| o.kind = 'foo'; |
| o.majorVersion = 'foo'; |
| o.minorVersion = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterBrowser--; |
| return o; |
| } |
| |
| void checkBrowser(api.Browser o) { |
| buildCounterBrowser++; |
| if (buildCounterBrowser < 3) { |
| unittest.expect( |
| o.browserVersionId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.majorVersion!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.minorVersion!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterBrowser--; |
| } |
| |
| core.List<api.Browser> buildUnnamed5332() { |
| var o = <api.Browser>[]; |
| o.add(buildBrowser()); |
| o.add(buildBrowser()); |
| return o; |
| } |
| |
| void checkUnnamed5332(core.List<api.Browser> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkBrowser(o[0] as api.Browser); |
| checkBrowser(o[1] as api.Browser); |
| } |
| |
| core.int buildCounterBrowsersListResponse = 0; |
| api.BrowsersListResponse buildBrowsersListResponse() { |
| var o = api.BrowsersListResponse(); |
| buildCounterBrowsersListResponse++; |
| if (buildCounterBrowsersListResponse < 3) { |
| o.browsers = buildUnnamed5332(); |
| o.kind = 'foo'; |
| } |
| buildCounterBrowsersListResponse--; |
| return o; |
| } |
| |
| void checkBrowsersListResponse(api.BrowsersListResponse o) { |
| buildCounterBrowsersListResponse++; |
| if (buildCounterBrowsersListResponse < 3) { |
| checkUnnamed5332(o.browsers!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterBrowsersListResponse--; |
| } |
| |
| core.List<api.CreativeOptimizationConfiguration> buildUnnamed5333() { |
| var o = <api.CreativeOptimizationConfiguration>[]; |
| o.add(buildCreativeOptimizationConfiguration()); |
| o.add(buildCreativeOptimizationConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed5333(core.List<api.CreativeOptimizationConfiguration> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeOptimizationConfiguration( |
| o[0] as api.CreativeOptimizationConfiguration); |
| checkCreativeOptimizationConfiguration( |
| o[1] as api.CreativeOptimizationConfiguration); |
| } |
| |
| core.List<api.AudienceSegmentGroup> buildUnnamed5334() { |
| var o = <api.AudienceSegmentGroup>[]; |
| o.add(buildAudienceSegmentGroup()); |
| o.add(buildAudienceSegmentGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5334(core.List<api.AudienceSegmentGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAudienceSegmentGroup(o[0] as api.AudienceSegmentGroup); |
| checkAudienceSegmentGroup(o[1] as api.AudienceSegmentGroup); |
| } |
| |
| core.List<core.String> buildUnnamed5335() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5335(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.EventTagOverride> buildUnnamed5336() { |
| var o = <api.EventTagOverride>[]; |
| o.add(buildEventTagOverride()); |
| o.add(buildEventTagOverride()); |
| return o; |
| } |
| |
| void checkUnnamed5336(core.List<api.EventTagOverride> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEventTagOverride(o[0] as api.EventTagOverride); |
| checkEventTagOverride(o[1] as api.EventTagOverride); |
| } |
| |
| core.List<core.String> buildUnnamed5337() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5337(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterCampaign = 0; |
| api.Campaign buildCampaign() { |
| var o = api.Campaign(); |
| buildCounterCampaign++; |
| if (buildCounterCampaign < 3) { |
| o.accountId = 'foo'; |
| o.adBlockingConfiguration = buildAdBlockingConfiguration(); |
| o.additionalCreativeOptimizationConfigurations = buildUnnamed5333(); |
| o.advertiserGroupId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.archived = true; |
| o.audienceSegmentGroups = buildUnnamed5334(); |
| o.billingInvoiceCode = 'foo'; |
| o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); |
| o.comment = 'foo'; |
| o.createInfo = buildLastModifiedInfo(); |
| o.creativeGroupIds = buildUnnamed5335(); |
| o.creativeOptimizationConfiguration = |
| buildCreativeOptimizationConfiguration(); |
| o.defaultClickThroughEventTagProperties = |
| buildDefaultClickThroughEventTagProperties(); |
| o.defaultLandingPageId = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.eventTagOverrides = buildUnnamed5336(); |
| o.externalId = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.nielsenOcrEnabled = true; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.subaccountId = 'foo'; |
| o.traffickerEmails = buildUnnamed5337(); |
| } |
| buildCounterCampaign--; |
| return o; |
| } |
| |
| void checkCampaign(api.Campaign o) { |
| buildCounterCampaign++; |
| if (buildCounterCampaign < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| checkAdBlockingConfiguration( |
| o.adBlockingConfiguration! as api.AdBlockingConfiguration); |
| checkUnnamed5333(o.additionalCreativeOptimizationConfigurations!); |
| unittest.expect( |
| o.advertiserGroupId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.archived!, unittest.isTrue); |
| checkUnnamed5334(o.audienceSegmentGroups!); |
| unittest.expect( |
| o.billingInvoiceCode!, |
| unittest.equals('foo'), |
| ); |
| checkClickThroughUrlSuffixProperties(o.clickThroughUrlSuffixProperties! |
| as api.ClickThroughUrlSuffixProperties); |
| unittest.expect( |
| o.comment!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.createInfo! as api.LastModifiedInfo); |
| checkUnnamed5335(o.creativeGroupIds!); |
| checkCreativeOptimizationConfiguration(o.creativeOptimizationConfiguration! |
| as api.CreativeOptimizationConfiguration); |
| checkDefaultClickThroughEventTagProperties( |
| o.defaultClickThroughEventTagProperties! |
| as api.DefaultClickThroughEventTagProperties); |
| unittest.expect( |
| o.defaultLandingPageId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| checkUnnamed5336(o.eventTagOverrides!); |
| unittest.expect( |
| o.externalId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.nielsenOcrEnabled!, unittest.isTrue); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5337(o.traffickerEmails!); |
| } |
| buildCounterCampaign--; |
| } |
| |
| core.int buildCounterCampaignCreativeAssociation = 0; |
| api.CampaignCreativeAssociation buildCampaignCreativeAssociation() { |
| var o = api.CampaignCreativeAssociation(); |
| buildCounterCampaignCreativeAssociation++; |
| if (buildCounterCampaignCreativeAssociation < 3) { |
| o.creativeId = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterCampaignCreativeAssociation--; |
| return o; |
| } |
| |
| void checkCampaignCreativeAssociation(api.CampaignCreativeAssociation o) { |
| buildCounterCampaignCreativeAssociation++; |
| if (buildCounterCampaignCreativeAssociation < 3) { |
| unittest.expect( |
| o.creativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCampaignCreativeAssociation--; |
| } |
| |
| core.List<api.CampaignCreativeAssociation> buildUnnamed5338() { |
| var o = <api.CampaignCreativeAssociation>[]; |
| o.add(buildCampaignCreativeAssociation()); |
| o.add(buildCampaignCreativeAssociation()); |
| return o; |
| } |
| |
| void checkUnnamed5338(core.List<api.CampaignCreativeAssociation> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCampaignCreativeAssociation(o[0] as api.CampaignCreativeAssociation); |
| checkCampaignCreativeAssociation(o[1] as api.CampaignCreativeAssociation); |
| } |
| |
| core.int buildCounterCampaignCreativeAssociationsListResponse = 0; |
| api.CampaignCreativeAssociationsListResponse |
| buildCampaignCreativeAssociationsListResponse() { |
| var o = api.CampaignCreativeAssociationsListResponse(); |
| buildCounterCampaignCreativeAssociationsListResponse++; |
| if (buildCounterCampaignCreativeAssociationsListResponse < 3) { |
| o.campaignCreativeAssociations = buildUnnamed5338(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCampaignCreativeAssociationsListResponse--; |
| return o; |
| } |
| |
| void checkCampaignCreativeAssociationsListResponse( |
| api.CampaignCreativeAssociationsListResponse o) { |
| buildCounterCampaignCreativeAssociationsListResponse++; |
| if (buildCounterCampaignCreativeAssociationsListResponse < 3) { |
| checkUnnamed5338(o.campaignCreativeAssociations!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCampaignCreativeAssociationsListResponse--; |
| } |
| |
| core.int buildCounterCampaignManagerIds = 0; |
| api.CampaignManagerIds buildCampaignManagerIds() { |
| var o = api.CampaignManagerIds(); |
| buildCounterCampaignManagerIds++; |
| if (buildCounterCampaignManagerIds < 3) { |
| o.adId = 'foo'; |
| o.campaignId = 'foo'; |
| o.creativeId = 'foo'; |
| o.kind = 'foo'; |
| o.placementId = 'foo'; |
| o.siteId = 'foo'; |
| } |
| buildCounterCampaignManagerIds--; |
| return o; |
| } |
| |
| void checkCampaignManagerIds(api.CampaignManagerIds o) { |
| buildCounterCampaignManagerIds++; |
| if (buildCounterCampaignManagerIds < 3) { |
| unittest.expect( |
| o.adId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.campaignId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.creativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.placementId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.siteId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCampaignManagerIds--; |
| } |
| |
| core.List<api.Campaign> buildUnnamed5339() { |
| var o = <api.Campaign>[]; |
| o.add(buildCampaign()); |
| o.add(buildCampaign()); |
| return o; |
| } |
| |
| void checkUnnamed5339(core.List<api.Campaign> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCampaign(o[0] as api.Campaign); |
| checkCampaign(o[1] as api.Campaign); |
| } |
| |
| core.int buildCounterCampaignsListResponse = 0; |
| api.CampaignsListResponse buildCampaignsListResponse() { |
| var o = api.CampaignsListResponse(); |
| buildCounterCampaignsListResponse++; |
| if (buildCounterCampaignsListResponse < 3) { |
| o.campaigns = buildUnnamed5339(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCampaignsListResponse--; |
| return o; |
| } |
| |
| void checkCampaignsListResponse(api.CampaignsListResponse o) { |
| buildCounterCampaignsListResponse++; |
| if (buildCounterCampaignsListResponse < 3) { |
| checkUnnamed5339(o.campaigns!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCampaignsListResponse--; |
| } |
| |
| core.int buildCounterChangeLog = 0; |
| api.ChangeLog buildChangeLog() { |
| var o = api.ChangeLog(); |
| buildCounterChangeLog++; |
| if (buildCounterChangeLog < 3) { |
| o.accountId = 'foo'; |
| o.action = 'foo'; |
| o.changeTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.fieldName = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.newValue = 'foo'; |
| o.objectId = 'foo'; |
| o.objectType = 'foo'; |
| o.oldValue = 'foo'; |
| o.subaccountId = 'foo'; |
| o.transactionId = 'foo'; |
| o.userProfileId = 'foo'; |
| o.userProfileName = 'foo'; |
| } |
| buildCounterChangeLog--; |
| return o; |
| } |
| |
| void checkChangeLog(api.ChangeLog o) { |
| buildCounterChangeLog++; |
| if (buildCounterChangeLog < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.action!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.changeTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| unittest.expect( |
| o.fieldName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.newValue!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.objectId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.objectType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.oldValue!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.transactionId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.userProfileId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.userProfileName!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterChangeLog--; |
| } |
| |
| core.List<api.ChangeLog> buildUnnamed5340() { |
| var o = <api.ChangeLog>[]; |
| o.add(buildChangeLog()); |
| o.add(buildChangeLog()); |
| return o; |
| } |
| |
| void checkUnnamed5340(core.List<api.ChangeLog> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkChangeLog(o[0] as api.ChangeLog); |
| checkChangeLog(o[1] as api.ChangeLog); |
| } |
| |
| core.int buildCounterChangeLogsListResponse = 0; |
| api.ChangeLogsListResponse buildChangeLogsListResponse() { |
| var o = api.ChangeLogsListResponse(); |
| buildCounterChangeLogsListResponse++; |
| if (buildCounterChangeLogsListResponse < 3) { |
| o.changeLogs = buildUnnamed5340(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterChangeLogsListResponse--; |
| return o; |
| } |
| |
| void checkChangeLogsListResponse(api.ChangeLogsListResponse o) { |
| buildCounterChangeLogsListResponse++; |
| if (buildCounterChangeLogsListResponse < 3) { |
| checkUnnamed5340(o.changeLogs!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterChangeLogsListResponse--; |
| } |
| |
| core.List<api.ChannelGroupingRule> buildUnnamed5341() { |
| var o = <api.ChannelGroupingRule>[]; |
| o.add(buildChannelGroupingRule()); |
| o.add(buildChannelGroupingRule()); |
| return o; |
| } |
| |
| void checkUnnamed5341(core.List<api.ChannelGroupingRule> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkChannelGroupingRule(o[0] as api.ChannelGroupingRule); |
| checkChannelGroupingRule(o[1] as api.ChannelGroupingRule); |
| } |
| |
| core.int buildCounterChannelGrouping = 0; |
| api.ChannelGrouping buildChannelGrouping() { |
| var o = api.ChannelGrouping(); |
| buildCounterChannelGrouping++; |
| if (buildCounterChannelGrouping < 3) { |
| o.fallbackName = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.rules = buildUnnamed5341(); |
| } |
| buildCounterChannelGrouping--; |
| return o; |
| } |
| |
| void checkChannelGrouping(api.ChannelGrouping o) { |
| buildCounterChannelGrouping++; |
| if (buildCounterChannelGrouping < 3) { |
| unittest.expect( |
| o.fallbackName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5341(o.rules!); |
| } |
| buildCounterChannelGrouping--; |
| } |
| |
| core.List<api.DisjunctiveMatchStatement> buildUnnamed5342() { |
| var o = <api.DisjunctiveMatchStatement>[]; |
| o.add(buildDisjunctiveMatchStatement()); |
| o.add(buildDisjunctiveMatchStatement()); |
| return o; |
| } |
| |
| void checkUnnamed5342(core.List<api.DisjunctiveMatchStatement> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDisjunctiveMatchStatement(o[0] as api.DisjunctiveMatchStatement); |
| checkDisjunctiveMatchStatement(o[1] as api.DisjunctiveMatchStatement); |
| } |
| |
| core.int buildCounterChannelGroupingRule = 0; |
| api.ChannelGroupingRule buildChannelGroupingRule() { |
| var o = api.ChannelGroupingRule(); |
| buildCounterChannelGroupingRule++; |
| if (buildCounterChannelGroupingRule < 3) { |
| o.disjunctiveMatchStatements = buildUnnamed5342(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterChannelGroupingRule--; |
| return o; |
| } |
| |
| void checkChannelGroupingRule(api.ChannelGroupingRule o) { |
| buildCounterChannelGroupingRule++; |
| if (buildCounterChannelGroupingRule < 3) { |
| checkUnnamed5342(o.disjunctiveMatchStatements!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterChannelGroupingRule--; |
| } |
| |
| core.List<api.City> buildUnnamed5343() { |
| var o = <api.City>[]; |
| o.add(buildCity()); |
| o.add(buildCity()); |
| return o; |
| } |
| |
| void checkUnnamed5343(core.List<api.City> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCity(o[0] as api.City); |
| checkCity(o[1] as api.City); |
| } |
| |
| core.int buildCounterCitiesListResponse = 0; |
| api.CitiesListResponse buildCitiesListResponse() { |
| var o = api.CitiesListResponse(); |
| buildCounterCitiesListResponse++; |
| if (buildCounterCitiesListResponse < 3) { |
| o.cities = buildUnnamed5343(); |
| o.kind = 'foo'; |
| } |
| buildCounterCitiesListResponse--; |
| return o; |
| } |
| |
| void checkCitiesListResponse(api.CitiesListResponse o) { |
| buildCounterCitiesListResponse++; |
| if (buildCounterCitiesListResponse < 3) { |
| checkUnnamed5343(o.cities!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCitiesListResponse--; |
| } |
| |
| core.int buildCounterCity = 0; |
| api.City buildCity() { |
| var o = api.City(); |
| buildCounterCity++; |
| if (buildCounterCity < 3) { |
| o.countryCode = 'foo'; |
| o.countryDartId = 'foo'; |
| o.dartId = 'foo'; |
| o.kind = 'foo'; |
| o.metroCode = 'foo'; |
| o.metroDmaId = 'foo'; |
| o.name = 'foo'; |
| o.regionCode = 'foo'; |
| o.regionDartId = 'foo'; |
| } |
| buildCounterCity--; |
| return o; |
| } |
| |
| void checkCity(api.City o) { |
| buildCounterCity++; |
| if (buildCounterCity < 3) { |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryDartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.metroCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.metroDmaId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.regionCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.regionDartId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCity--; |
| } |
| |
| core.int buildCounterClickTag = 0; |
| api.ClickTag buildClickTag() { |
| var o = api.ClickTag(); |
| buildCounterClickTag++; |
| if (buildCounterClickTag < 3) { |
| o.clickThroughUrl = buildCreativeClickThroughUrl(); |
| o.eventName = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterClickTag--; |
| return o; |
| } |
| |
| void checkClickTag(api.ClickTag o) { |
| buildCounterClickTag++; |
| if (buildCounterClickTag < 3) { |
| checkCreativeClickThroughUrl( |
| o.clickThroughUrl! as api.CreativeClickThroughUrl); |
| unittest.expect( |
| o.eventName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterClickTag--; |
| } |
| |
| core.int buildCounterClickThroughUrl = 0; |
| api.ClickThroughUrl buildClickThroughUrl() { |
| var o = api.ClickThroughUrl(); |
| buildCounterClickThroughUrl++; |
| if (buildCounterClickThroughUrl < 3) { |
| o.computedClickThroughUrl = 'foo'; |
| o.customClickThroughUrl = 'foo'; |
| o.defaultLandingPage = true; |
| o.landingPageId = 'foo'; |
| } |
| buildCounterClickThroughUrl--; |
| return o; |
| } |
| |
| void checkClickThroughUrl(api.ClickThroughUrl o) { |
| buildCounterClickThroughUrl++; |
| if (buildCounterClickThroughUrl < 3) { |
| unittest.expect( |
| o.computedClickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.customClickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.defaultLandingPage!, unittest.isTrue); |
| unittest.expect( |
| o.landingPageId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterClickThroughUrl--; |
| } |
| |
| core.int buildCounterClickThroughUrlSuffixProperties = 0; |
| api.ClickThroughUrlSuffixProperties buildClickThroughUrlSuffixProperties() { |
| var o = api.ClickThroughUrlSuffixProperties(); |
| buildCounterClickThroughUrlSuffixProperties++; |
| if (buildCounterClickThroughUrlSuffixProperties < 3) { |
| o.clickThroughUrlSuffix = 'foo'; |
| o.overrideInheritedSuffix = true; |
| } |
| buildCounterClickThroughUrlSuffixProperties--; |
| return o; |
| } |
| |
| void checkClickThroughUrlSuffixProperties( |
| api.ClickThroughUrlSuffixProperties o) { |
| buildCounterClickThroughUrlSuffixProperties++; |
| if (buildCounterClickThroughUrlSuffixProperties < 3) { |
| unittest.expect( |
| o.clickThroughUrlSuffix!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.overrideInheritedSuffix!, unittest.isTrue); |
| } |
| buildCounterClickThroughUrlSuffixProperties--; |
| } |
| |
| core.int buildCounterCompanionClickThroughOverride = 0; |
| api.CompanionClickThroughOverride buildCompanionClickThroughOverride() { |
| var o = api.CompanionClickThroughOverride(); |
| buildCounterCompanionClickThroughOverride++; |
| if (buildCounterCompanionClickThroughOverride < 3) { |
| o.clickThroughUrl = buildClickThroughUrl(); |
| o.creativeId = 'foo'; |
| } |
| buildCounterCompanionClickThroughOverride--; |
| return o; |
| } |
| |
| void checkCompanionClickThroughOverride(api.CompanionClickThroughOverride o) { |
| buildCounterCompanionClickThroughOverride++; |
| if (buildCounterCompanionClickThroughOverride < 3) { |
| checkClickThroughUrl(o.clickThroughUrl! as api.ClickThroughUrl); |
| unittest.expect( |
| o.creativeId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCompanionClickThroughOverride--; |
| } |
| |
| core.List<api.Size> buildUnnamed5344() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5344(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.int buildCounterCompanionSetting = 0; |
| api.CompanionSetting buildCompanionSetting() { |
| var o = api.CompanionSetting(); |
| buildCounterCompanionSetting++; |
| if (buildCounterCompanionSetting < 3) { |
| o.companionsDisabled = true; |
| o.enabledSizes = buildUnnamed5344(); |
| o.imageOnly = true; |
| o.kind = 'foo'; |
| } |
| buildCounterCompanionSetting--; |
| return o; |
| } |
| |
| void checkCompanionSetting(api.CompanionSetting o) { |
| buildCounterCompanionSetting++; |
| if (buildCounterCompanionSetting < 3) { |
| unittest.expect(o.companionsDisabled!, unittest.isTrue); |
| checkUnnamed5344(o.enabledSizes!); |
| unittest.expect(o.imageOnly!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCompanionSetting--; |
| } |
| |
| core.int buildCounterCompatibleFields = 0; |
| api.CompatibleFields buildCompatibleFields() { |
| var o = api.CompatibleFields(); |
| buildCounterCompatibleFields++; |
| if (buildCounterCompatibleFields < 3) { |
| o.crossDimensionReachReportCompatibleFields = |
| buildCrossDimensionReachReportCompatibleFields(); |
| o.floodlightReportCompatibleFields = |
| buildFloodlightReportCompatibleFields(); |
| o.kind = 'foo'; |
| o.pathAttributionReportCompatibleFields = buildPathReportCompatibleFields(); |
| o.pathReportCompatibleFields = buildPathReportCompatibleFields(); |
| o.pathToConversionReportCompatibleFields = |
| buildPathToConversionReportCompatibleFields(); |
| o.reachReportCompatibleFields = buildReachReportCompatibleFields(); |
| o.reportCompatibleFields = buildReportCompatibleFields(); |
| } |
| buildCounterCompatibleFields--; |
| return o; |
| } |
| |
| void checkCompatibleFields(api.CompatibleFields o) { |
| buildCounterCompatibleFields++; |
| if (buildCounterCompatibleFields < 3) { |
| checkCrossDimensionReachReportCompatibleFields( |
| o.crossDimensionReachReportCompatibleFields! |
| as api.CrossDimensionReachReportCompatibleFields); |
| checkFloodlightReportCompatibleFields(o.floodlightReportCompatibleFields! |
| as api.FloodlightReportCompatibleFields); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkPathReportCompatibleFields(o.pathAttributionReportCompatibleFields! |
| as api.PathReportCompatibleFields); |
| checkPathReportCompatibleFields( |
| o.pathReportCompatibleFields! as api.PathReportCompatibleFields); |
| checkPathToConversionReportCompatibleFields( |
| o.pathToConversionReportCompatibleFields! |
| as api.PathToConversionReportCompatibleFields); |
| checkReachReportCompatibleFields( |
| o.reachReportCompatibleFields! as api.ReachReportCompatibleFields); |
| checkReportCompatibleFields( |
| o.reportCompatibleFields! as api.ReportCompatibleFields); |
| } |
| buildCounterCompatibleFields--; |
| } |
| |
| core.int buildCounterConnectionType = 0; |
| api.ConnectionType buildConnectionType() { |
| var o = api.ConnectionType(); |
| buildCounterConnectionType++; |
| if (buildCounterConnectionType < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterConnectionType--; |
| return o; |
| } |
| |
| void checkConnectionType(api.ConnectionType o) { |
| buildCounterConnectionType++; |
| if (buildCounterConnectionType < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConnectionType--; |
| } |
| |
| core.List<api.ConnectionType> buildUnnamed5345() { |
| var o = <api.ConnectionType>[]; |
| o.add(buildConnectionType()); |
| o.add(buildConnectionType()); |
| return o; |
| } |
| |
| void checkUnnamed5345(core.List<api.ConnectionType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConnectionType(o[0] as api.ConnectionType); |
| checkConnectionType(o[1] as api.ConnectionType); |
| } |
| |
| core.int buildCounterConnectionTypesListResponse = 0; |
| api.ConnectionTypesListResponse buildConnectionTypesListResponse() { |
| var o = api.ConnectionTypesListResponse(); |
| buildCounterConnectionTypesListResponse++; |
| if (buildCounterConnectionTypesListResponse < 3) { |
| o.connectionTypes = buildUnnamed5345(); |
| o.kind = 'foo'; |
| } |
| buildCounterConnectionTypesListResponse--; |
| return o; |
| } |
| |
| void checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { |
| buildCounterConnectionTypesListResponse++; |
| if (buildCounterConnectionTypesListResponse < 3) { |
| checkUnnamed5345(o.connectionTypes!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConnectionTypesListResponse--; |
| } |
| |
| core.List<api.ContentCategory> buildUnnamed5346() { |
| var o = <api.ContentCategory>[]; |
| o.add(buildContentCategory()); |
| o.add(buildContentCategory()); |
| return o; |
| } |
| |
| void checkUnnamed5346(core.List<api.ContentCategory> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkContentCategory(o[0] as api.ContentCategory); |
| checkContentCategory(o[1] as api.ContentCategory); |
| } |
| |
| core.int buildCounterContentCategoriesListResponse = 0; |
| api.ContentCategoriesListResponse buildContentCategoriesListResponse() { |
| var o = api.ContentCategoriesListResponse(); |
| buildCounterContentCategoriesListResponse++; |
| if (buildCounterContentCategoriesListResponse < 3) { |
| o.contentCategories = buildUnnamed5346(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterContentCategoriesListResponse--; |
| return o; |
| } |
| |
| void checkContentCategoriesListResponse(api.ContentCategoriesListResponse o) { |
| buildCounterContentCategoriesListResponse++; |
| if (buildCounterContentCategoriesListResponse < 3) { |
| checkUnnamed5346(o.contentCategories!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterContentCategoriesListResponse--; |
| } |
| |
| core.int buildCounterContentCategory = 0; |
| api.ContentCategory buildContentCategory() { |
| var o = api.ContentCategory(); |
| buildCounterContentCategory++; |
| if (buildCounterContentCategory < 3) { |
| o.accountId = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterContentCategory--; |
| return o; |
| } |
| |
| void checkContentCategory(api.ContentCategory o) { |
| buildCounterContentCategory++; |
| if (buildCounterContentCategory < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterContentCategory--; |
| } |
| |
| core.List<api.CustomFloodlightVariable> buildUnnamed5347() { |
| var o = <api.CustomFloodlightVariable>[]; |
| o.add(buildCustomFloodlightVariable()); |
| o.add(buildCustomFloodlightVariable()); |
| return o; |
| } |
| |
| void checkUnnamed5347(core.List<api.CustomFloodlightVariable> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomFloodlightVariable(o[0] as api.CustomFloodlightVariable); |
| checkCustomFloodlightVariable(o[1] as api.CustomFloodlightVariable); |
| } |
| |
| core.List<core.String> buildUnnamed5348() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5348(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterConversion = 0; |
| api.Conversion buildConversion() { |
| var o = api.Conversion(); |
| buildCounterConversion++; |
| if (buildCounterConversion < 3) { |
| o.childDirectedTreatment = true; |
| o.customVariables = buildUnnamed5347(); |
| o.dclid = 'foo'; |
| o.encryptedUserId = 'foo'; |
| o.encryptedUserIdCandidates = buildUnnamed5348(); |
| o.floodlightActivityId = 'foo'; |
| o.floodlightConfigurationId = 'foo'; |
| o.gclid = 'foo'; |
| o.kind = 'foo'; |
| o.limitAdTracking = true; |
| o.matchId = 'foo'; |
| o.mobileDeviceId = 'foo'; |
| o.nonPersonalizedAd = true; |
| o.ordinal = 'foo'; |
| o.quantity = 'foo'; |
| o.timestampMicros = 'foo'; |
| o.treatmentForUnderage = true; |
| o.value = 42.0; |
| } |
| buildCounterConversion--; |
| return o; |
| } |
| |
| void checkConversion(api.Conversion o) { |
| buildCounterConversion++; |
| if (buildCounterConversion < 3) { |
| unittest.expect(o.childDirectedTreatment!, unittest.isTrue); |
| checkUnnamed5347(o.customVariables!); |
| unittest.expect( |
| o.dclid!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.encryptedUserId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5348(o.encryptedUserIdCandidates!); |
| unittest.expect( |
| o.floodlightActivityId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.gclid!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.limitAdTracking!, unittest.isTrue); |
| unittest.expect( |
| o.matchId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.mobileDeviceId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.nonPersonalizedAd!, unittest.isTrue); |
| unittest.expect( |
| o.ordinal!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.quantity!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.timestampMicros!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.treatmentForUnderage!, unittest.isTrue); |
| unittest.expect( |
| o.value!, |
| unittest.equals(42.0), |
| ); |
| } |
| buildCounterConversion--; |
| } |
| |
| core.int buildCounterConversionError = 0; |
| api.ConversionError buildConversionError() { |
| var o = api.ConversionError(); |
| buildCounterConversionError++; |
| if (buildCounterConversionError < 3) { |
| o.code = 'foo'; |
| o.kind = 'foo'; |
| o.message = 'foo'; |
| } |
| buildCounterConversionError--; |
| return o; |
| } |
| |
| void checkConversionError(api.ConversionError o) { |
| buildCounterConversionError++; |
| if (buildCounterConversionError < 3) { |
| unittest.expect( |
| o.code!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.message!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionError--; |
| } |
| |
| core.List<api.ConversionError> buildUnnamed5349() { |
| var o = <api.ConversionError>[]; |
| o.add(buildConversionError()); |
| o.add(buildConversionError()); |
| return o; |
| } |
| |
| void checkUnnamed5349(core.List<api.ConversionError> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConversionError(o[0] as api.ConversionError); |
| checkConversionError(o[1] as api.ConversionError); |
| } |
| |
| core.int buildCounterConversionStatus = 0; |
| api.ConversionStatus buildConversionStatus() { |
| var o = api.ConversionStatus(); |
| buildCounterConversionStatus++; |
| if (buildCounterConversionStatus < 3) { |
| o.conversion = buildConversion(); |
| o.errors = buildUnnamed5349(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionStatus--; |
| return o; |
| } |
| |
| void checkConversionStatus(api.ConversionStatus o) { |
| buildCounterConversionStatus++; |
| if (buildCounterConversionStatus < 3) { |
| checkConversion(o.conversion! as api.Conversion); |
| checkUnnamed5349(o.errors!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionStatus--; |
| } |
| |
| core.List<api.Conversion> buildUnnamed5350() { |
| var o = <api.Conversion>[]; |
| o.add(buildConversion()); |
| o.add(buildConversion()); |
| return o; |
| } |
| |
| void checkUnnamed5350(core.List<api.Conversion> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConversion(o[0] as api.Conversion); |
| checkConversion(o[1] as api.Conversion); |
| } |
| |
| core.int buildCounterConversionsBatchInsertRequest = 0; |
| api.ConversionsBatchInsertRequest buildConversionsBatchInsertRequest() { |
| var o = api.ConversionsBatchInsertRequest(); |
| buildCounterConversionsBatchInsertRequest++; |
| if (buildCounterConversionsBatchInsertRequest < 3) { |
| o.conversions = buildUnnamed5350(); |
| o.encryptionInfo = buildEncryptionInfo(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionsBatchInsertRequest--; |
| return o; |
| } |
| |
| void checkConversionsBatchInsertRequest(api.ConversionsBatchInsertRequest o) { |
| buildCounterConversionsBatchInsertRequest++; |
| if (buildCounterConversionsBatchInsertRequest < 3) { |
| checkUnnamed5350(o.conversions!); |
| checkEncryptionInfo(o.encryptionInfo! as api.EncryptionInfo); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionsBatchInsertRequest--; |
| } |
| |
| core.List<api.ConversionStatus> buildUnnamed5351() { |
| var o = <api.ConversionStatus>[]; |
| o.add(buildConversionStatus()); |
| o.add(buildConversionStatus()); |
| return o; |
| } |
| |
| void checkUnnamed5351(core.List<api.ConversionStatus> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConversionStatus(o[0] as api.ConversionStatus); |
| checkConversionStatus(o[1] as api.ConversionStatus); |
| } |
| |
| core.int buildCounterConversionsBatchInsertResponse = 0; |
| api.ConversionsBatchInsertResponse buildConversionsBatchInsertResponse() { |
| var o = api.ConversionsBatchInsertResponse(); |
| buildCounterConversionsBatchInsertResponse++; |
| if (buildCounterConversionsBatchInsertResponse < 3) { |
| o.hasFailures = true; |
| o.kind = 'foo'; |
| o.status = buildUnnamed5351(); |
| } |
| buildCounterConversionsBatchInsertResponse--; |
| return o; |
| } |
| |
| void checkConversionsBatchInsertResponse(api.ConversionsBatchInsertResponse o) { |
| buildCounterConversionsBatchInsertResponse++; |
| if (buildCounterConversionsBatchInsertResponse < 3) { |
| unittest.expect(o.hasFailures!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5351(o.status!); |
| } |
| buildCounterConversionsBatchInsertResponse--; |
| } |
| |
| core.List<api.Conversion> buildUnnamed5352() { |
| var o = <api.Conversion>[]; |
| o.add(buildConversion()); |
| o.add(buildConversion()); |
| return o; |
| } |
| |
| void checkUnnamed5352(core.List<api.Conversion> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConversion(o[0] as api.Conversion); |
| checkConversion(o[1] as api.Conversion); |
| } |
| |
| core.int buildCounterConversionsBatchUpdateRequest = 0; |
| api.ConversionsBatchUpdateRequest buildConversionsBatchUpdateRequest() { |
| var o = api.ConversionsBatchUpdateRequest(); |
| buildCounterConversionsBatchUpdateRequest++; |
| if (buildCounterConversionsBatchUpdateRequest < 3) { |
| o.conversions = buildUnnamed5352(); |
| o.encryptionInfo = buildEncryptionInfo(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionsBatchUpdateRequest--; |
| return o; |
| } |
| |
| void checkConversionsBatchUpdateRequest(api.ConversionsBatchUpdateRequest o) { |
| buildCounterConversionsBatchUpdateRequest++; |
| if (buildCounterConversionsBatchUpdateRequest < 3) { |
| checkUnnamed5352(o.conversions!); |
| checkEncryptionInfo(o.encryptionInfo! as api.EncryptionInfo); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionsBatchUpdateRequest--; |
| } |
| |
| core.List<api.ConversionStatus> buildUnnamed5353() { |
| var o = <api.ConversionStatus>[]; |
| o.add(buildConversionStatus()); |
| o.add(buildConversionStatus()); |
| return o; |
| } |
| |
| void checkUnnamed5353(core.List<api.ConversionStatus> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConversionStatus(o[0] as api.ConversionStatus); |
| checkConversionStatus(o[1] as api.ConversionStatus); |
| } |
| |
| core.int buildCounterConversionsBatchUpdateResponse = 0; |
| api.ConversionsBatchUpdateResponse buildConversionsBatchUpdateResponse() { |
| var o = api.ConversionsBatchUpdateResponse(); |
| buildCounterConversionsBatchUpdateResponse++; |
| if (buildCounterConversionsBatchUpdateResponse < 3) { |
| o.hasFailures = true; |
| o.kind = 'foo'; |
| o.status = buildUnnamed5353(); |
| } |
| buildCounterConversionsBatchUpdateResponse--; |
| return o; |
| } |
| |
| void checkConversionsBatchUpdateResponse(api.ConversionsBatchUpdateResponse o) { |
| buildCounterConversionsBatchUpdateResponse++; |
| if (buildCounterConversionsBatchUpdateResponse < 3) { |
| unittest.expect(o.hasFailures!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5353(o.status!); |
| } |
| buildCounterConversionsBatchUpdateResponse--; |
| } |
| |
| core.List<api.Country> buildUnnamed5354() { |
| var o = <api.Country>[]; |
| o.add(buildCountry()); |
| o.add(buildCountry()); |
| return o; |
| } |
| |
| void checkUnnamed5354(core.List<api.Country> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCountry(o[0] as api.Country); |
| checkCountry(o[1] as api.Country); |
| } |
| |
| core.int buildCounterCountriesListResponse = 0; |
| api.CountriesListResponse buildCountriesListResponse() { |
| var o = api.CountriesListResponse(); |
| buildCounterCountriesListResponse++; |
| if (buildCounterCountriesListResponse < 3) { |
| o.countries = buildUnnamed5354(); |
| o.kind = 'foo'; |
| } |
| buildCounterCountriesListResponse--; |
| return o; |
| } |
| |
| void checkCountriesListResponse(api.CountriesListResponse o) { |
| buildCounterCountriesListResponse++; |
| if (buildCounterCountriesListResponse < 3) { |
| checkUnnamed5354(o.countries!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCountriesListResponse--; |
| } |
| |
| core.int buildCounterCountry = 0; |
| api.Country buildCountry() { |
| var o = api.Country(); |
| buildCounterCountry++; |
| if (buildCounterCountry < 3) { |
| o.countryCode = 'foo'; |
| o.dartId = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.sslEnabled = true; |
| } |
| buildCounterCountry--; |
| return o; |
| } |
| |
| void checkCountry(api.Country o) { |
| buildCounterCountry++; |
| if (buildCounterCountry < 3) { |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.sslEnabled!, unittest.isTrue); |
| } |
| buildCounterCountry--; |
| } |
| |
| core.List<core.String> buildUnnamed5355() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5355(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.Size> buildUnnamed5356() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5356(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.List<core.String> buildUnnamed5357() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5357(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.ClickTag> buildUnnamed5358() { |
| var o = <api.ClickTag>[]; |
| o.add(buildClickTag()); |
| o.add(buildClickTag()); |
| return o; |
| } |
| |
| void checkUnnamed5358(core.List<api.ClickTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkClickTag(o[0] as api.ClickTag); |
| checkClickTag(o[1] as api.ClickTag); |
| } |
| |
| core.List<core.String> buildUnnamed5359() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5359(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5360() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5360(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5361() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5361(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.List<api.CreativeAsset> buildUnnamed5362() { |
| var o = <api.CreativeAsset>[]; |
| o.add(buildCreativeAsset()); |
| o.add(buildCreativeAsset()); |
| return o; |
| } |
| |
| void checkUnnamed5362(core.List<api.CreativeAsset> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeAsset(o[0] as api.CreativeAsset); |
| checkCreativeAsset(o[1] as api.CreativeAsset); |
| } |
| |
| core.List<api.CreativeFieldAssignment> buildUnnamed5363() { |
| var o = <api.CreativeFieldAssignment>[]; |
| o.add(buildCreativeFieldAssignment()); |
| o.add(buildCreativeFieldAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed5363(core.List<api.CreativeFieldAssignment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeFieldAssignment(o[0] as api.CreativeFieldAssignment); |
| checkCreativeFieldAssignment(o[1] as api.CreativeFieldAssignment); |
| } |
| |
| core.List<core.String> buildUnnamed5364() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5364(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5365() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5365(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.List<api.ThirdPartyTrackingUrl> buildUnnamed5366() { |
| var o = <api.ThirdPartyTrackingUrl>[]; |
| o.add(buildThirdPartyTrackingUrl()); |
| o.add(buildThirdPartyTrackingUrl()); |
| return o; |
| } |
| |
| void checkUnnamed5366(core.List<api.ThirdPartyTrackingUrl> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkThirdPartyTrackingUrl(o[0] as api.ThirdPartyTrackingUrl); |
| checkThirdPartyTrackingUrl(o[1] as api.ThirdPartyTrackingUrl); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5367() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5367(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.int buildCounterCreative = 0; |
| api.Creative buildCreative() { |
| var o = api.Creative(); |
| buildCounterCreative++; |
| if (buildCounterCreative < 3) { |
| o.accountId = 'foo'; |
| o.active = true; |
| o.adParameters = 'foo'; |
| o.adTagKeys = buildUnnamed5355(); |
| o.additionalSizes = buildUnnamed5356(); |
| o.advertiserId = 'foo'; |
| o.allowScriptAccess = true; |
| o.archived = true; |
| o.artworkType = 'foo'; |
| o.authoringSource = 'foo'; |
| o.authoringTool = 'foo'; |
| o.autoAdvanceImages = true; |
| o.backgroundColor = 'foo'; |
| o.backupImageClickThroughUrl = buildCreativeClickThroughUrl(); |
| o.backupImageFeatures = buildUnnamed5357(); |
| o.backupImageReportingLabel = 'foo'; |
| o.backupImageTargetWindow = buildTargetWindow(); |
| o.clickTags = buildUnnamed5358(); |
| o.commercialId = 'foo'; |
| o.companionCreatives = buildUnnamed5359(); |
| o.compatibility = buildUnnamed5360(); |
| o.convertFlashToHtml5 = true; |
| o.counterCustomEvents = buildUnnamed5361(); |
| o.creativeAssetSelection = buildCreativeAssetSelection(); |
| o.creativeAssets = buildUnnamed5362(); |
| o.creativeFieldAssignments = buildUnnamed5363(); |
| o.customKeyValues = buildUnnamed5364(); |
| o.dynamicAssetSelection = true; |
| o.exitCustomEvents = buildUnnamed5365(); |
| o.fsCommand = buildFsCommand(); |
| o.htmlCode = 'foo'; |
| o.htmlCodeLocked = true; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.latestTraffickedCreativeId = 'foo'; |
| o.mediaDescription = 'foo'; |
| o.mediaDuration = 42.0; |
| o.name = 'foo'; |
| o.obaIcon = buildObaIcon(); |
| o.overrideCss = 'foo'; |
| o.progressOffset = buildVideoOffset(); |
| o.redirectUrl = 'foo'; |
| o.renderingId = 'foo'; |
| o.renderingIdDimensionValue = buildDimensionValue(); |
| o.requiredFlashPluginVersion = 'foo'; |
| o.requiredFlashVersion = 42; |
| o.size = buildSize(); |
| o.skipOffset = buildVideoOffset(); |
| o.skippable = true; |
| o.sslCompliant = true; |
| o.sslOverride = true; |
| o.studioAdvertiserId = 'foo'; |
| o.studioCreativeId = 'foo'; |
| o.studioTraffickedCreativeId = 'foo'; |
| o.subaccountId = 'foo'; |
| o.thirdPartyBackupImageImpressionsUrl = 'foo'; |
| o.thirdPartyRichMediaImpressionsUrl = 'foo'; |
| o.thirdPartyUrls = buildUnnamed5366(); |
| o.timerCustomEvents = buildUnnamed5367(); |
| o.totalFileSize = 'foo'; |
| o.type = 'foo'; |
| o.universalAdId = buildUniversalAdId(); |
| o.version = 42; |
| } |
| buildCounterCreative--; |
| return o; |
| } |
| |
| void checkCreative(api.Creative o) { |
| buildCounterCreative++; |
| if (buildCounterCreative < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.adParameters!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5355(o.adTagKeys!); |
| checkUnnamed5356(o.additionalSizes!); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.allowScriptAccess!, unittest.isTrue); |
| unittest.expect(o.archived!, unittest.isTrue); |
| unittest.expect( |
| o.artworkType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.authoringSource!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.authoringTool!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.autoAdvanceImages!, unittest.isTrue); |
| unittest.expect( |
| o.backgroundColor!, |
| unittest.equals('foo'), |
| ); |
| checkCreativeClickThroughUrl( |
| o.backupImageClickThroughUrl! as api.CreativeClickThroughUrl); |
| checkUnnamed5357(o.backupImageFeatures!); |
| unittest.expect( |
| o.backupImageReportingLabel!, |
| unittest.equals('foo'), |
| ); |
| checkTargetWindow(o.backupImageTargetWindow! as api.TargetWindow); |
| checkUnnamed5358(o.clickTags!); |
| unittest.expect( |
| o.commercialId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5359(o.companionCreatives!); |
| checkUnnamed5360(o.compatibility!); |
| unittest.expect(o.convertFlashToHtml5!, unittest.isTrue); |
| checkUnnamed5361(o.counterCustomEvents!); |
| checkCreativeAssetSelection( |
| o.creativeAssetSelection! as api.CreativeAssetSelection); |
| checkUnnamed5362(o.creativeAssets!); |
| checkUnnamed5363(o.creativeFieldAssignments!); |
| checkUnnamed5364(o.customKeyValues!); |
| unittest.expect(o.dynamicAssetSelection!, unittest.isTrue); |
| checkUnnamed5365(o.exitCustomEvents!); |
| checkFsCommand(o.fsCommand! as api.FsCommand); |
| unittest.expect( |
| o.htmlCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.htmlCodeLocked!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.latestTraffickedCreativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.mediaDescription!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.mediaDuration!, |
| unittest.equals(42.0), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkObaIcon(o.obaIcon! as api.ObaIcon); |
| unittest.expect( |
| o.overrideCss!, |
| unittest.equals('foo'), |
| ); |
| checkVideoOffset(o.progressOffset! as api.VideoOffset); |
| unittest.expect( |
| o.redirectUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.renderingId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.renderingIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.requiredFlashPluginVersion!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.requiredFlashVersion!, |
| unittest.equals(42), |
| ); |
| checkSize(o.size! as api.Size); |
| checkVideoOffset(o.skipOffset! as api.VideoOffset); |
| unittest.expect(o.skippable!, unittest.isTrue); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect(o.sslOverride!, unittest.isTrue); |
| unittest.expect( |
| o.studioAdvertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.studioCreativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.studioTraffickedCreativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.thirdPartyBackupImageImpressionsUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.thirdPartyRichMediaImpressionsUrl!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5366(o.thirdPartyUrls!); |
| checkUnnamed5367(o.timerCustomEvents!); |
| unittest.expect( |
| o.totalFileSize!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| checkUniversalAdId(o.universalAdId! as api.UniversalAdId); |
| unittest.expect( |
| o.version!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterCreative--; |
| } |
| |
| core.List<api.Size> buildUnnamed5368() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5368(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.List<core.String> buildUnnamed5369() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5369(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5370() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5370(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterCreativeAsset = 0; |
| api.CreativeAsset buildCreativeAsset() { |
| var o = api.CreativeAsset(); |
| buildCounterCreativeAsset++; |
| if (buildCounterCreativeAsset < 3) { |
| o.actionScript3 = true; |
| o.active = true; |
| o.additionalSizes = buildUnnamed5368(); |
| o.alignment = 'foo'; |
| o.artworkType = 'foo'; |
| o.assetIdentifier = buildCreativeAssetId(); |
| o.audioBitRate = 42; |
| o.audioSampleRate = 42; |
| o.backupImageExit = buildCreativeCustomEvent(); |
| o.bitRate = 42; |
| o.childAssetType = 'foo'; |
| o.collapsedSize = buildSize(); |
| o.companionCreativeIds = buildUnnamed5369(); |
| o.customStartTimeValue = 42; |
| o.detectedFeatures = buildUnnamed5370(); |
| o.displayType = 'foo'; |
| o.duration = 42; |
| o.durationType = 'foo'; |
| o.expandedDimension = buildSize(); |
| o.fileSize = 'foo'; |
| o.flashVersion = 42; |
| o.frameRate = 42.0; |
| o.hideFlashObjects = true; |
| o.hideSelectionBoxes = true; |
| o.horizontallyLocked = true; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.mediaDuration = 42.0; |
| o.mimeType = 'foo'; |
| o.offset = buildOffsetPosition(); |
| o.orientation = 'foo'; |
| o.originalBackup = true; |
| o.politeLoad = true; |
| o.position = buildOffsetPosition(); |
| o.positionLeftUnit = 'foo'; |
| o.positionTopUnit = 'foo'; |
| o.progressiveServingUrl = 'foo'; |
| o.pushdown = true; |
| o.pushdownDuration = 42.0; |
| o.role = 'foo'; |
| o.size = buildSize(); |
| o.sslCompliant = true; |
| o.startTimeType = 'foo'; |
| o.streamingServingUrl = 'foo'; |
| o.transparency = true; |
| o.verticallyLocked = true; |
| o.windowMode = 'foo'; |
| o.zIndex = 42; |
| o.zipFilename = 'foo'; |
| o.zipFilesize = 'foo'; |
| } |
| buildCounterCreativeAsset--; |
| return o; |
| } |
| |
| void checkCreativeAsset(api.CreativeAsset o) { |
| buildCounterCreativeAsset++; |
| if (buildCounterCreativeAsset < 3) { |
| unittest.expect(o.actionScript3!, unittest.isTrue); |
| unittest.expect(o.active!, unittest.isTrue); |
| checkUnnamed5368(o.additionalSizes!); |
| unittest.expect( |
| o.alignment!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.artworkType!, |
| unittest.equals('foo'), |
| ); |
| checkCreativeAssetId(o.assetIdentifier! as api.CreativeAssetId); |
| unittest.expect( |
| o.audioBitRate!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.audioSampleRate!, |
| unittest.equals(42), |
| ); |
| checkCreativeCustomEvent(o.backupImageExit! as api.CreativeCustomEvent); |
| unittest.expect( |
| o.bitRate!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.childAssetType!, |
| unittest.equals('foo'), |
| ); |
| checkSize(o.collapsedSize! as api.Size); |
| checkUnnamed5369(o.companionCreativeIds!); |
| unittest.expect( |
| o.customStartTimeValue!, |
| unittest.equals(42), |
| ); |
| checkUnnamed5370(o.detectedFeatures!); |
| unittest.expect( |
| o.displayType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.duration!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.durationType!, |
| unittest.equals('foo'), |
| ); |
| checkSize(o.expandedDimension! as api.Size); |
| unittest.expect( |
| o.fileSize!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.flashVersion!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.frameRate!, |
| unittest.equals(42.0), |
| ); |
| unittest.expect(o.hideFlashObjects!, unittest.isTrue); |
| unittest.expect(o.hideSelectionBoxes!, unittest.isTrue); |
| unittest.expect(o.horizontallyLocked!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.mediaDuration!, |
| unittest.equals(42.0), |
| ); |
| unittest.expect( |
| o.mimeType!, |
| unittest.equals('foo'), |
| ); |
| checkOffsetPosition(o.offset! as api.OffsetPosition); |
| unittest.expect( |
| o.orientation!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.originalBackup!, unittest.isTrue); |
| unittest.expect(o.politeLoad!, unittest.isTrue); |
| checkOffsetPosition(o.position! as api.OffsetPosition); |
| unittest.expect( |
| o.positionLeftUnit!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.positionTopUnit!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.progressiveServingUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.pushdown!, unittest.isTrue); |
| unittest.expect( |
| o.pushdownDuration!, |
| unittest.equals(42.0), |
| ); |
| unittest.expect( |
| o.role!, |
| unittest.equals('foo'), |
| ); |
| checkSize(o.size! as api.Size); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect( |
| o.startTimeType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.streamingServingUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.transparency!, unittest.isTrue); |
| unittest.expect(o.verticallyLocked!, unittest.isTrue); |
| unittest.expect( |
| o.windowMode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.zIndex!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.zipFilename!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.zipFilesize!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeAsset--; |
| } |
| |
| core.int buildCounterCreativeAssetId = 0; |
| api.CreativeAssetId buildCreativeAssetId() { |
| var o = api.CreativeAssetId(); |
| buildCounterCreativeAssetId++; |
| if (buildCounterCreativeAssetId < 3) { |
| o.name = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterCreativeAssetId--; |
| return o; |
| } |
| |
| void checkCreativeAssetId(api.CreativeAssetId o) { |
| buildCounterCreativeAssetId++; |
| if (buildCounterCreativeAssetId < 3) { |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeAssetId--; |
| } |
| |
| core.List<api.ClickTag> buildUnnamed5371() { |
| var o = <api.ClickTag>[]; |
| o.add(buildClickTag()); |
| o.add(buildClickTag()); |
| return o; |
| } |
| |
| void checkUnnamed5371(core.List<api.ClickTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkClickTag(o[0] as api.ClickTag); |
| checkClickTag(o[1] as api.ClickTag); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5372() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5372(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.List<core.String> buildUnnamed5373() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5373(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5374() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5374(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.List<api.CreativeCustomEvent> buildUnnamed5375() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5375(core.List<api.CreativeCustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeCustomEvent(o[0] as api.CreativeCustomEvent); |
| checkCreativeCustomEvent(o[1] as api.CreativeCustomEvent); |
| } |
| |
| core.List<core.String> buildUnnamed5376() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5376(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterCreativeAssetMetadata = 0; |
| api.CreativeAssetMetadata buildCreativeAssetMetadata() { |
| var o = api.CreativeAssetMetadata(); |
| buildCounterCreativeAssetMetadata++; |
| if (buildCounterCreativeAssetMetadata < 3) { |
| o.assetIdentifier = buildCreativeAssetId(); |
| o.clickTags = buildUnnamed5371(); |
| o.counterCustomEvents = buildUnnamed5372(); |
| o.detectedFeatures = buildUnnamed5373(); |
| o.exitCustomEvents = buildUnnamed5374(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.richMedia = true; |
| o.timerCustomEvents = buildUnnamed5375(); |
| o.warnedValidationRules = buildUnnamed5376(); |
| } |
| buildCounterCreativeAssetMetadata--; |
| return o; |
| } |
| |
| void checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { |
| buildCounterCreativeAssetMetadata++; |
| if (buildCounterCreativeAssetMetadata < 3) { |
| checkCreativeAssetId(o.assetIdentifier! as api.CreativeAssetId); |
| checkUnnamed5371(o.clickTags!); |
| checkUnnamed5372(o.counterCustomEvents!); |
| checkUnnamed5373(o.detectedFeatures!); |
| checkUnnamed5374(o.exitCustomEvents!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.richMedia!, unittest.isTrue); |
| checkUnnamed5375(o.timerCustomEvents!); |
| checkUnnamed5376(o.warnedValidationRules!); |
| } |
| buildCounterCreativeAssetMetadata--; |
| } |
| |
| core.List<api.Rule> buildUnnamed5377() { |
| var o = <api.Rule>[]; |
| o.add(buildRule()); |
| o.add(buildRule()); |
| return o; |
| } |
| |
| void checkUnnamed5377(core.List<api.Rule> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRule(o[0] as api.Rule); |
| checkRule(o[1] as api.Rule); |
| } |
| |
| core.int buildCounterCreativeAssetSelection = 0; |
| api.CreativeAssetSelection buildCreativeAssetSelection() { |
| var o = api.CreativeAssetSelection(); |
| buildCounterCreativeAssetSelection++; |
| if (buildCounterCreativeAssetSelection < 3) { |
| o.defaultAssetId = 'foo'; |
| o.rules = buildUnnamed5377(); |
| } |
| buildCounterCreativeAssetSelection--; |
| return o; |
| } |
| |
| void checkCreativeAssetSelection(api.CreativeAssetSelection o) { |
| buildCounterCreativeAssetSelection++; |
| if (buildCounterCreativeAssetSelection < 3) { |
| unittest.expect( |
| o.defaultAssetId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5377(o.rules!); |
| } |
| buildCounterCreativeAssetSelection--; |
| } |
| |
| core.List<api.CompanionClickThroughOverride> buildUnnamed5378() { |
| var o = <api.CompanionClickThroughOverride>[]; |
| o.add(buildCompanionClickThroughOverride()); |
| o.add(buildCompanionClickThroughOverride()); |
| return o; |
| } |
| |
| void checkUnnamed5378(core.List<api.CompanionClickThroughOverride> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompanionClickThroughOverride(o[0] as api.CompanionClickThroughOverride); |
| checkCompanionClickThroughOverride(o[1] as api.CompanionClickThroughOverride); |
| } |
| |
| core.List<api.CreativeGroupAssignment> buildUnnamed5379() { |
| var o = <api.CreativeGroupAssignment>[]; |
| o.add(buildCreativeGroupAssignment()); |
| o.add(buildCreativeGroupAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed5379(core.List<api.CreativeGroupAssignment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeGroupAssignment(o[0] as api.CreativeGroupAssignment); |
| checkCreativeGroupAssignment(o[1] as api.CreativeGroupAssignment); |
| } |
| |
| core.List<api.RichMediaExitOverride> buildUnnamed5380() { |
| var o = <api.RichMediaExitOverride>[]; |
| o.add(buildRichMediaExitOverride()); |
| o.add(buildRichMediaExitOverride()); |
| return o; |
| } |
| |
| void checkUnnamed5380(core.List<api.RichMediaExitOverride> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRichMediaExitOverride(o[0] as api.RichMediaExitOverride); |
| checkRichMediaExitOverride(o[1] as api.RichMediaExitOverride); |
| } |
| |
| core.int buildCounterCreativeAssignment = 0; |
| api.CreativeAssignment buildCreativeAssignment() { |
| var o = api.CreativeAssignment(); |
| buildCounterCreativeAssignment++; |
| if (buildCounterCreativeAssignment < 3) { |
| o.active = true; |
| o.applyEventTags = true; |
| o.clickThroughUrl = buildClickThroughUrl(); |
| o.companionCreativeOverrides = buildUnnamed5378(); |
| o.creativeGroupAssignments = buildUnnamed5379(); |
| o.creativeId = 'foo'; |
| o.creativeIdDimensionValue = buildDimensionValue(); |
| o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.richMediaExitOverrides = buildUnnamed5380(); |
| o.sequence = 42; |
| o.sslCompliant = true; |
| o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.weight = 42; |
| } |
| buildCounterCreativeAssignment--; |
| return o; |
| } |
| |
| void checkCreativeAssignment(api.CreativeAssignment o) { |
| buildCounterCreativeAssignment++; |
| if (buildCounterCreativeAssignment < 3) { |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect(o.applyEventTags!, unittest.isTrue); |
| checkClickThroughUrl(o.clickThroughUrl! as api.ClickThroughUrl); |
| checkUnnamed5378(o.companionCreativeOverrides!); |
| checkUnnamed5379(o.creativeGroupAssignments!); |
| unittest.expect( |
| o.creativeId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.creativeIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.endTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| checkUnnamed5380(o.richMediaExitOverrides!); |
| unittest.expect( |
| o.sequence!, |
| unittest.equals(42), |
| ); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect( |
| o.startTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| unittest.expect( |
| o.weight!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterCreativeAssignment--; |
| } |
| |
| core.int buildCounterCreativeClickThroughUrl = 0; |
| api.CreativeClickThroughUrl buildCreativeClickThroughUrl() { |
| var o = api.CreativeClickThroughUrl(); |
| buildCounterCreativeClickThroughUrl++; |
| if (buildCounterCreativeClickThroughUrl < 3) { |
| o.computedClickThroughUrl = 'foo'; |
| o.customClickThroughUrl = 'foo'; |
| o.landingPageId = 'foo'; |
| } |
| buildCounterCreativeClickThroughUrl--; |
| return o; |
| } |
| |
| void checkCreativeClickThroughUrl(api.CreativeClickThroughUrl o) { |
| buildCounterCreativeClickThroughUrl++; |
| if (buildCounterCreativeClickThroughUrl < 3) { |
| unittest.expect( |
| o.computedClickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.customClickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.landingPageId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeClickThroughUrl--; |
| } |
| |
| core.int buildCounterCreativeCustomEvent = 0; |
| api.CreativeCustomEvent buildCreativeCustomEvent() { |
| var o = api.CreativeCustomEvent(); |
| buildCounterCreativeCustomEvent++; |
| if (buildCounterCreativeCustomEvent < 3) { |
| o.advertiserCustomEventId = 'foo'; |
| o.advertiserCustomEventName = 'foo'; |
| o.advertiserCustomEventType = 'foo'; |
| o.artworkLabel = 'foo'; |
| o.artworkType = 'foo'; |
| o.exitClickThroughUrl = buildCreativeClickThroughUrl(); |
| o.id = 'foo'; |
| o.popupWindowProperties = buildPopupWindowProperties(); |
| o.targetType = 'foo'; |
| o.videoReportingId = 'foo'; |
| } |
| buildCounterCreativeCustomEvent--; |
| return o; |
| } |
| |
| void checkCreativeCustomEvent(api.CreativeCustomEvent o) { |
| buildCounterCreativeCustomEvent++; |
| if (buildCounterCreativeCustomEvent < 3) { |
| unittest.expect( |
| o.advertiserCustomEventId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserCustomEventName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserCustomEventType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.artworkLabel!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.artworkType!, |
| unittest.equals('foo'), |
| ); |
| checkCreativeClickThroughUrl( |
| o.exitClickThroughUrl! as api.CreativeClickThroughUrl); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkPopupWindowProperties( |
| o.popupWindowProperties! as api.PopupWindowProperties); |
| unittest.expect( |
| o.targetType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.videoReportingId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeCustomEvent--; |
| } |
| |
| core.int buildCounterCreativeField = 0; |
| api.CreativeField buildCreativeField() { |
| var o = api.CreativeField(); |
| buildCounterCreativeField++; |
| if (buildCounterCreativeField < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| } |
| buildCounterCreativeField--; |
| return o; |
| } |
| |
| void checkCreativeField(api.CreativeField o) { |
| buildCounterCreativeField++; |
| if (buildCounterCreativeField < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeField--; |
| } |
| |
| core.int buildCounterCreativeFieldAssignment = 0; |
| api.CreativeFieldAssignment buildCreativeFieldAssignment() { |
| var o = api.CreativeFieldAssignment(); |
| buildCounterCreativeFieldAssignment++; |
| if (buildCounterCreativeFieldAssignment < 3) { |
| o.creativeFieldId = 'foo'; |
| o.creativeFieldValueId = 'foo'; |
| } |
| buildCounterCreativeFieldAssignment--; |
| return o; |
| } |
| |
| void checkCreativeFieldAssignment(api.CreativeFieldAssignment o) { |
| buildCounterCreativeFieldAssignment++; |
| if (buildCounterCreativeFieldAssignment < 3) { |
| unittest.expect( |
| o.creativeFieldId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.creativeFieldValueId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeFieldAssignment--; |
| } |
| |
| core.int buildCounterCreativeFieldValue = 0; |
| api.CreativeFieldValue buildCreativeFieldValue() { |
| var o = api.CreativeFieldValue(); |
| buildCounterCreativeFieldValue++; |
| if (buildCounterCreativeFieldValue < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterCreativeFieldValue--; |
| return o; |
| } |
| |
| void checkCreativeFieldValue(api.CreativeFieldValue o) { |
| buildCounterCreativeFieldValue++; |
| if (buildCounterCreativeFieldValue < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeFieldValue--; |
| } |
| |
| core.List<api.CreativeFieldValue> buildUnnamed5381() { |
| var o = <api.CreativeFieldValue>[]; |
| o.add(buildCreativeFieldValue()); |
| o.add(buildCreativeFieldValue()); |
| return o; |
| } |
| |
| void checkUnnamed5381(core.List<api.CreativeFieldValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeFieldValue(o[0] as api.CreativeFieldValue); |
| checkCreativeFieldValue(o[1] as api.CreativeFieldValue); |
| } |
| |
| core.int buildCounterCreativeFieldValuesListResponse = 0; |
| api.CreativeFieldValuesListResponse buildCreativeFieldValuesListResponse() { |
| var o = api.CreativeFieldValuesListResponse(); |
| buildCounterCreativeFieldValuesListResponse++; |
| if (buildCounterCreativeFieldValuesListResponse < 3) { |
| o.creativeFieldValues = buildUnnamed5381(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeFieldValuesListResponse--; |
| return o; |
| } |
| |
| void checkCreativeFieldValuesListResponse( |
| api.CreativeFieldValuesListResponse o) { |
| buildCounterCreativeFieldValuesListResponse++; |
| if (buildCounterCreativeFieldValuesListResponse < 3) { |
| checkUnnamed5381(o.creativeFieldValues!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeFieldValuesListResponse--; |
| } |
| |
| core.List<api.CreativeField> buildUnnamed5382() { |
| var o = <api.CreativeField>[]; |
| o.add(buildCreativeField()); |
| o.add(buildCreativeField()); |
| return o; |
| } |
| |
| void checkUnnamed5382(core.List<api.CreativeField> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeField(o[0] as api.CreativeField); |
| checkCreativeField(o[1] as api.CreativeField); |
| } |
| |
| core.int buildCounterCreativeFieldsListResponse = 0; |
| api.CreativeFieldsListResponse buildCreativeFieldsListResponse() { |
| var o = api.CreativeFieldsListResponse(); |
| buildCounterCreativeFieldsListResponse++; |
| if (buildCounterCreativeFieldsListResponse < 3) { |
| o.creativeFields = buildUnnamed5382(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeFieldsListResponse--; |
| return o; |
| } |
| |
| void checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { |
| buildCounterCreativeFieldsListResponse++; |
| if (buildCounterCreativeFieldsListResponse < 3) { |
| checkUnnamed5382(o.creativeFields!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeFieldsListResponse--; |
| } |
| |
| core.int buildCounterCreativeGroup = 0; |
| api.CreativeGroup buildCreativeGroup() { |
| var o = api.CreativeGroup(); |
| buildCounterCreativeGroup++; |
| if (buildCounterCreativeGroup < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.groupNumber = 42; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| } |
| buildCounterCreativeGroup--; |
| return o; |
| } |
| |
| void checkCreativeGroup(api.CreativeGroup o) { |
| buildCounterCreativeGroup++; |
| if (buildCounterCreativeGroup < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.groupNumber!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeGroup--; |
| } |
| |
| core.int buildCounterCreativeGroupAssignment = 0; |
| api.CreativeGroupAssignment buildCreativeGroupAssignment() { |
| var o = api.CreativeGroupAssignment(); |
| buildCounterCreativeGroupAssignment++; |
| if (buildCounterCreativeGroupAssignment < 3) { |
| o.creativeGroupId = 'foo'; |
| o.creativeGroupNumber = 'foo'; |
| } |
| buildCounterCreativeGroupAssignment--; |
| return o; |
| } |
| |
| void checkCreativeGroupAssignment(api.CreativeGroupAssignment o) { |
| buildCounterCreativeGroupAssignment++; |
| if (buildCounterCreativeGroupAssignment < 3) { |
| unittest.expect( |
| o.creativeGroupId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.creativeGroupNumber!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeGroupAssignment--; |
| } |
| |
| core.List<api.CreativeGroup> buildUnnamed5383() { |
| var o = <api.CreativeGroup>[]; |
| o.add(buildCreativeGroup()); |
| o.add(buildCreativeGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5383(core.List<api.CreativeGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeGroup(o[0] as api.CreativeGroup); |
| checkCreativeGroup(o[1] as api.CreativeGroup); |
| } |
| |
| core.int buildCounterCreativeGroupsListResponse = 0; |
| api.CreativeGroupsListResponse buildCreativeGroupsListResponse() { |
| var o = api.CreativeGroupsListResponse(); |
| buildCounterCreativeGroupsListResponse++; |
| if (buildCounterCreativeGroupsListResponse < 3) { |
| o.creativeGroups = buildUnnamed5383(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeGroupsListResponse--; |
| return o; |
| } |
| |
| void checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { |
| buildCounterCreativeGroupsListResponse++; |
| if (buildCounterCreativeGroupsListResponse < 3) { |
| checkUnnamed5383(o.creativeGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeGroupsListResponse--; |
| } |
| |
| core.List<api.OptimizationActivity> buildUnnamed5384() { |
| var o = <api.OptimizationActivity>[]; |
| o.add(buildOptimizationActivity()); |
| o.add(buildOptimizationActivity()); |
| return o; |
| } |
| |
| void checkUnnamed5384(core.List<api.OptimizationActivity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOptimizationActivity(o[0] as api.OptimizationActivity); |
| checkOptimizationActivity(o[1] as api.OptimizationActivity); |
| } |
| |
| core.int buildCounterCreativeOptimizationConfiguration = 0; |
| api.CreativeOptimizationConfiguration buildCreativeOptimizationConfiguration() { |
| var o = api.CreativeOptimizationConfiguration(); |
| buildCounterCreativeOptimizationConfiguration++; |
| if (buildCounterCreativeOptimizationConfiguration < 3) { |
| o.id = 'foo'; |
| o.name = 'foo'; |
| o.optimizationActivitys = buildUnnamed5384(); |
| o.optimizationModel = 'foo'; |
| } |
| buildCounterCreativeOptimizationConfiguration--; |
| return o; |
| } |
| |
| void checkCreativeOptimizationConfiguration( |
| api.CreativeOptimizationConfiguration o) { |
| buildCounterCreativeOptimizationConfiguration++; |
| if (buildCounterCreativeOptimizationConfiguration < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5384(o.optimizationActivitys!); |
| unittest.expect( |
| o.optimizationModel!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeOptimizationConfiguration--; |
| } |
| |
| core.List<api.CreativeAssignment> buildUnnamed5385() { |
| var o = <api.CreativeAssignment>[]; |
| o.add(buildCreativeAssignment()); |
| o.add(buildCreativeAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed5385(core.List<api.CreativeAssignment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeAssignment(o[0] as api.CreativeAssignment); |
| checkCreativeAssignment(o[1] as api.CreativeAssignment); |
| } |
| |
| core.int buildCounterCreativeRotation = 0; |
| api.CreativeRotation buildCreativeRotation() { |
| var o = api.CreativeRotation(); |
| buildCounterCreativeRotation++; |
| if (buildCounterCreativeRotation < 3) { |
| o.creativeAssignments = buildUnnamed5385(); |
| o.creativeOptimizationConfigurationId = 'foo'; |
| o.type = 'foo'; |
| o.weightCalculationStrategy = 'foo'; |
| } |
| buildCounterCreativeRotation--; |
| return o; |
| } |
| |
| void checkCreativeRotation(api.CreativeRotation o) { |
| buildCounterCreativeRotation++; |
| if (buildCounterCreativeRotation < 3) { |
| checkUnnamed5385(o.creativeAssignments!); |
| unittest.expect( |
| o.creativeOptimizationConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.weightCalculationStrategy!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeRotation--; |
| } |
| |
| core.List<api.Creative> buildUnnamed5386() { |
| var o = <api.Creative>[]; |
| o.add(buildCreative()); |
| o.add(buildCreative()); |
| return o; |
| } |
| |
| void checkUnnamed5386(core.List<api.Creative> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreative(o[0] as api.Creative); |
| checkCreative(o[1] as api.Creative); |
| } |
| |
| core.int buildCounterCreativesListResponse = 0; |
| api.CreativesListResponse buildCreativesListResponse() { |
| var o = api.CreativesListResponse(); |
| buildCounterCreativesListResponse++; |
| if (buildCounterCreativesListResponse < 3) { |
| o.creatives = buildUnnamed5386(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativesListResponse--; |
| return o; |
| } |
| |
| void checkCreativesListResponse(api.CreativesListResponse o) { |
| buildCounterCreativesListResponse++; |
| if (buildCounterCreativesListResponse < 3) { |
| checkUnnamed5386(o.creatives!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativesListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5387() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5387(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5388() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5388(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5389() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5389(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Metric> buildUnnamed5390() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5390(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.int buildCounterCrossDimensionReachReportCompatibleFields = 0; |
| api.CrossDimensionReachReportCompatibleFields |
| buildCrossDimensionReachReportCompatibleFields() { |
| var o = api.CrossDimensionReachReportCompatibleFields(); |
| buildCounterCrossDimensionReachReportCompatibleFields++; |
| if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { |
| o.breakdown = buildUnnamed5387(); |
| o.dimensionFilters = buildUnnamed5388(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5389(); |
| o.overlapMetrics = buildUnnamed5390(); |
| } |
| buildCounterCrossDimensionReachReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkCrossDimensionReachReportCompatibleFields( |
| api.CrossDimensionReachReportCompatibleFields o) { |
| buildCounterCrossDimensionReachReportCompatibleFields++; |
| if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { |
| checkUnnamed5387(o.breakdown!); |
| checkUnnamed5388(o.dimensionFilters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5389(o.metrics!); |
| checkUnnamed5390(o.overlapMetrics!); |
| } |
| buildCounterCrossDimensionReachReportCompatibleFields--; |
| } |
| |
| core.List<api.CustomVariable> buildUnnamed5391() { |
| var o = <api.CustomVariable>[]; |
| o.add(buildCustomVariable()); |
| o.add(buildCustomVariable()); |
| return o; |
| } |
| |
| void checkUnnamed5391(core.List<api.CustomVariable> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomVariable(o[0] as api.CustomVariable); |
| checkCustomVariable(o[1] as api.CustomVariable); |
| } |
| |
| core.int buildCounterCustomEvent = 0; |
| api.CustomEvent buildCustomEvent() { |
| var o = api.CustomEvent(); |
| buildCounterCustomEvent++; |
| if (buildCounterCustomEvent < 3) { |
| o.annotateClickEvent = buildCustomEventClickAnnotation(); |
| o.annotateImpressionEvent = buildCustomEventImpressionAnnotation(); |
| o.customVariables = buildUnnamed5391(); |
| o.eventType = 'foo'; |
| o.floodlightConfigurationId = 'foo'; |
| o.insertEvent = buildCustomEventInsert(); |
| o.kind = 'foo'; |
| o.ordinal = 'foo'; |
| o.timestampMicros = 'foo'; |
| } |
| buildCounterCustomEvent--; |
| return o; |
| } |
| |
| void checkCustomEvent(api.CustomEvent o) { |
| buildCounterCustomEvent++; |
| if (buildCounterCustomEvent < 3) { |
| checkCustomEventClickAnnotation( |
| o.annotateClickEvent! as api.CustomEventClickAnnotation); |
| checkCustomEventImpressionAnnotation( |
| o.annotateImpressionEvent! as api.CustomEventImpressionAnnotation); |
| checkUnnamed5391(o.customVariables!); |
| unittest.expect( |
| o.eventType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| checkCustomEventInsert(o.insertEvent! as api.CustomEventInsert); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.ordinal!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.timestampMicros!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEvent--; |
| } |
| |
| core.int buildCounterCustomEventClickAnnotation = 0; |
| api.CustomEventClickAnnotation buildCustomEventClickAnnotation() { |
| var o = api.CustomEventClickAnnotation(); |
| buildCounterCustomEventClickAnnotation++; |
| if (buildCounterCustomEventClickAnnotation < 3) { |
| o.gclid = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterCustomEventClickAnnotation--; |
| return o; |
| } |
| |
| void checkCustomEventClickAnnotation(api.CustomEventClickAnnotation o) { |
| buildCounterCustomEventClickAnnotation++; |
| if (buildCounterCustomEventClickAnnotation < 3) { |
| unittest.expect( |
| o.gclid!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventClickAnnotation--; |
| } |
| |
| core.int buildCounterCustomEventError = 0; |
| api.CustomEventError buildCustomEventError() { |
| var o = api.CustomEventError(); |
| buildCounterCustomEventError++; |
| if (buildCounterCustomEventError < 3) { |
| o.code = 'foo'; |
| o.kind = 'foo'; |
| o.message = 'foo'; |
| } |
| buildCounterCustomEventError--; |
| return o; |
| } |
| |
| void checkCustomEventError(api.CustomEventError o) { |
| buildCounterCustomEventError++; |
| if (buildCounterCustomEventError < 3) { |
| unittest.expect( |
| o.code!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.message!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventError--; |
| } |
| |
| core.int buildCounterCustomEventImpressionAnnotation = 0; |
| api.CustomEventImpressionAnnotation buildCustomEventImpressionAnnotation() { |
| var o = api.CustomEventImpressionAnnotation(); |
| buildCounterCustomEventImpressionAnnotation++; |
| if (buildCounterCustomEventImpressionAnnotation < 3) { |
| o.kind = 'foo'; |
| o.pathImpressionId = 'foo'; |
| } |
| buildCounterCustomEventImpressionAnnotation--; |
| return o; |
| } |
| |
| void checkCustomEventImpressionAnnotation( |
| api.CustomEventImpressionAnnotation o) { |
| buildCounterCustomEventImpressionAnnotation++; |
| if (buildCounterCustomEventImpressionAnnotation < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.pathImpressionId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventImpressionAnnotation--; |
| } |
| |
| core.int buildCounterCustomEventInsert = 0; |
| api.CustomEventInsert buildCustomEventInsert() { |
| var o = api.CustomEventInsert(); |
| buildCounterCustomEventInsert++; |
| if (buildCounterCustomEventInsert < 3) { |
| o.cmDimensions = buildCampaignManagerIds(); |
| o.dv3Dimensions = buildDV3Ids(); |
| o.insertEventType = 'foo'; |
| o.kind = 'foo'; |
| o.matchId = 'foo'; |
| o.mobileDeviceId = 'foo'; |
| } |
| buildCounterCustomEventInsert--; |
| return o; |
| } |
| |
| void checkCustomEventInsert(api.CustomEventInsert o) { |
| buildCounterCustomEventInsert++; |
| if (buildCounterCustomEventInsert < 3) { |
| checkCampaignManagerIds(o.cmDimensions! as api.CampaignManagerIds); |
| checkDV3Ids(o.dv3Dimensions! as api.DV3Ids); |
| unittest.expect( |
| o.insertEventType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.matchId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.mobileDeviceId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventInsert--; |
| } |
| |
| core.List<api.CustomEventError> buildUnnamed5392() { |
| var o = <api.CustomEventError>[]; |
| o.add(buildCustomEventError()); |
| o.add(buildCustomEventError()); |
| return o; |
| } |
| |
| void checkUnnamed5392(core.List<api.CustomEventError> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomEventError(o[0] as api.CustomEventError); |
| checkCustomEventError(o[1] as api.CustomEventError); |
| } |
| |
| core.int buildCounterCustomEventStatus = 0; |
| api.CustomEventStatus buildCustomEventStatus() { |
| var o = api.CustomEventStatus(); |
| buildCounterCustomEventStatus++; |
| if (buildCounterCustomEventStatus < 3) { |
| o.customEvent = buildCustomEvent(); |
| o.errors = buildUnnamed5392(); |
| o.kind = 'foo'; |
| } |
| buildCounterCustomEventStatus--; |
| return o; |
| } |
| |
| void checkCustomEventStatus(api.CustomEventStatus o) { |
| buildCounterCustomEventStatus++; |
| if (buildCounterCustomEventStatus < 3) { |
| checkCustomEvent(o.customEvent! as api.CustomEvent); |
| checkUnnamed5392(o.errors!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventStatus--; |
| } |
| |
| core.List<api.CustomEvent> buildUnnamed5393() { |
| var o = <api.CustomEvent>[]; |
| o.add(buildCustomEvent()); |
| o.add(buildCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5393(core.List<api.CustomEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomEvent(o[0] as api.CustomEvent); |
| checkCustomEvent(o[1] as api.CustomEvent); |
| } |
| |
| core.int buildCounterCustomEventsBatchInsertRequest = 0; |
| api.CustomEventsBatchInsertRequest buildCustomEventsBatchInsertRequest() { |
| var o = api.CustomEventsBatchInsertRequest(); |
| buildCounterCustomEventsBatchInsertRequest++; |
| if (buildCounterCustomEventsBatchInsertRequest < 3) { |
| o.customEvents = buildUnnamed5393(); |
| o.kind = 'foo'; |
| } |
| buildCounterCustomEventsBatchInsertRequest--; |
| return o; |
| } |
| |
| void checkCustomEventsBatchInsertRequest(api.CustomEventsBatchInsertRequest o) { |
| buildCounterCustomEventsBatchInsertRequest++; |
| if (buildCounterCustomEventsBatchInsertRequest < 3) { |
| checkUnnamed5393(o.customEvents!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomEventsBatchInsertRequest--; |
| } |
| |
| core.List<api.CustomEventStatus> buildUnnamed5394() { |
| var o = <api.CustomEventStatus>[]; |
| o.add(buildCustomEventStatus()); |
| o.add(buildCustomEventStatus()); |
| return o; |
| } |
| |
| void checkUnnamed5394(core.List<api.CustomEventStatus> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomEventStatus(o[0] as api.CustomEventStatus); |
| checkCustomEventStatus(o[1] as api.CustomEventStatus); |
| } |
| |
| core.int buildCounterCustomEventsBatchInsertResponse = 0; |
| api.CustomEventsBatchInsertResponse buildCustomEventsBatchInsertResponse() { |
| var o = api.CustomEventsBatchInsertResponse(); |
| buildCounterCustomEventsBatchInsertResponse++; |
| if (buildCounterCustomEventsBatchInsertResponse < 3) { |
| o.hasFailures = true; |
| o.kind = 'foo'; |
| o.status = buildUnnamed5394(); |
| } |
| buildCounterCustomEventsBatchInsertResponse--; |
| return o; |
| } |
| |
| void checkCustomEventsBatchInsertResponse( |
| api.CustomEventsBatchInsertResponse o) { |
| buildCounterCustomEventsBatchInsertResponse++; |
| if (buildCounterCustomEventsBatchInsertResponse < 3) { |
| unittest.expect(o.hasFailures!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5394(o.status!); |
| } |
| buildCounterCustomEventsBatchInsertResponse--; |
| } |
| |
| core.int buildCounterCustomFloodlightVariable = 0; |
| api.CustomFloodlightVariable buildCustomFloodlightVariable() { |
| var o = api.CustomFloodlightVariable(); |
| buildCounterCustomFloodlightVariable++; |
| if (buildCounterCustomFloodlightVariable < 3) { |
| o.kind = 'foo'; |
| o.type = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterCustomFloodlightVariable--; |
| return o; |
| } |
| |
| void checkCustomFloodlightVariable(api.CustomFloodlightVariable o) { |
| buildCounterCustomFloodlightVariable++; |
| if (buildCounterCustomFloodlightVariable < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomFloodlightVariable--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5395() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5395(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.int buildCounterCustomRichMediaEvents = 0; |
| api.CustomRichMediaEvents buildCustomRichMediaEvents() { |
| var o = api.CustomRichMediaEvents(); |
| buildCounterCustomRichMediaEvents++; |
| if (buildCounterCustomRichMediaEvents < 3) { |
| o.filteredEventIds = buildUnnamed5395(); |
| o.kind = 'foo'; |
| } |
| buildCounterCustomRichMediaEvents--; |
| return o; |
| } |
| |
| void checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { |
| buildCounterCustomRichMediaEvents++; |
| if (buildCounterCustomRichMediaEvents < 3) { |
| checkUnnamed5395(o.filteredEventIds!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomRichMediaEvents--; |
| } |
| |
| core.int buildCounterCustomVariable = 0; |
| api.CustomVariable buildCustomVariable() { |
| var o = api.CustomVariable(); |
| buildCounterCustomVariable++; |
| if (buildCounterCustomVariable < 3) { |
| o.index = 'foo'; |
| o.kind = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterCustomVariable--; |
| return o; |
| } |
| |
| void checkCustomVariable(api.CustomVariable o) { |
| buildCounterCustomVariable++; |
| if (buildCounterCustomVariable < 3) { |
| unittest.expect( |
| o.index!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomVariable--; |
| } |
| |
| core.int buildCounterCustomViewabilityMetric = 0; |
| api.CustomViewabilityMetric buildCustomViewabilityMetric() { |
| var o = api.CustomViewabilityMetric(); |
| buildCounterCustomViewabilityMetric++; |
| if (buildCounterCustomViewabilityMetric < 3) { |
| o.configuration = buildCustomViewabilityMetricConfiguration(); |
| o.id = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterCustomViewabilityMetric--; |
| return o; |
| } |
| |
| void checkCustomViewabilityMetric(api.CustomViewabilityMetric o) { |
| buildCounterCustomViewabilityMetric++; |
| if (buildCounterCustomViewabilityMetric < 3) { |
| checkCustomViewabilityMetricConfiguration( |
| o.configuration! as api.CustomViewabilityMetricConfiguration); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomViewabilityMetric--; |
| } |
| |
| core.int buildCounterCustomViewabilityMetricConfiguration = 0; |
| api.CustomViewabilityMetricConfiguration |
| buildCustomViewabilityMetricConfiguration() { |
| var o = api.CustomViewabilityMetricConfiguration(); |
| buildCounterCustomViewabilityMetricConfiguration++; |
| if (buildCounterCustomViewabilityMetricConfiguration < 3) { |
| o.audible = true; |
| o.timeMillis = 42; |
| o.timePercent = 42; |
| o.viewabilityPercent = 42; |
| } |
| buildCounterCustomViewabilityMetricConfiguration--; |
| return o; |
| } |
| |
| void checkCustomViewabilityMetricConfiguration( |
| api.CustomViewabilityMetricConfiguration o) { |
| buildCounterCustomViewabilityMetricConfiguration++; |
| if (buildCounterCustomViewabilityMetricConfiguration < 3) { |
| unittest.expect(o.audible!, unittest.isTrue); |
| unittest.expect( |
| o.timeMillis!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.timePercent!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.viewabilityPercent!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterCustomViewabilityMetricConfiguration--; |
| } |
| |
| core.int buildCounterDV3Ids = 0; |
| api.DV3Ids buildDV3Ids() { |
| var o = api.DV3Ids(); |
| buildCounterDV3Ids++; |
| if (buildCounterDV3Ids < 3) { |
| o.dvCampaignId = 'foo'; |
| o.dvCreativeId = 'foo'; |
| o.dvInsertionOrderId = 'foo'; |
| o.dvLineItemId = 'foo'; |
| o.dvSiteId = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterDV3Ids--; |
| return o; |
| } |
| |
| void checkDV3Ids(api.DV3Ids o) { |
| buildCounterDV3Ids++; |
| if (buildCounterDV3Ids < 3) { |
| unittest.expect( |
| o.dvCampaignId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dvCreativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dvInsertionOrderId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dvLineItemId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dvSiteId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDV3Ids--; |
| } |
| |
| core.int buildCounterDateRange = 0; |
| api.DateRange buildDateRange() { |
| var o = api.DateRange(); |
| buildCounterDateRange++; |
| if (buildCounterDateRange < 3) { |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.kind = 'foo'; |
| o.relativeDateRange = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| } |
| buildCounterDateRange--; |
| return o; |
| } |
| |
| void checkDateRange(api.DateRange o) { |
| buildCounterDateRange++; |
| if (buildCounterDateRange < 3) { |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.relativeDateRange!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| } |
| buildCounterDateRange--; |
| } |
| |
| core.List<core.String> buildUnnamed5396() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5396(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.int> buildUnnamed5397() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed5397(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals(42), |
| ); |
| } |
| |
| core.int buildCounterDayPartTargeting = 0; |
| api.DayPartTargeting buildDayPartTargeting() { |
| var o = api.DayPartTargeting(); |
| buildCounterDayPartTargeting++; |
| if (buildCounterDayPartTargeting < 3) { |
| o.daysOfWeek = buildUnnamed5396(); |
| o.hoursOfDay = buildUnnamed5397(); |
| o.userLocalTime = true; |
| } |
| buildCounterDayPartTargeting--; |
| return o; |
| } |
| |
| void checkDayPartTargeting(api.DayPartTargeting o) { |
| buildCounterDayPartTargeting++; |
| if (buildCounterDayPartTargeting < 3) { |
| checkUnnamed5396(o.daysOfWeek!); |
| checkUnnamed5397(o.hoursOfDay!); |
| unittest.expect(o.userLocalTime!, unittest.isTrue); |
| } |
| buildCounterDayPartTargeting--; |
| } |
| |
| core.List<core.String> buildUnnamed5398() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5398(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterDeepLink = 0; |
| api.DeepLink buildDeepLink() { |
| var o = api.DeepLink(); |
| buildCounterDeepLink++; |
| if (buildCounterDeepLink < 3) { |
| o.appUrl = 'foo'; |
| o.fallbackUrl = 'foo'; |
| o.kind = 'foo'; |
| o.mobileApp = buildMobileApp(); |
| o.remarketingListIds = buildUnnamed5398(); |
| } |
| buildCounterDeepLink--; |
| return o; |
| } |
| |
| void checkDeepLink(api.DeepLink o) { |
| buildCounterDeepLink++; |
| if (buildCounterDeepLink < 3) { |
| unittest.expect( |
| o.appUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.fallbackUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkMobileApp(o.mobileApp! as api.MobileApp); |
| checkUnnamed5398(o.remarketingListIds!); |
| } |
| buildCounterDeepLink--; |
| } |
| |
| core.int buildCounterDefaultClickThroughEventTagProperties = 0; |
| api.DefaultClickThroughEventTagProperties |
| buildDefaultClickThroughEventTagProperties() { |
| var o = api.DefaultClickThroughEventTagProperties(); |
| buildCounterDefaultClickThroughEventTagProperties++; |
| if (buildCounterDefaultClickThroughEventTagProperties < 3) { |
| o.defaultClickThroughEventTagId = 'foo'; |
| o.overrideInheritedEventTag = true; |
| } |
| buildCounterDefaultClickThroughEventTagProperties--; |
| return o; |
| } |
| |
| void checkDefaultClickThroughEventTagProperties( |
| api.DefaultClickThroughEventTagProperties o) { |
| buildCounterDefaultClickThroughEventTagProperties++; |
| if (buildCounterDefaultClickThroughEventTagProperties < 3) { |
| unittest.expect( |
| o.defaultClickThroughEventTagId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.overrideInheritedEventTag!, unittest.isTrue); |
| } |
| buildCounterDefaultClickThroughEventTagProperties--; |
| } |
| |
| core.int buildCounterDeliverySchedule = 0; |
| api.DeliverySchedule buildDeliverySchedule() { |
| var o = api.DeliverySchedule(); |
| buildCounterDeliverySchedule++; |
| if (buildCounterDeliverySchedule < 3) { |
| o.frequencyCap = buildFrequencyCap(); |
| o.hardCutoff = true; |
| o.impressionRatio = 'foo'; |
| o.priority = 'foo'; |
| } |
| buildCounterDeliverySchedule--; |
| return o; |
| } |
| |
| void checkDeliverySchedule(api.DeliverySchedule o) { |
| buildCounterDeliverySchedule++; |
| if (buildCounterDeliverySchedule < 3) { |
| checkFrequencyCap(o.frequencyCap! as api.FrequencyCap); |
| unittest.expect(o.hardCutoff!, unittest.isTrue); |
| unittest.expect( |
| o.impressionRatio!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.priority!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDeliverySchedule--; |
| } |
| |
| core.int buildCounterDfpSettings = 0; |
| api.DfpSettings buildDfpSettings() { |
| var o = api.DfpSettings(); |
| buildCounterDfpSettings++; |
| if (buildCounterDfpSettings < 3) { |
| o.dfpNetworkCode = 'foo'; |
| o.dfpNetworkName = 'foo'; |
| o.programmaticPlacementAccepted = true; |
| o.pubPaidPlacementAccepted = true; |
| o.publisherPortalOnly = true; |
| } |
| buildCounterDfpSettings--; |
| return o; |
| } |
| |
| void checkDfpSettings(api.DfpSettings o) { |
| buildCounterDfpSettings++; |
| if (buildCounterDfpSettings < 3) { |
| unittest.expect( |
| o.dfpNetworkCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dfpNetworkName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.programmaticPlacementAccepted!, unittest.isTrue); |
| unittest.expect(o.pubPaidPlacementAccepted!, unittest.isTrue); |
| unittest.expect(o.publisherPortalOnly!, unittest.isTrue); |
| } |
| buildCounterDfpSettings--; |
| } |
| |
| core.int buildCounterDimension = 0; |
| api.Dimension buildDimension() { |
| var o = api.Dimension(); |
| buildCounterDimension++; |
| if (buildCounterDimension < 3) { |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterDimension--; |
| return o; |
| } |
| |
| void checkDimension(api.Dimension o) { |
| buildCounterDimension++; |
| if (buildCounterDimension < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDimension--; |
| } |
| |
| core.int buildCounterDimensionFilter = 0; |
| api.DimensionFilter buildDimensionFilter() { |
| var o = api.DimensionFilter(); |
| buildCounterDimensionFilter++; |
| if (buildCounterDimensionFilter < 3) { |
| o.dimensionName = 'foo'; |
| o.kind = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterDimensionFilter--; |
| return o; |
| } |
| |
| void checkDimensionFilter(api.DimensionFilter o) { |
| buildCounterDimensionFilter++; |
| if (buildCounterDimensionFilter < 3) { |
| unittest.expect( |
| o.dimensionName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDimensionFilter--; |
| } |
| |
| core.int buildCounterDimensionValue = 0; |
| api.DimensionValue buildDimensionValue() { |
| var o = api.DimensionValue(); |
| buildCounterDimensionValue++; |
| if (buildCounterDimensionValue < 3) { |
| o.dimensionName = 'foo'; |
| o.etag = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.matchType = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterDimensionValue--; |
| return o; |
| } |
| |
| void checkDimensionValue(api.DimensionValue o) { |
| buildCounterDimensionValue++; |
| if (buildCounterDimensionValue < 3) { |
| unittest.expect( |
| o.dimensionName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.matchType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDimensionValue--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5399() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5399(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.int buildCounterDimensionValueList = 0; |
| api.DimensionValueList buildDimensionValueList() { |
| var o = api.DimensionValueList(); |
| buildCounterDimensionValueList++; |
| if (buildCounterDimensionValueList < 3) { |
| o.etag = 'foo'; |
| o.items = buildUnnamed5399(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterDimensionValueList--; |
| return o; |
| } |
| |
| void checkDimensionValueList(api.DimensionValueList o) { |
| buildCounterDimensionValueList++; |
| if (buildCounterDimensionValueList < 3) { |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5399(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDimensionValueList--; |
| } |
| |
| core.List<api.DimensionFilter> buildUnnamed5400() { |
| var o = <api.DimensionFilter>[]; |
| o.add(buildDimensionFilter()); |
| o.add(buildDimensionFilter()); |
| return o; |
| } |
| |
| void checkUnnamed5400(core.List<api.DimensionFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionFilter(o[0] as api.DimensionFilter); |
| checkDimensionFilter(o[1] as api.DimensionFilter); |
| } |
| |
| core.int buildCounterDimensionValueRequest = 0; |
| api.DimensionValueRequest buildDimensionValueRequest() { |
| var o = api.DimensionValueRequest(); |
| buildCounterDimensionValueRequest++; |
| if (buildCounterDimensionValueRequest < 3) { |
| o.dimensionName = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.filters = buildUnnamed5400(); |
| o.kind = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| } |
| buildCounterDimensionValueRequest--; |
| return o; |
| } |
| |
| void checkDimensionValueRequest(api.DimensionValueRequest o) { |
| buildCounterDimensionValueRequest++; |
| if (buildCounterDimensionValueRequest < 3) { |
| unittest.expect( |
| o.dimensionName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| checkUnnamed5400(o.filters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| } |
| buildCounterDimensionValueRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed5401() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5401(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5402() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5402(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterDirectorySite = 0; |
| api.DirectorySite buildDirectorySite() { |
| var o = api.DirectorySite(); |
| buildCounterDirectorySite++; |
| if (buildCounterDirectorySite < 3) { |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.inpageTagFormats = buildUnnamed5401(); |
| o.interstitialTagFormats = buildUnnamed5402(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.settings = buildDirectorySiteSettings(); |
| o.url = 'foo'; |
| } |
| buildCounterDirectorySite--; |
| return o; |
| } |
| |
| void checkDirectorySite(api.DirectorySite o) { |
| buildCounterDirectorySite++; |
| if (buildCounterDirectorySite < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| checkUnnamed5401(o.inpageTagFormats!); |
| checkUnnamed5402(o.interstitialTagFormats!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkDirectorySiteSettings(o.settings! as api.DirectorySiteSettings); |
| unittest.expect( |
| o.url!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDirectorySite--; |
| } |
| |
| core.int buildCounterDirectorySiteSettings = 0; |
| api.DirectorySiteSettings buildDirectorySiteSettings() { |
| var o = api.DirectorySiteSettings(); |
| buildCounterDirectorySiteSettings++; |
| if (buildCounterDirectorySiteSettings < 3) { |
| o.activeViewOptOut = true; |
| o.dfpSettings = buildDfpSettings(); |
| o.instreamVideoPlacementAccepted = true; |
| o.interstitialPlacementAccepted = true; |
| } |
| buildCounterDirectorySiteSettings--; |
| return o; |
| } |
| |
| void checkDirectorySiteSettings(api.DirectorySiteSettings o) { |
| buildCounterDirectorySiteSettings++; |
| if (buildCounterDirectorySiteSettings < 3) { |
| unittest.expect(o.activeViewOptOut!, unittest.isTrue); |
| checkDfpSettings(o.dfpSettings! as api.DfpSettings); |
| unittest.expect(o.instreamVideoPlacementAccepted!, unittest.isTrue); |
| unittest.expect(o.interstitialPlacementAccepted!, unittest.isTrue); |
| } |
| buildCounterDirectorySiteSettings--; |
| } |
| |
| core.List<api.DirectorySite> buildUnnamed5403() { |
| var o = <api.DirectorySite>[]; |
| o.add(buildDirectorySite()); |
| o.add(buildDirectorySite()); |
| return o; |
| } |
| |
| void checkUnnamed5403(core.List<api.DirectorySite> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDirectorySite(o[0] as api.DirectorySite); |
| checkDirectorySite(o[1] as api.DirectorySite); |
| } |
| |
| core.int buildCounterDirectorySitesListResponse = 0; |
| api.DirectorySitesListResponse buildDirectorySitesListResponse() { |
| var o = api.DirectorySitesListResponse(); |
| buildCounterDirectorySitesListResponse++; |
| if (buildCounterDirectorySitesListResponse < 3) { |
| o.directorySites = buildUnnamed5403(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterDirectorySitesListResponse--; |
| return o; |
| } |
| |
| void checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { |
| buildCounterDirectorySitesListResponse++; |
| if (buildCounterDirectorySitesListResponse < 3) { |
| checkUnnamed5403(o.directorySites!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDirectorySitesListResponse--; |
| } |
| |
| core.List<api.EventFilter> buildUnnamed5404() { |
| var o = <api.EventFilter>[]; |
| o.add(buildEventFilter()); |
| o.add(buildEventFilter()); |
| return o; |
| } |
| |
| void checkUnnamed5404(core.List<api.EventFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEventFilter(o[0] as api.EventFilter); |
| checkEventFilter(o[1] as api.EventFilter); |
| } |
| |
| core.int buildCounterDisjunctiveMatchStatement = 0; |
| api.DisjunctiveMatchStatement buildDisjunctiveMatchStatement() { |
| var o = api.DisjunctiveMatchStatement(); |
| buildCounterDisjunctiveMatchStatement++; |
| if (buildCounterDisjunctiveMatchStatement < 3) { |
| o.eventFilters = buildUnnamed5404(); |
| o.kind = 'foo'; |
| } |
| buildCounterDisjunctiveMatchStatement--; |
| return o; |
| } |
| |
| void checkDisjunctiveMatchStatement(api.DisjunctiveMatchStatement o) { |
| buildCounterDisjunctiveMatchStatement++; |
| if (buildCounterDisjunctiveMatchStatement < 3) { |
| checkUnnamed5404(o.eventFilters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDisjunctiveMatchStatement--; |
| } |
| |
| core.int buildCounterDynamicTargetingKey = 0; |
| api.DynamicTargetingKey buildDynamicTargetingKey() { |
| var o = api.DynamicTargetingKey(); |
| buildCounterDynamicTargetingKey++; |
| if (buildCounterDynamicTargetingKey < 3) { |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.objectId = 'foo'; |
| o.objectType = 'foo'; |
| } |
| buildCounterDynamicTargetingKey--; |
| return o; |
| } |
| |
| void checkDynamicTargetingKey(api.DynamicTargetingKey o) { |
| buildCounterDynamicTargetingKey++; |
| if (buildCounterDynamicTargetingKey < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.objectId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.objectType!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDynamicTargetingKey--; |
| } |
| |
| core.List<api.DynamicTargetingKey> buildUnnamed5405() { |
| var o = <api.DynamicTargetingKey>[]; |
| o.add(buildDynamicTargetingKey()); |
| o.add(buildDynamicTargetingKey()); |
| return o; |
| } |
| |
| void checkUnnamed5405(core.List<api.DynamicTargetingKey> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDynamicTargetingKey(o[0] as api.DynamicTargetingKey); |
| checkDynamicTargetingKey(o[1] as api.DynamicTargetingKey); |
| } |
| |
| core.int buildCounterDynamicTargetingKeysListResponse = 0; |
| api.DynamicTargetingKeysListResponse buildDynamicTargetingKeysListResponse() { |
| var o = api.DynamicTargetingKeysListResponse(); |
| buildCounterDynamicTargetingKeysListResponse++; |
| if (buildCounterDynamicTargetingKeysListResponse < 3) { |
| o.dynamicTargetingKeys = buildUnnamed5405(); |
| o.kind = 'foo'; |
| } |
| buildCounterDynamicTargetingKeysListResponse--; |
| return o; |
| } |
| |
| void checkDynamicTargetingKeysListResponse( |
| api.DynamicTargetingKeysListResponse o) { |
| buildCounterDynamicTargetingKeysListResponse++; |
| if (buildCounterDynamicTargetingKeysListResponse < 3) { |
| checkUnnamed5405(o.dynamicTargetingKeys!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDynamicTargetingKeysListResponse--; |
| } |
| |
| core.int buildCounterEncryptionInfo = 0; |
| api.EncryptionInfo buildEncryptionInfo() { |
| var o = api.EncryptionInfo(); |
| buildCounterEncryptionInfo++; |
| if (buildCounterEncryptionInfo < 3) { |
| o.encryptionEntityId = 'foo'; |
| o.encryptionEntityType = 'foo'; |
| o.encryptionSource = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterEncryptionInfo--; |
| return o; |
| } |
| |
| void checkEncryptionInfo(api.EncryptionInfo o) { |
| buildCounterEncryptionInfo++; |
| if (buildCounterEncryptionInfo < 3) { |
| unittest.expect( |
| o.encryptionEntityId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.encryptionEntityType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.encryptionSource!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterEncryptionInfo--; |
| } |
| |
| core.int buildCounterEventFilter = 0; |
| api.EventFilter buildEventFilter() { |
| var o = api.EventFilter(); |
| buildCounterEventFilter++; |
| if (buildCounterEventFilter < 3) { |
| o.dimensionFilter = buildPathReportDimensionValue(); |
| o.kind = 'foo'; |
| } |
| buildCounterEventFilter--; |
| return o; |
| } |
| |
| void checkEventFilter(api.EventFilter o) { |
| buildCounterEventFilter++; |
| if (buildCounterEventFilter < 3) { |
| checkPathReportDimensionValue( |
| o.dimensionFilter! as api.PathReportDimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterEventFilter--; |
| } |
| |
| core.List<core.String> buildUnnamed5406() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5406(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterEventTag = 0; |
| api.EventTag buildEventTag() { |
| var o = api.EventTag(); |
| buildCounterEventTag++; |
| if (buildCounterEventTag < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.campaignId = 'foo'; |
| o.campaignIdDimensionValue = buildDimensionValue(); |
| o.enabledByDefault = true; |
| o.excludeFromAdxRequests = true; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.siteFilterType = 'foo'; |
| o.siteIds = buildUnnamed5406(); |
| o.sslCompliant = true; |
| o.status = 'foo'; |
| o.subaccountId = 'foo'; |
| o.type = 'foo'; |
| o.url = 'foo'; |
| o.urlEscapeLevels = 42; |
| } |
| buildCounterEventTag--; |
| return o; |
| } |
| |
| void checkEventTag(api.EventTag o) { |
| buildCounterEventTag++; |
| if (buildCounterEventTag < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.campaignId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.campaignIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.enabledByDefault!, unittest.isTrue); |
| unittest.expect(o.excludeFromAdxRequests!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.siteFilterType!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5406(o.siteIds!); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.url!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.urlEscapeLevels!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterEventTag--; |
| } |
| |
| core.int buildCounterEventTagOverride = 0; |
| api.EventTagOverride buildEventTagOverride() { |
| var o = api.EventTagOverride(); |
| buildCounterEventTagOverride++; |
| if (buildCounterEventTagOverride < 3) { |
| o.enabled = true; |
| o.id = 'foo'; |
| } |
| buildCounterEventTagOverride--; |
| return o; |
| } |
| |
| void checkEventTagOverride(api.EventTagOverride o) { |
| buildCounterEventTagOverride++; |
| if (buildCounterEventTagOverride < 3) { |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterEventTagOverride--; |
| } |
| |
| core.List<api.EventTag> buildUnnamed5407() { |
| var o = <api.EventTag>[]; |
| o.add(buildEventTag()); |
| o.add(buildEventTag()); |
| return o; |
| } |
| |
| void checkUnnamed5407(core.List<api.EventTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEventTag(o[0] as api.EventTag); |
| checkEventTag(o[1] as api.EventTag); |
| } |
| |
| core.int buildCounterEventTagsListResponse = 0; |
| api.EventTagsListResponse buildEventTagsListResponse() { |
| var o = api.EventTagsListResponse(); |
| buildCounterEventTagsListResponse++; |
| if (buildCounterEventTagsListResponse < 3) { |
| o.eventTags = buildUnnamed5407(); |
| o.kind = 'foo'; |
| } |
| buildCounterEventTagsListResponse--; |
| return o; |
| } |
| |
| void checkEventTagsListResponse(api.EventTagsListResponse o) { |
| buildCounterEventTagsListResponse++; |
| if (buildCounterEventTagsListResponse < 3) { |
| checkUnnamed5407(o.eventTags!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterEventTagsListResponse--; |
| } |
| |
| core.int buildCounterFileUrls = 0; |
| api.FileUrls buildFileUrls() { |
| var o = api.FileUrls(); |
| buildCounterFileUrls++; |
| if (buildCounterFileUrls < 3) { |
| o.apiUrl = 'foo'; |
| o.browserUrl = 'foo'; |
| } |
| buildCounterFileUrls--; |
| return o; |
| } |
| |
| void checkFileUrls(api.FileUrls o) { |
| buildCounterFileUrls++; |
| if (buildCounterFileUrls < 3) { |
| unittest.expect( |
| o.apiUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.browserUrl!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFileUrls--; |
| } |
| |
| core.int buildCounterFile = 0; |
| api.File buildFile() { |
| var o = api.File(); |
| buildCounterFile++; |
| if (buildCounterFile < 3) { |
| o.dateRange = buildDateRange(); |
| o.etag = 'foo'; |
| o.fileName = 'foo'; |
| o.format = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastModifiedTime = 'foo'; |
| o.reportId = 'foo'; |
| o.status = 'foo'; |
| o.urls = buildFileUrls(); |
| } |
| buildCounterFile--; |
| return o; |
| } |
| |
| void checkFile(api.File o) { |
| buildCounterFile++; |
| if (buildCounterFile < 3) { |
| checkDateRange(o.dateRange! as api.DateRange); |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.fileName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.format!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.lastModifiedTime!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.reportId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| checkFileUrls(o.urls! as api.FileUrls); |
| } |
| buildCounterFile--; |
| } |
| |
| core.List<api.File> buildUnnamed5408() { |
| var o = <api.File>[]; |
| o.add(buildFile()); |
| o.add(buildFile()); |
| return o; |
| } |
| |
| void checkUnnamed5408(core.List<api.File> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFile(o[0] as api.File); |
| checkFile(o[1] as api.File); |
| } |
| |
| core.int buildCounterFileList = 0; |
| api.FileList buildFileList() { |
| var o = api.FileList(); |
| buildCounterFileList++; |
| if (buildCounterFileList < 3) { |
| o.etag = 'foo'; |
| o.items = buildUnnamed5408(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterFileList--; |
| return o; |
| } |
| |
| void checkFileList(api.FileList o) { |
| buildCounterFileList++; |
| if (buildCounterFileList < 3) { |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5408(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFileList--; |
| } |
| |
| core.int buildCounterFlight = 0; |
| api.Flight buildFlight() { |
| var o = api.Flight(); |
| buildCounterFlight++; |
| if (buildCounterFlight < 3) { |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.rateOrCost = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.units = 'foo'; |
| } |
| buildCounterFlight--; |
| return o; |
| } |
| |
| void checkFlight(api.Flight o) { |
| buildCounterFlight++; |
| if (buildCounterFlight < 3) { |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.rateOrCost!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.units!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFlight--; |
| } |
| |
| core.int buildCounterFloodlightActivitiesGenerateTagResponse = 0; |
| api.FloodlightActivitiesGenerateTagResponse |
| buildFloodlightActivitiesGenerateTagResponse() { |
| var o = api.FloodlightActivitiesGenerateTagResponse(); |
| buildCounterFloodlightActivitiesGenerateTagResponse++; |
| if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { |
| o.floodlightActivityTag = 'foo'; |
| o.globalSiteTagGlobalSnippet = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterFloodlightActivitiesGenerateTagResponse--; |
| return o; |
| } |
| |
| void checkFloodlightActivitiesGenerateTagResponse( |
| api.FloodlightActivitiesGenerateTagResponse o) { |
| buildCounterFloodlightActivitiesGenerateTagResponse++; |
| if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { |
| unittest.expect( |
| o.floodlightActivityTag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.globalSiteTagGlobalSnippet!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivitiesGenerateTagResponse--; |
| } |
| |
| core.List<api.FloodlightActivity> buildUnnamed5409() { |
| var o = <api.FloodlightActivity>[]; |
| o.add(buildFloodlightActivity()); |
| o.add(buildFloodlightActivity()); |
| return o; |
| } |
| |
| void checkUnnamed5409(core.List<api.FloodlightActivity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFloodlightActivity(o[0] as api.FloodlightActivity); |
| checkFloodlightActivity(o[1] as api.FloodlightActivity); |
| } |
| |
| core.int buildCounterFloodlightActivitiesListResponse = 0; |
| api.FloodlightActivitiesListResponse buildFloodlightActivitiesListResponse() { |
| var o = api.FloodlightActivitiesListResponse(); |
| buildCounterFloodlightActivitiesListResponse++; |
| if (buildCounterFloodlightActivitiesListResponse < 3) { |
| o.floodlightActivities = buildUnnamed5409(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterFloodlightActivitiesListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightActivitiesListResponse( |
| api.FloodlightActivitiesListResponse o) { |
| buildCounterFloodlightActivitiesListResponse++; |
| if (buildCounterFloodlightActivitiesListResponse < 3) { |
| checkUnnamed5409(o.floodlightActivities!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivitiesListResponse--; |
| } |
| |
| core.List<api.FloodlightActivityDynamicTag> buildUnnamed5410() { |
| var o = <api.FloodlightActivityDynamicTag>[]; |
| o.add(buildFloodlightActivityDynamicTag()); |
| o.add(buildFloodlightActivityDynamicTag()); |
| return o; |
| } |
| |
| void checkUnnamed5410(core.List<api.FloodlightActivityDynamicTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFloodlightActivityDynamicTag(o[0] as api.FloodlightActivityDynamicTag); |
| checkFloodlightActivityDynamicTag(o[1] as api.FloodlightActivityDynamicTag); |
| } |
| |
| core.List<api.FloodlightActivityPublisherDynamicTag> buildUnnamed5411() { |
| var o = <api.FloodlightActivityPublisherDynamicTag>[]; |
| o.add(buildFloodlightActivityPublisherDynamicTag()); |
| o.add(buildFloodlightActivityPublisherDynamicTag()); |
| return o; |
| } |
| |
| void checkUnnamed5411(core.List<api.FloodlightActivityPublisherDynamicTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFloodlightActivityPublisherDynamicTag( |
| o[0] as api.FloodlightActivityPublisherDynamicTag); |
| checkFloodlightActivityPublisherDynamicTag( |
| o[1] as api.FloodlightActivityPublisherDynamicTag); |
| } |
| |
| core.List<core.String> buildUnnamed5412() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5412(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterFloodlightActivity = 0; |
| api.FloodlightActivity buildFloodlightActivity() { |
| var o = api.FloodlightActivity(); |
| buildCounterFloodlightActivity++; |
| if (buildCounterFloodlightActivity < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.attributionEnabled = true; |
| o.cacheBustingType = 'foo'; |
| o.countingMethod = 'foo'; |
| o.defaultTags = buildUnnamed5410(); |
| o.expectedUrl = 'foo'; |
| o.floodlightActivityGroupId = 'foo'; |
| o.floodlightActivityGroupName = 'foo'; |
| o.floodlightActivityGroupTagString = 'foo'; |
| o.floodlightActivityGroupType = 'foo'; |
| o.floodlightConfigurationId = 'foo'; |
| o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); |
| o.floodlightTagType = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.notes = 'foo'; |
| o.publisherTags = buildUnnamed5411(); |
| o.secure = true; |
| o.sslCompliant = true; |
| o.sslRequired = true; |
| o.status = 'foo'; |
| o.subaccountId = 'foo'; |
| o.tagFormat = 'foo'; |
| o.tagString = 'foo'; |
| o.userDefinedVariableTypes = buildUnnamed5412(); |
| } |
| buildCounterFloodlightActivity--; |
| return o; |
| } |
| |
| void checkFloodlightActivity(api.FloodlightActivity o) { |
| buildCounterFloodlightActivity++; |
| if (buildCounterFloodlightActivity < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.attributionEnabled!, unittest.isTrue); |
| unittest.expect( |
| o.cacheBustingType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countingMethod!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5410(o.defaultTags!); |
| unittest.expect( |
| o.expectedUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightActivityGroupId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightActivityGroupName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightActivityGroupTagString!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightActivityGroupType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.floodlightConfigurationIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.floodlightTagType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.notes!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5411(o.publisherTags!); |
| unittest.expect(o.secure!, unittest.isTrue); |
| unittest.expect(o.sslCompliant!, unittest.isTrue); |
| unittest.expect(o.sslRequired!, unittest.isTrue); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.tagFormat!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.tagString!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5412(o.userDefinedVariableTypes!); |
| } |
| buildCounterFloodlightActivity--; |
| } |
| |
| core.int buildCounterFloodlightActivityDynamicTag = 0; |
| api.FloodlightActivityDynamicTag buildFloodlightActivityDynamicTag() { |
| var o = api.FloodlightActivityDynamicTag(); |
| buildCounterFloodlightActivityDynamicTag++; |
| if (buildCounterFloodlightActivityDynamicTag < 3) { |
| o.id = 'foo'; |
| o.name = 'foo'; |
| o.tag = 'foo'; |
| } |
| buildCounterFloodlightActivityDynamicTag--; |
| return o; |
| } |
| |
| void checkFloodlightActivityDynamicTag(api.FloodlightActivityDynamicTag o) { |
| buildCounterFloodlightActivityDynamicTag++; |
| if (buildCounterFloodlightActivityDynamicTag < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.tag!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivityDynamicTag--; |
| } |
| |
| core.int buildCounterFloodlightActivityGroup = 0; |
| api.FloodlightActivityGroup buildFloodlightActivityGroup() { |
| var o = api.FloodlightActivityGroup(); |
| buildCounterFloodlightActivityGroup++; |
| if (buildCounterFloodlightActivityGroup < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.floodlightConfigurationId = 'foo'; |
| o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| o.tagString = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterFloodlightActivityGroup--; |
| return o; |
| } |
| |
| void checkFloodlightActivityGroup(api.FloodlightActivityGroup o) { |
| buildCounterFloodlightActivityGroup++; |
| if (buildCounterFloodlightActivityGroup < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.floodlightConfigurationId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.floodlightConfigurationIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.tagString!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivityGroup--; |
| } |
| |
| core.List<api.FloodlightActivityGroup> buildUnnamed5413() { |
| var o = <api.FloodlightActivityGroup>[]; |
| o.add(buildFloodlightActivityGroup()); |
| o.add(buildFloodlightActivityGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5413(core.List<api.FloodlightActivityGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFloodlightActivityGroup(o[0] as api.FloodlightActivityGroup); |
| checkFloodlightActivityGroup(o[1] as api.FloodlightActivityGroup); |
| } |
| |
| core.int buildCounterFloodlightActivityGroupsListResponse = 0; |
| api.FloodlightActivityGroupsListResponse |
| buildFloodlightActivityGroupsListResponse() { |
| var o = api.FloodlightActivityGroupsListResponse(); |
| buildCounterFloodlightActivityGroupsListResponse++; |
| if (buildCounterFloodlightActivityGroupsListResponse < 3) { |
| o.floodlightActivityGroups = buildUnnamed5413(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterFloodlightActivityGroupsListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightActivityGroupsListResponse( |
| api.FloodlightActivityGroupsListResponse o) { |
| buildCounterFloodlightActivityGroupsListResponse++; |
| if (buildCounterFloodlightActivityGroupsListResponse < 3) { |
| checkUnnamed5413(o.floodlightActivityGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivityGroupsListResponse--; |
| } |
| |
| core.int buildCounterFloodlightActivityPublisherDynamicTag = 0; |
| api.FloodlightActivityPublisherDynamicTag |
| buildFloodlightActivityPublisherDynamicTag() { |
| var o = api.FloodlightActivityPublisherDynamicTag(); |
| buildCounterFloodlightActivityPublisherDynamicTag++; |
| if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { |
| o.clickThrough = true; |
| o.directorySiteId = 'foo'; |
| o.dynamicTag = buildFloodlightActivityDynamicTag(); |
| o.siteId = 'foo'; |
| o.siteIdDimensionValue = buildDimensionValue(); |
| o.viewThrough = true; |
| } |
| buildCounterFloodlightActivityPublisherDynamicTag--; |
| return o; |
| } |
| |
| void checkFloodlightActivityPublisherDynamicTag( |
| api.FloodlightActivityPublisherDynamicTag o) { |
| buildCounterFloodlightActivityPublisherDynamicTag++; |
| if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { |
| unittest.expect(o.clickThrough!, unittest.isTrue); |
| unittest.expect( |
| o.directorySiteId!, |
| unittest.equals('foo'), |
| ); |
| checkFloodlightActivityDynamicTag( |
| o.dynamicTag! as api.FloodlightActivityDynamicTag); |
| unittest.expect( |
| o.siteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.siteIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.viewThrough!, unittest.isTrue); |
| } |
| buildCounterFloodlightActivityPublisherDynamicTag--; |
| } |
| |
| core.List<api.ThirdPartyAuthenticationToken> buildUnnamed5414() { |
| var o = <api.ThirdPartyAuthenticationToken>[]; |
| o.add(buildThirdPartyAuthenticationToken()); |
| o.add(buildThirdPartyAuthenticationToken()); |
| return o; |
| } |
| |
| void checkUnnamed5414(core.List<api.ThirdPartyAuthenticationToken> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkThirdPartyAuthenticationToken(o[0] as api.ThirdPartyAuthenticationToken); |
| checkThirdPartyAuthenticationToken(o[1] as api.ThirdPartyAuthenticationToken); |
| } |
| |
| core.List<api.UserDefinedVariableConfiguration> buildUnnamed5415() { |
| var o = <api.UserDefinedVariableConfiguration>[]; |
| o.add(buildUserDefinedVariableConfiguration()); |
| o.add(buildUserDefinedVariableConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed5415(core.List<api.UserDefinedVariableConfiguration> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserDefinedVariableConfiguration( |
| o[0] as api.UserDefinedVariableConfiguration); |
| checkUserDefinedVariableConfiguration( |
| o[1] as api.UserDefinedVariableConfiguration); |
| } |
| |
| core.int buildCounterFloodlightConfiguration = 0; |
| api.FloodlightConfiguration buildFloodlightConfiguration() { |
| var o = api.FloodlightConfiguration(); |
| buildCounterFloodlightConfiguration++; |
| if (buildCounterFloodlightConfiguration < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.analyticsDataSharingEnabled = true; |
| o.customViewabilityMetric = buildCustomViewabilityMetric(); |
| o.exposureToConversionEnabled = true; |
| o.firstDayOfWeek = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.inAppAttributionTrackingEnabled = true; |
| o.kind = 'foo'; |
| o.lookbackConfiguration = buildLookbackConfiguration(); |
| o.naturalSearchConversionAttributionOption = 'foo'; |
| o.omnitureSettings = buildOmnitureSettings(); |
| o.subaccountId = 'foo'; |
| o.tagSettings = buildTagSettings(); |
| o.thirdPartyAuthenticationTokens = buildUnnamed5414(); |
| o.userDefinedVariableConfigurations = buildUnnamed5415(); |
| } |
| buildCounterFloodlightConfiguration--; |
| return o; |
| } |
| |
| void checkFloodlightConfiguration(api.FloodlightConfiguration o) { |
| buildCounterFloodlightConfiguration++; |
| if (buildCounterFloodlightConfiguration < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.analyticsDataSharingEnabled!, unittest.isTrue); |
| checkCustomViewabilityMetric( |
| o.customViewabilityMetric! as api.CustomViewabilityMetric); |
| unittest.expect(o.exposureToConversionEnabled!, unittest.isTrue); |
| unittest.expect( |
| o.firstDayOfWeek!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect(o.inAppAttributionTrackingEnabled!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLookbackConfiguration( |
| o.lookbackConfiguration! as api.LookbackConfiguration); |
| unittest.expect( |
| o.naturalSearchConversionAttributionOption!, |
| unittest.equals('foo'), |
| ); |
| checkOmnitureSettings(o.omnitureSettings! as api.OmnitureSettings); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| checkTagSettings(o.tagSettings! as api.TagSettings); |
| checkUnnamed5414(o.thirdPartyAuthenticationTokens!); |
| checkUnnamed5415(o.userDefinedVariableConfigurations!); |
| } |
| buildCounterFloodlightConfiguration--; |
| } |
| |
| core.List<api.FloodlightConfiguration> buildUnnamed5416() { |
| var o = <api.FloodlightConfiguration>[]; |
| o.add(buildFloodlightConfiguration()); |
| o.add(buildFloodlightConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed5416(core.List<api.FloodlightConfiguration> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFloodlightConfiguration(o[0] as api.FloodlightConfiguration); |
| checkFloodlightConfiguration(o[1] as api.FloodlightConfiguration); |
| } |
| |
| core.int buildCounterFloodlightConfigurationsListResponse = 0; |
| api.FloodlightConfigurationsListResponse |
| buildFloodlightConfigurationsListResponse() { |
| var o = api.FloodlightConfigurationsListResponse(); |
| buildCounterFloodlightConfigurationsListResponse++; |
| if (buildCounterFloodlightConfigurationsListResponse < 3) { |
| o.floodlightConfigurations = buildUnnamed5416(); |
| o.kind = 'foo'; |
| } |
| buildCounterFloodlightConfigurationsListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightConfigurationsListResponse( |
| api.FloodlightConfigurationsListResponse o) { |
| buildCounterFloodlightConfigurationsListResponse++; |
| if (buildCounterFloodlightConfigurationsListResponse < 3) { |
| checkUnnamed5416(o.floodlightConfigurations!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightConfigurationsListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5417() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5417(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5418() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5418(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5419() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5419(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.int buildCounterFloodlightReportCompatibleFields = 0; |
| api.FloodlightReportCompatibleFields buildFloodlightReportCompatibleFields() { |
| var o = api.FloodlightReportCompatibleFields(); |
| buildCounterFloodlightReportCompatibleFields++; |
| if (buildCounterFloodlightReportCompatibleFields < 3) { |
| o.dimensionFilters = buildUnnamed5417(); |
| o.dimensions = buildUnnamed5418(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5419(); |
| } |
| buildCounterFloodlightReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkFloodlightReportCompatibleFields( |
| api.FloodlightReportCompatibleFields o) { |
| buildCounterFloodlightReportCompatibleFields++; |
| if (buildCounterFloodlightReportCompatibleFields < 3) { |
| checkUnnamed5417(o.dimensionFilters!); |
| checkUnnamed5418(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5419(o.metrics!); |
| } |
| buildCounterFloodlightReportCompatibleFields--; |
| } |
| |
| core.int buildCounterFrequencyCap = 0; |
| api.FrequencyCap buildFrequencyCap() { |
| var o = api.FrequencyCap(); |
| buildCounterFrequencyCap++; |
| if (buildCounterFrequencyCap < 3) { |
| o.duration = 'foo'; |
| o.impressions = 'foo'; |
| } |
| buildCounterFrequencyCap--; |
| return o; |
| } |
| |
| void checkFrequencyCap(api.FrequencyCap o) { |
| buildCounterFrequencyCap++; |
| if (buildCounterFrequencyCap < 3) { |
| unittest.expect( |
| o.duration!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.impressions!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFrequencyCap--; |
| } |
| |
| core.int buildCounterFsCommand = 0; |
| api.FsCommand buildFsCommand() { |
| var o = api.FsCommand(); |
| buildCounterFsCommand++; |
| if (buildCounterFsCommand < 3) { |
| o.left = 42; |
| o.positionOption = 'foo'; |
| o.top = 42; |
| o.windowHeight = 42; |
| o.windowWidth = 42; |
| } |
| buildCounterFsCommand--; |
| return o; |
| } |
| |
| void checkFsCommand(api.FsCommand o) { |
| buildCounterFsCommand++; |
| if (buildCounterFsCommand < 3) { |
| unittest.expect( |
| o.left!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.positionOption!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.top!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.windowHeight!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.windowWidth!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterFsCommand--; |
| } |
| |
| core.List<api.City> buildUnnamed5420() { |
| var o = <api.City>[]; |
| o.add(buildCity()); |
| o.add(buildCity()); |
| return o; |
| } |
| |
| void checkUnnamed5420(core.List<api.City> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCity(o[0] as api.City); |
| checkCity(o[1] as api.City); |
| } |
| |
| core.List<api.Country> buildUnnamed5421() { |
| var o = <api.Country>[]; |
| o.add(buildCountry()); |
| o.add(buildCountry()); |
| return o; |
| } |
| |
| void checkUnnamed5421(core.List<api.Country> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCountry(o[0] as api.Country); |
| checkCountry(o[1] as api.Country); |
| } |
| |
| core.List<api.Metro> buildUnnamed5422() { |
| var o = <api.Metro>[]; |
| o.add(buildMetro()); |
| o.add(buildMetro()); |
| return o; |
| } |
| |
| void checkUnnamed5422(core.List<api.Metro> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetro(o[0] as api.Metro); |
| checkMetro(o[1] as api.Metro); |
| } |
| |
| core.List<api.PostalCode> buildUnnamed5423() { |
| var o = <api.PostalCode>[]; |
| o.add(buildPostalCode()); |
| o.add(buildPostalCode()); |
| return o; |
| } |
| |
| void checkUnnamed5423(core.List<api.PostalCode> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPostalCode(o[0] as api.PostalCode); |
| checkPostalCode(o[1] as api.PostalCode); |
| } |
| |
| core.List<api.Region> buildUnnamed5424() { |
| var o = <api.Region>[]; |
| o.add(buildRegion()); |
| o.add(buildRegion()); |
| return o; |
| } |
| |
| void checkUnnamed5424(core.List<api.Region> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRegion(o[0] as api.Region); |
| checkRegion(o[1] as api.Region); |
| } |
| |
| core.int buildCounterGeoTargeting = 0; |
| api.GeoTargeting buildGeoTargeting() { |
| var o = api.GeoTargeting(); |
| buildCounterGeoTargeting++; |
| if (buildCounterGeoTargeting < 3) { |
| o.cities = buildUnnamed5420(); |
| o.countries = buildUnnamed5421(); |
| o.excludeCountries = true; |
| o.metros = buildUnnamed5422(); |
| o.postalCodes = buildUnnamed5423(); |
| o.regions = buildUnnamed5424(); |
| } |
| buildCounterGeoTargeting--; |
| return o; |
| } |
| |
| void checkGeoTargeting(api.GeoTargeting o) { |
| buildCounterGeoTargeting++; |
| if (buildCounterGeoTargeting < 3) { |
| checkUnnamed5420(o.cities!); |
| checkUnnamed5421(o.countries!); |
| unittest.expect(o.excludeCountries!, unittest.isTrue); |
| checkUnnamed5422(o.metros!); |
| checkUnnamed5423(o.postalCodes!); |
| checkUnnamed5424(o.regions!); |
| } |
| buildCounterGeoTargeting--; |
| } |
| |
| core.List<api.AdSlot> buildUnnamed5425() { |
| var o = <api.AdSlot>[]; |
| o.add(buildAdSlot()); |
| o.add(buildAdSlot()); |
| return o; |
| } |
| |
| void checkUnnamed5425(core.List<api.AdSlot> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdSlot(o[0] as api.AdSlot); |
| checkAdSlot(o[1] as api.AdSlot); |
| } |
| |
| core.int buildCounterInventoryItem = 0; |
| api.InventoryItem buildInventoryItem() { |
| var o = api.InventoryItem(); |
| buildCounterInventoryItem++; |
| if (buildCounterInventoryItem < 3) { |
| o.accountId = 'foo'; |
| o.adSlots = buildUnnamed5425(); |
| o.advertiserId = 'foo'; |
| o.contentCategoryId = 'foo'; |
| o.estimatedClickThroughRate = 'foo'; |
| o.estimatedConversionRate = 'foo'; |
| o.id = 'foo'; |
| o.inPlan = true; |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.negotiationChannelId = 'foo'; |
| o.orderId = 'foo'; |
| o.placementStrategyId = 'foo'; |
| o.pricing = buildPricing(); |
| o.projectId = 'foo'; |
| o.rfpId = 'foo'; |
| o.siteId = 'foo'; |
| o.subaccountId = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterInventoryItem--; |
| return o; |
| } |
| |
| void checkInventoryItem(api.InventoryItem o) { |
| buildCounterInventoryItem++; |
| if (buildCounterInventoryItem < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5425(o.adSlots!); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contentCategoryId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.estimatedClickThroughRate!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.estimatedConversionRate!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.inPlan!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.negotiationChannelId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.orderId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.placementStrategyId!, |
| unittest.equals('foo'), |
| ); |
| checkPricing(o.pricing! as api.Pricing); |
| unittest.expect( |
| o.projectId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.rfpId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.siteId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterInventoryItem--; |
| } |
| |
| core.List<api.InventoryItem> buildUnnamed5426() { |
| var o = <api.InventoryItem>[]; |
| o.add(buildInventoryItem()); |
| o.add(buildInventoryItem()); |
| return o; |
| } |
| |
| void checkUnnamed5426(core.List<api.InventoryItem> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkInventoryItem(o[0] as api.InventoryItem); |
| checkInventoryItem(o[1] as api.InventoryItem); |
| } |
| |
| core.int buildCounterInventoryItemsListResponse = 0; |
| api.InventoryItemsListResponse buildInventoryItemsListResponse() { |
| var o = api.InventoryItemsListResponse(); |
| buildCounterInventoryItemsListResponse++; |
| if (buildCounterInventoryItemsListResponse < 3) { |
| o.inventoryItems = buildUnnamed5426(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterInventoryItemsListResponse--; |
| return o; |
| } |
| |
| void checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { |
| buildCounterInventoryItemsListResponse++; |
| if (buildCounterInventoryItemsListResponse < 3) { |
| checkUnnamed5426(o.inventoryItems!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterInventoryItemsListResponse--; |
| } |
| |
| core.int buildCounterKeyValueTargetingExpression = 0; |
| api.KeyValueTargetingExpression buildKeyValueTargetingExpression() { |
| var o = api.KeyValueTargetingExpression(); |
| buildCounterKeyValueTargetingExpression++; |
| if (buildCounterKeyValueTargetingExpression < 3) { |
| o.expression = 'foo'; |
| } |
| buildCounterKeyValueTargetingExpression--; |
| return o; |
| } |
| |
| void checkKeyValueTargetingExpression(api.KeyValueTargetingExpression o) { |
| buildCounterKeyValueTargetingExpression++; |
| if (buildCounterKeyValueTargetingExpression < 3) { |
| unittest.expect( |
| o.expression!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterKeyValueTargetingExpression--; |
| } |
| |
| core.List<api.DeepLink> buildUnnamed5427() { |
| var o = <api.DeepLink>[]; |
| o.add(buildDeepLink()); |
| o.add(buildDeepLink()); |
| return o; |
| } |
| |
| void checkUnnamed5427(core.List<api.DeepLink> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDeepLink(o[0] as api.DeepLink); |
| checkDeepLink(o[1] as api.DeepLink); |
| } |
| |
| core.int buildCounterLandingPage = 0; |
| api.LandingPage buildLandingPage() { |
| var o = api.LandingPage(); |
| buildCounterLandingPage++; |
| if (buildCounterLandingPage < 3) { |
| o.advertiserId = 'foo'; |
| o.archived = true; |
| o.deepLinks = buildUnnamed5427(); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.url = 'foo'; |
| } |
| buildCounterLandingPage--; |
| return o; |
| } |
| |
| void checkLandingPage(api.LandingPage o) { |
| buildCounterLandingPage++; |
| if (buildCounterLandingPage < 3) { |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.archived!, unittest.isTrue); |
| checkUnnamed5427(o.deepLinks!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.url!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterLandingPage--; |
| } |
| |
| core.int buildCounterLanguage = 0; |
| api.Language buildLanguage() { |
| var o = api.Language(); |
| buildCounterLanguage++; |
| if (buildCounterLanguage < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.languageCode = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterLanguage--; |
| return o; |
| } |
| |
| void checkLanguage(api.Language o) { |
| buildCounterLanguage++; |
| if (buildCounterLanguage < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.languageCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterLanguage--; |
| } |
| |
| core.List<api.Language> buildUnnamed5428() { |
| var o = <api.Language>[]; |
| o.add(buildLanguage()); |
| o.add(buildLanguage()); |
| return o; |
| } |
| |
| void checkUnnamed5428(core.List<api.Language> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLanguage(o[0] as api.Language); |
| checkLanguage(o[1] as api.Language); |
| } |
| |
| core.int buildCounterLanguageTargeting = 0; |
| api.LanguageTargeting buildLanguageTargeting() { |
| var o = api.LanguageTargeting(); |
| buildCounterLanguageTargeting++; |
| if (buildCounterLanguageTargeting < 3) { |
| o.languages = buildUnnamed5428(); |
| } |
| buildCounterLanguageTargeting--; |
| return o; |
| } |
| |
| void checkLanguageTargeting(api.LanguageTargeting o) { |
| buildCounterLanguageTargeting++; |
| if (buildCounterLanguageTargeting < 3) { |
| checkUnnamed5428(o.languages!); |
| } |
| buildCounterLanguageTargeting--; |
| } |
| |
| core.List<api.Language> buildUnnamed5429() { |
| var o = <api.Language>[]; |
| o.add(buildLanguage()); |
| o.add(buildLanguage()); |
| return o; |
| } |
| |
| void checkUnnamed5429(core.List<api.Language> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLanguage(o[0] as api.Language); |
| checkLanguage(o[1] as api.Language); |
| } |
| |
| core.int buildCounterLanguagesListResponse = 0; |
| api.LanguagesListResponse buildLanguagesListResponse() { |
| var o = api.LanguagesListResponse(); |
| buildCounterLanguagesListResponse++; |
| if (buildCounterLanguagesListResponse < 3) { |
| o.kind = 'foo'; |
| o.languages = buildUnnamed5429(); |
| } |
| buildCounterLanguagesListResponse--; |
| return o; |
| } |
| |
| void checkLanguagesListResponse(api.LanguagesListResponse o) { |
| buildCounterLanguagesListResponse++; |
| if (buildCounterLanguagesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5429(o.languages!); |
| } |
| buildCounterLanguagesListResponse--; |
| } |
| |
| core.int buildCounterLastModifiedInfo = 0; |
| api.LastModifiedInfo buildLastModifiedInfo() { |
| var o = api.LastModifiedInfo(); |
| buildCounterLastModifiedInfo++; |
| if (buildCounterLastModifiedInfo < 3) { |
| o.time = 'foo'; |
| } |
| buildCounterLastModifiedInfo--; |
| return o; |
| } |
| |
| void checkLastModifiedInfo(api.LastModifiedInfo o) { |
| buildCounterLastModifiedInfo++; |
| if (buildCounterLastModifiedInfo < 3) { |
| unittest.expect( |
| o.time!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterLastModifiedInfo--; |
| } |
| |
| core.List<api.ListPopulationTerm> buildUnnamed5430() { |
| var o = <api.ListPopulationTerm>[]; |
| o.add(buildListPopulationTerm()); |
| o.add(buildListPopulationTerm()); |
| return o; |
| } |
| |
| void checkUnnamed5430(core.List<api.ListPopulationTerm> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkListPopulationTerm(o[0] as api.ListPopulationTerm); |
| checkListPopulationTerm(o[1] as api.ListPopulationTerm); |
| } |
| |
| core.int buildCounterListPopulationClause = 0; |
| api.ListPopulationClause buildListPopulationClause() { |
| var o = api.ListPopulationClause(); |
| buildCounterListPopulationClause++; |
| if (buildCounterListPopulationClause < 3) { |
| o.terms = buildUnnamed5430(); |
| } |
| buildCounterListPopulationClause--; |
| return o; |
| } |
| |
| void checkListPopulationClause(api.ListPopulationClause o) { |
| buildCounterListPopulationClause++; |
| if (buildCounterListPopulationClause < 3) { |
| checkUnnamed5430(o.terms!); |
| } |
| buildCounterListPopulationClause--; |
| } |
| |
| core.List<api.ListPopulationClause> buildUnnamed5431() { |
| var o = <api.ListPopulationClause>[]; |
| o.add(buildListPopulationClause()); |
| o.add(buildListPopulationClause()); |
| return o; |
| } |
| |
| void checkUnnamed5431(core.List<api.ListPopulationClause> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkListPopulationClause(o[0] as api.ListPopulationClause); |
| checkListPopulationClause(o[1] as api.ListPopulationClause); |
| } |
| |
| core.int buildCounterListPopulationRule = 0; |
| api.ListPopulationRule buildListPopulationRule() { |
| var o = api.ListPopulationRule(); |
| buildCounterListPopulationRule++; |
| if (buildCounterListPopulationRule < 3) { |
| o.floodlightActivityId = 'foo'; |
| o.floodlightActivityName = 'foo'; |
| o.listPopulationClauses = buildUnnamed5431(); |
| } |
| buildCounterListPopulationRule--; |
| return o; |
| } |
| |
| void checkListPopulationRule(api.ListPopulationRule o) { |
| buildCounterListPopulationRule++; |
| if (buildCounterListPopulationRule < 3) { |
| unittest.expect( |
| o.floodlightActivityId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.floodlightActivityName!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5431(o.listPopulationClauses!); |
| } |
| buildCounterListPopulationRule--; |
| } |
| |
| core.int buildCounterListPopulationTerm = 0; |
| api.ListPopulationTerm buildListPopulationTerm() { |
| var o = api.ListPopulationTerm(); |
| buildCounterListPopulationTerm++; |
| if (buildCounterListPopulationTerm < 3) { |
| o.contains = true; |
| o.negation = true; |
| o.operator = 'foo'; |
| o.remarketingListId = 'foo'; |
| o.type = 'foo'; |
| o.value = 'foo'; |
| o.variableFriendlyName = 'foo'; |
| o.variableName = 'foo'; |
| } |
| buildCounterListPopulationTerm--; |
| return o; |
| } |
| |
| void checkListPopulationTerm(api.ListPopulationTerm o) { |
| buildCounterListPopulationTerm++; |
| if (buildCounterListPopulationTerm < 3) { |
| unittest.expect(o.contains!, unittest.isTrue); |
| unittest.expect(o.negation!, unittest.isTrue); |
| unittest.expect( |
| o.operator!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.remarketingListId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.variableFriendlyName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.variableName!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterListPopulationTerm--; |
| } |
| |
| core.int buildCounterListTargetingExpression = 0; |
| api.ListTargetingExpression buildListTargetingExpression() { |
| var o = api.ListTargetingExpression(); |
| buildCounterListTargetingExpression++; |
| if (buildCounterListTargetingExpression < 3) { |
| o.expression = 'foo'; |
| } |
| buildCounterListTargetingExpression--; |
| return o; |
| } |
| |
| void checkListTargetingExpression(api.ListTargetingExpression o) { |
| buildCounterListTargetingExpression++; |
| if (buildCounterListTargetingExpression < 3) { |
| unittest.expect( |
| o.expression!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterListTargetingExpression--; |
| } |
| |
| core.int buildCounterLookbackConfiguration = 0; |
| api.LookbackConfiguration buildLookbackConfiguration() { |
| var o = api.LookbackConfiguration(); |
| buildCounterLookbackConfiguration++; |
| if (buildCounterLookbackConfiguration < 3) { |
| o.clickDuration = 42; |
| o.postImpressionActivitiesDuration = 42; |
| } |
| buildCounterLookbackConfiguration--; |
| return o; |
| } |
| |
| void checkLookbackConfiguration(api.LookbackConfiguration o) { |
| buildCounterLookbackConfiguration++; |
| if (buildCounterLookbackConfiguration < 3) { |
| unittest.expect( |
| o.clickDuration!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.postImpressionActivitiesDuration!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterLookbackConfiguration--; |
| } |
| |
| core.int buildCounterMetric = 0; |
| api.Metric buildMetric() { |
| var o = api.Metric(); |
| buildCounterMetric++; |
| if (buildCounterMetric < 3) { |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterMetric--; |
| return o; |
| } |
| |
| void checkMetric(api.Metric o) { |
| buildCounterMetric++; |
| if (buildCounterMetric < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMetric--; |
| } |
| |
| core.int buildCounterMetro = 0; |
| api.Metro buildMetro() { |
| var o = api.Metro(); |
| buildCounterMetro++; |
| if (buildCounterMetro < 3) { |
| o.countryCode = 'foo'; |
| o.countryDartId = 'foo'; |
| o.dartId = 'foo'; |
| o.dmaId = 'foo'; |
| o.kind = 'foo'; |
| o.metroCode = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterMetro--; |
| return o; |
| } |
| |
| void checkMetro(api.Metro o) { |
| buildCounterMetro++; |
| if (buildCounterMetro < 3) { |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryDartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dmaId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.metroCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMetro--; |
| } |
| |
| core.List<api.Metro> buildUnnamed5432() { |
| var o = <api.Metro>[]; |
| o.add(buildMetro()); |
| o.add(buildMetro()); |
| return o; |
| } |
| |
| void checkUnnamed5432(core.List<api.Metro> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetro(o[0] as api.Metro); |
| checkMetro(o[1] as api.Metro); |
| } |
| |
| core.int buildCounterMetrosListResponse = 0; |
| api.MetrosListResponse buildMetrosListResponse() { |
| var o = api.MetrosListResponse(); |
| buildCounterMetrosListResponse++; |
| if (buildCounterMetrosListResponse < 3) { |
| o.kind = 'foo'; |
| o.metros = buildUnnamed5432(); |
| } |
| buildCounterMetrosListResponse--; |
| return o; |
| } |
| |
| void checkMetrosListResponse(api.MetrosListResponse o) { |
| buildCounterMetrosListResponse++; |
| if (buildCounterMetrosListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5432(o.metros!); |
| } |
| buildCounterMetrosListResponse--; |
| } |
| |
| core.int buildCounterMobileApp = 0; |
| api.MobileApp buildMobileApp() { |
| var o = api.MobileApp(); |
| buildCounterMobileApp++; |
| if (buildCounterMobileApp < 3) { |
| o.directory = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.publisherName = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterMobileApp--; |
| return o; |
| } |
| |
| void checkMobileApp(api.MobileApp o) { |
| buildCounterMobileApp++; |
| if (buildCounterMobileApp < 3) { |
| unittest.expect( |
| o.directory!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.publisherName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.title!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMobileApp--; |
| } |
| |
| core.List<api.MobileApp> buildUnnamed5433() { |
| var o = <api.MobileApp>[]; |
| o.add(buildMobileApp()); |
| o.add(buildMobileApp()); |
| return o; |
| } |
| |
| void checkUnnamed5433(core.List<api.MobileApp> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMobileApp(o[0] as api.MobileApp); |
| checkMobileApp(o[1] as api.MobileApp); |
| } |
| |
| core.int buildCounterMobileAppsListResponse = 0; |
| api.MobileAppsListResponse buildMobileAppsListResponse() { |
| var o = api.MobileAppsListResponse(); |
| buildCounterMobileAppsListResponse++; |
| if (buildCounterMobileAppsListResponse < 3) { |
| o.kind = 'foo'; |
| o.mobileApps = buildUnnamed5433(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterMobileAppsListResponse--; |
| return o; |
| } |
| |
| void checkMobileAppsListResponse(api.MobileAppsListResponse o) { |
| buildCounterMobileAppsListResponse++; |
| if (buildCounterMobileAppsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5433(o.mobileApps!); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMobileAppsListResponse--; |
| } |
| |
| core.int buildCounterMobileCarrier = 0; |
| api.MobileCarrier buildMobileCarrier() { |
| var o = api.MobileCarrier(); |
| buildCounterMobileCarrier++; |
| if (buildCounterMobileCarrier < 3) { |
| o.countryCode = 'foo'; |
| o.countryDartId = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterMobileCarrier--; |
| return o; |
| } |
| |
| void checkMobileCarrier(api.MobileCarrier o) { |
| buildCounterMobileCarrier++; |
| if (buildCounterMobileCarrier < 3) { |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryDartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMobileCarrier--; |
| } |
| |
| core.List<api.MobileCarrier> buildUnnamed5434() { |
| var o = <api.MobileCarrier>[]; |
| o.add(buildMobileCarrier()); |
| o.add(buildMobileCarrier()); |
| return o; |
| } |
| |
| void checkUnnamed5434(core.List<api.MobileCarrier> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMobileCarrier(o[0] as api.MobileCarrier); |
| checkMobileCarrier(o[1] as api.MobileCarrier); |
| } |
| |
| core.int buildCounterMobileCarriersListResponse = 0; |
| api.MobileCarriersListResponse buildMobileCarriersListResponse() { |
| var o = api.MobileCarriersListResponse(); |
| buildCounterMobileCarriersListResponse++; |
| if (buildCounterMobileCarriersListResponse < 3) { |
| o.kind = 'foo'; |
| o.mobileCarriers = buildUnnamed5434(); |
| } |
| buildCounterMobileCarriersListResponse--; |
| return o; |
| } |
| |
| void checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { |
| buildCounterMobileCarriersListResponse++; |
| if (buildCounterMobileCarriersListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5434(o.mobileCarriers!); |
| } |
| buildCounterMobileCarriersListResponse--; |
| } |
| |
| core.int buildCounterObaIcon = 0; |
| api.ObaIcon buildObaIcon() { |
| var o = api.ObaIcon(); |
| buildCounterObaIcon++; |
| if (buildCounterObaIcon < 3) { |
| o.iconClickThroughUrl = 'foo'; |
| o.iconClickTrackingUrl = 'foo'; |
| o.iconViewTrackingUrl = 'foo'; |
| o.program = 'foo'; |
| o.resourceUrl = 'foo'; |
| o.size = buildSize(); |
| o.xPosition = 'foo'; |
| o.yPosition = 'foo'; |
| } |
| buildCounterObaIcon--; |
| return o; |
| } |
| |
| void checkObaIcon(api.ObaIcon o) { |
| buildCounterObaIcon++; |
| if (buildCounterObaIcon < 3) { |
| unittest.expect( |
| o.iconClickThroughUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.iconClickTrackingUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.iconViewTrackingUrl!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.program!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.resourceUrl!, |
| unittest.equals('foo'), |
| ); |
| checkSize(o.size! as api.Size); |
| unittest.expect( |
| o.xPosition!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.yPosition!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterObaIcon--; |
| } |
| |
| core.List<core.String> buildUnnamed5435() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5435(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterObjectFilter = 0; |
| api.ObjectFilter buildObjectFilter() { |
| var o = api.ObjectFilter(); |
| buildCounterObjectFilter++; |
| if (buildCounterObjectFilter < 3) { |
| o.kind = 'foo'; |
| o.objectIds = buildUnnamed5435(); |
| o.status = 'foo'; |
| } |
| buildCounterObjectFilter--; |
| return o; |
| } |
| |
| void checkObjectFilter(api.ObjectFilter o) { |
| buildCounterObjectFilter++; |
| if (buildCounterObjectFilter < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5435(o.objectIds!); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterObjectFilter--; |
| } |
| |
| core.int buildCounterOffsetPosition = 0; |
| api.OffsetPosition buildOffsetPosition() { |
| var o = api.OffsetPosition(); |
| buildCounterOffsetPosition++; |
| if (buildCounterOffsetPosition < 3) { |
| o.left = 42; |
| o.top = 42; |
| } |
| buildCounterOffsetPosition--; |
| return o; |
| } |
| |
| void checkOffsetPosition(api.OffsetPosition o) { |
| buildCounterOffsetPosition++; |
| if (buildCounterOffsetPosition < 3) { |
| unittest.expect( |
| o.left!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.top!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterOffsetPosition--; |
| } |
| |
| core.int buildCounterOmnitureSettings = 0; |
| api.OmnitureSettings buildOmnitureSettings() { |
| var o = api.OmnitureSettings(); |
| buildCounterOmnitureSettings++; |
| if (buildCounterOmnitureSettings < 3) { |
| o.omnitureCostDataEnabled = true; |
| o.omnitureIntegrationEnabled = true; |
| } |
| buildCounterOmnitureSettings--; |
| return o; |
| } |
| |
| void checkOmnitureSettings(api.OmnitureSettings o) { |
| buildCounterOmnitureSettings++; |
| if (buildCounterOmnitureSettings < 3) { |
| unittest.expect(o.omnitureCostDataEnabled!, unittest.isTrue); |
| unittest.expect(o.omnitureIntegrationEnabled!, unittest.isTrue); |
| } |
| buildCounterOmnitureSettings--; |
| } |
| |
| core.int buildCounterOperatingSystem = 0; |
| api.OperatingSystem buildOperatingSystem() { |
| var o = api.OperatingSystem(); |
| buildCounterOperatingSystem++; |
| if (buildCounterOperatingSystem < 3) { |
| o.dartId = 'foo'; |
| o.desktop = true; |
| o.kind = 'foo'; |
| o.mobile = true; |
| o.name = 'foo'; |
| } |
| buildCounterOperatingSystem--; |
| return o; |
| } |
| |
| void checkOperatingSystem(api.OperatingSystem o) { |
| buildCounterOperatingSystem++; |
| if (buildCounterOperatingSystem < 3) { |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.desktop!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.mobile!, unittest.isTrue); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterOperatingSystem--; |
| } |
| |
| core.int buildCounterOperatingSystemVersion = 0; |
| api.OperatingSystemVersion buildOperatingSystemVersion() { |
| var o = api.OperatingSystemVersion(); |
| buildCounterOperatingSystemVersion++; |
| if (buildCounterOperatingSystemVersion < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.majorVersion = 'foo'; |
| o.minorVersion = 'foo'; |
| o.name = 'foo'; |
| o.operatingSystem = buildOperatingSystem(); |
| } |
| buildCounterOperatingSystemVersion--; |
| return o; |
| } |
| |
| void checkOperatingSystemVersion(api.OperatingSystemVersion o) { |
| buildCounterOperatingSystemVersion++; |
| if (buildCounterOperatingSystemVersion < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.majorVersion!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.minorVersion!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkOperatingSystem(o.operatingSystem! as api.OperatingSystem); |
| } |
| buildCounterOperatingSystemVersion--; |
| } |
| |
| core.List<api.OperatingSystemVersion> buildUnnamed5436() { |
| var o = <api.OperatingSystemVersion>[]; |
| o.add(buildOperatingSystemVersion()); |
| o.add(buildOperatingSystemVersion()); |
| return o; |
| } |
| |
| void checkUnnamed5436(core.List<api.OperatingSystemVersion> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperatingSystemVersion(o[0] as api.OperatingSystemVersion); |
| checkOperatingSystemVersion(o[1] as api.OperatingSystemVersion); |
| } |
| |
| core.int buildCounterOperatingSystemVersionsListResponse = 0; |
| api.OperatingSystemVersionsListResponse |
| buildOperatingSystemVersionsListResponse() { |
| var o = api.OperatingSystemVersionsListResponse(); |
| buildCounterOperatingSystemVersionsListResponse++; |
| if (buildCounterOperatingSystemVersionsListResponse < 3) { |
| o.kind = 'foo'; |
| o.operatingSystemVersions = buildUnnamed5436(); |
| } |
| buildCounterOperatingSystemVersionsListResponse--; |
| return o; |
| } |
| |
| void checkOperatingSystemVersionsListResponse( |
| api.OperatingSystemVersionsListResponse o) { |
| buildCounterOperatingSystemVersionsListResponse++; |
| if (buildCounterOperatingSystemVersionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5436(o.operatingSystemVersions!); |
| } |
| buildCounterOperatingSystemVersionsListResponse--; |
| } |
| |
| core.List<api.OperatingSystem> buildUnnamed5437() { |
| var o = <api.OperatingSystem>[]; |
| o.add(buildOperatingSystem()); |
| o.add(buildOperatingSystem()); |
| return o; |
| } |
| |
| void checkUnnamed5437(core.List<api.OperatingSystem> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperatingSystem(o[0] as api.OperatingSystem); |
| checkOperatingSystem(o[1] as api.OperatingSystem); |
| } |
| |
| core.int buildCounterOperatingSystemsListResponse = 0; |
| api.OperatingSystemsListResponse buildOperatingSystemsListResponse() { |
| var o = api.OperatingSystemsListResponse(); |
| buildCounterOperatingSystemsListResponse++; |
| if (buildCounterOperatingSystemsListResponse < 3) { |
| o.kind = 'foo'; |
| o.operatingSystems = buildUnnamed5437(); |
| } |
| buildCounterOperatingSystemsListResponse--; |
| return o; |
| } |
| |
| void checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { |
| buildCounterOperatingSystemsListResponse++; |
| if (buildCounterOperatingSystemsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5437(o.operatingSystems!); |
| } |
| buildCounterOperatingSystemsListResponse--; |
| } |
| |
| core.int buildCounterOptimizationActivity = 0; |
| api.OptimizationActivity buildOptimizationActivity() { |
| var o = api.OptimizationActivity(); |
| buildCounterOptimizationActivity++; |
| if (buildCounterOptimizationActivity < 3) { |
| o.floodlightActivityId = 'foo'; |
| o.floodlightActivityIdDimensionValue = buildDimensionValue(); |
| o.weight = 42; |
| } |
| buildCounterOptimizationActivity--; |
| return o; |
| } |
| |
| void checkOptimizationActivity(api.OptimizationActivity o) { |
| buildCounterOptimizationActivity++; |
| if (buildCounterOptimizationActivity < 3) { |
| unittest.expect( |
| o.floodlightActivityId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.floodlightActivityIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.weight!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterOptimizationActivity--; |
| } |
| |
| core.List<core.String> buildUnnamed5438() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5438(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.OrderContact> buildUnnamed5439() { |
| var o = <api.OrderContact>[]; |
| o.add(buildOrderContact()); |
| o.add(buildOrderContact()); |
| return o; |
| } |
| |
| void checkUnnamed5439(core.List<api.OrderContact> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOrderContact(o[0] as api.OrderContact); |
| checkOrderContact(o[1] as api.OrderContact); |
| } |
| |
| core.List<core.String> buildUnnamed5440() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5440(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5441() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5441(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterOrder = 0; |
| api.Order buildOrder() { |
| var o = api.Order(); |
| buildCounterOrder++; |
| if (buildCounterOrder < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.approverUserProfileIds = buildUnnamed5438(); |
| o.buyerInvoiceId = 'foo'; |
| o.buyerOrganizationName = 'foo'; |
| o.comments = 'foo'; |
| o.contacts = buildUnnamed5439(); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.notes = 'foo'; |
| o.planningTermId = 'foo'; |
| o.projectId = 'foo'; |
| o.sellerOrderId = 'foo'; |
| o.sellerOrganizationName = 'foo'; |
| o.siteId = buildUnnamed5440(); |
| o.siteNames = buildUnnamed5441(); |
| o.subaccountId = 'foo'; |
| o.termsAndConditions = 'foo'; |
| } |
| buildCounterOrder--; |
| return o; |
| } |
| |
| void checkOrder(api.Order o) { |
| buildCounterOrder++; |
| if (buildCounterOrder < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5438(o.approverUserProfileIds!); |
| unittest.expect( |
| o.buyerInvoiceId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.buyerOrganizationName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.comments!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5439(o.contacts!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.notes!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.planningTermId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.projectId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.sellerOrderId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.sellerOrganizationName!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5440(o.siteId!); |
| checkUnnamed5441(o.siteNames!); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.termsAndConditions!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterOrder--; |
| } |
| |
| core.int buildCounterOrderContact = 0; |
| api.OrderContact buildOrderContact() { |
| var o = api.OrderContact(); |
| buildCounterOrderContact++; |
| if (buildCounterOrderContact < 3) { |
| o.contactInfo = 'foo'; |
| o.contactName = 'foo'; |
| o.contactTitle = 'foo'; |
| o.contactType = 'foo'; |
| o.signatureUserProfileId = 'foo'; |
| } |
| buildCounterOrderContact--; |
| return o; |
| } |
| |
| void checkOrderContact(api.OrderContact o) { |
| buildCounterOrderContact++; |
| if (buildCounterOrderContact < 3) { |
| unittest.expect( |
| o.contactInfo!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contactName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contactTitle!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contactType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.signatureUserProfileId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterOrderContact--; |
| } |
| |
| core.List<core.String> buildUnnamed5442() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5442(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5443() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5443(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterOrderDocument = 0; |
| api.OrderDocument buildOrderDocument() { |
| var o = api.OrderDocument(); |
| buildCounterOrderDocument++; |
| if (buildCounterOrderDocument < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.amendedOrderDocumentId = 'foo'; |
| o.approvedByUserProfileIds = buildUnnamed5442(); |
| o.cancelled = true; |
| o.createdInfo = buildLastModifiedInfo(); |
| o.effectiveDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastSentRecipients = buildUnnamed5443(); |
| o.lastSentTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.orderId = 'foo'; |
| o.projectId = 'foo'; |
| o.signed = true; |
| o.subaccountId = 'foo'; |
| o.title = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterOrderDocument--; |
| return o; |
| } |
| |
| void checkOrderDocument(api.OrderDocument o) { |
| buildCounterOrderDocument++; |
| if (buildCounterOrderDocument < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.amendedOrderDocumentId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5442(o.approvedByUserProfileIds!); |
| unittest.expect(o.cancelled!, unittest.isTrue); |
| checkLastModifiedInfo(o.createdInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.effectiveDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5443(o.lastSentRecipients!); |
| unittest.expect( |
| o.lastSentTime!, |
| unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")), |
| ); |
| unittest.expect( |
| o.orderId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.projectId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.signed!, unittest.isTrue); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.title!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterOrderDocument--; |
| } |
| |
| core.List<api.OrderDocument> buildUnnamed5444() { |
| var o = <api.OrderDocument>[]; |
| o.add(buildOrderDocument()); |
| o.add(buildOrderDocument()); |
| return o; |
| } |
| |
| void checkUnnamed5444(core.List<api.OrderDocument> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOrderDocument(o[0] as api.OrderDocument); |
| checkOrderDocument(o[1] as api.OrderDocument); |
| } |
| |
| core.int buildCounterOrderDocumentsListResponse = 0; |
| api.OrderDocumentsListResponse buildOrderDocumentsListResponse() { |
| var o = api.OrderDocumentsListResponse(); |
| buildCounterOrderDocumentsListResponse++; |
| if (buildCounterOrderDocumentsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.orderDocuments = buildUnnamed5444(); |
| } |
| buildCounterOrderDocumentsListResponse--; |
| return o; |
| } |
| |
| void checkOrderDocumentsListResponse(api.OrderDocumentsListResponse o) { |
| buildCounterOrderDocumentsListResponse++; |
| if (buildCounterOrderDocumentsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5444(o.orderDocuments!); |
| } |
| buildCounterOrderDocumentsListResponse--; |
| } |
| |
| core.List<api.Order> buildUnnamed5445() { |
| var o = <api.Order>[]; |
| o.add(buildOrder()); |
| o.add(buildOrder()); |
| return o; |
| } |
| |
| void checkUnnamed5445(core.List<api.Order> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOrder(o[0] as api.Order); |
| checkOrder(o[1] as api.Order); |
| } |
| |
| core.int buildCounterOrdersListResponse = 0; |
| api.OrdersListResponse buildOrdersListResponse() { |
| var o = api.OrdersListResponse(); |
| buildCounterOrdersListResponse++; |
| if (buildCounterOrdersListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.orders = buildUnnamed5445(); |
| } |
| buildCounterOrdersListResponse--; |
| return o; |
| } |
| |
| void checkOrdersListResponse(api.OrdersListResponse o) { |
| buildCounterOrdersListResponse++; |
| if (buildCounterOrdersListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5445(o.orders!); |
| } |
| buildCounterOrdersListResponse--; |
| } |
| |
| core.List<api.EventFilter> buildUnnamed5446() { |
| var o = <api.EventFilter>[]; |
| o.add(buildEventFilter()); |
| o.add(buildEventFilter()); |
| return o; |
| } |
| |
| void checkUnnamed5446(core.List<api.EventFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEventFilter(o[0] as api.EventFilter); |
| checkEventFilter(o[1] as api.EventFilter); |
| } |
| |
| core.int buildCounterPathFilter = 0; |
| api.PathFilter buildPathFilter() { |
| var o = api.PathFilter(); |
| buildCounterPathFilter++; |
| if (buildCounterPathFilter < 3) { |
| o.eventFilters = buildUnnamed5446(); |
| o.kind = 'foo'; |
| o.pathMatchPosition = 'foo'; |
| } |
| buildCounterPathFilter--; |
| return o; |
| } |
| |
| void checkPathFilter(api.PathFilter o) { |
| buildCounterPathFilter++; |
| if (buildCounterPathFilter < 3) { |
| checkUnnamed5446(o.eventFilters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.pathMatchPosition!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPathFilter--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5447() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5447(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5448() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5448(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5449() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5449(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5450() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5450(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.int buildCounterPathReportCompatibleFields = 0; |
| api.PathReportCompatibleFields buildPathReportCompatibleFields() { |
| var o = api.PathReportCompatibleFields(); |
| buildCounterPathReportCompatibleFields++; |
| if (buildCounterPathReportCompatibleFields < 3) { |
| o.channelGroupings = buildUnnamed5447(); |
| o.dimensions = buildUnnamed5448(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5449(); |
| o.pathFilters = buildUnnamed5450(); |
| } |
| buildCounterPathReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkPathReportCompatibleFields(api.PathReportCompatibleFields o) { |
| buildCounterPathReportCompatibleFields++; |
| if (buildCounterPathReportCompatibleFields < 3) { |
| checkUnnamed5447(o.channelGroupings!); |
| checkUnnamed5448(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5449(o.metrics!); |
| checkUnnamed5450(o.pathFilters!); |
| } |
| buildCounterPathReportCompatibleFields--; |
| } |
| |
| core.List<core.String> buildUnnamed5451() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5451(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5452() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5452(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterPathReportDimensionValue = 0; |
| api.PathReportDimensionValue buildPathReportDimensionValue() { |
| var o = api.PathReportDimensionValue(); |
| buildCounterPathReportDimensionValue++; |
| if (buildCounterPathReportDimensionValue < 3) { |
| o.dimensionName = 'foo'; |
| o.ids = buildUnnamed5451(); |
| o.kind = 'foo'; |
| o.matchType = 'foo'; |
| o.values = buildUnnamed5452(); |
| } |
| buildCounterPathReportDimensionValue--; |
| return o; |
| } |
| |
| void checkPathReportDimensionValue(api.PathReportDimensionValue o) { |
| buildCounterPathReportDimensionValue++; |
| if (buildCounterPathReportDimensionValue < 3) { |
| unittest.expect( |
| o.dimensionName!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5451(o.ids!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.matchType!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5452(o.values!); |
| } |
| buildCounterPathReportDimensionValue--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5453() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5453(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5454() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5454(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5455() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5455(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5456() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5456(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.int buildCounterPathToConversionReportCompatibleFields = 0; |
| api.PathToConversionReportCompatibleFields |
| buildPathToConversionReportCompatibleFields() { |
| var o = api.PathToConversionReportCompatibleFields(); |
| buildCounterPathToConversionReportCompatibleFields++; |
| if (buildCounterPathToConversionReportCompatibleFields < 3) { |
| o.conversionDimensions = buildUnnamed5453(); |
| o.customFloodlightVariables = buildUnnamed5454(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5455(); |
| o.perInteractionDimensions = buildUnnamed5456(); |
| } |
| buildCounterPathToConversionReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkPathToConversionReportCompatibleFields( |
| api.PathToConversionReportCompatibleFields o) { |
| buildCounterPathToConversionReportCompatibleFields++; |
| if (buildCounterPathToConversionReportCompatibleFields < 3) { |
| checkUnnamed5453(o.conversionDimensions!); |
| checkUnnamed5454(o.customFloodlightVariables!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5455(o.metrics!); |
| checkUnnamed5456(o.perInteractionDimensions!); |
| } |
| buildCounterPathToConversionReportCompatibleFields--; |
| } |
| |
| core.List<api.Size> buildUnnamed5457() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5457(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.List<core.String> buildUnnamed5458() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5458(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterPlacement = 0; |
| api.Placement buildPlacement() { |
| var o = api.Placement(); |
| buildCounterPlacement++; |
| if (buildCounterPlacement < 3) { |
| o.accountId = 'foo'; |
| o.adBlockingOptOut = true; |
| o.additionalSizes = buildUnnamed5457(); |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.archived = true; |
| o.campaignId = 'foo'; |
| o.campaignIdDimensionValue = buildDimensionValue(); |
| o.comment = 'foo'; |
| o.compatibility = 'foo'; |
| o.contentCategoryId = 'foo'; |
| o.createInfo = buildLastModifiedInfo(); |
| o.directorySiteId = 'foo'; |
| o.directorySiteIdDimensionValue = buildDimensionValue(); |
| o.externalId = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.keyName = 'foo'; |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.lookbackConfiguration = buildLookbackConfiguration(); |
| o.name = 'foo'; |
| o.paymentApproved = true; |
| o.paymentSource = 'foo'; |
| o.placementGroupId = 'foo'; |
| o.placementGroupIdDimensionValue = buildDimensionValue(); |
| o.placementStrategyId = 'foo'; |
| o.pricingSchedule = buildPricingSchedule(); |
| o.primary = true; |
| o.publisherUpdateInfo = buildLastModifiedInfo(); |
| o.siteId = 'foo'; |
| o.siteIdDimensionValue = buildDimensionValue(); |
| o.size = buildSize(); |
| o.sslRequired = true; |
| o.status = 'foo'; |
| o.subaccountId = 'foo'; |
| o.tagFormats = buildUnnamed5458(); |
| o.tagSetting = buildTagSetting(); |
| o.videoActiveViewOptOut = true; |
| o.videoSettings = buildVideoSettings(); |
| o.vpaidAdapterChoice = 'foo'; |
| } |
| buildCounterPlacement--; |
| return o; |
| } |
| |
| void checkPlacement(api.Placement o) { |
| buildCounterPlacement++; |
| if (buildCounterPlacement < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.adBlockingOptOut!, unittest.isTrue); |
| checkUnnamed5457(o.additionalSizes!); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.archived!, unittest.isTrue); |
| unittest.expect( |
| o.campaignId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.campaignIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.comment!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.compatibility!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contentCategoryId!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.createInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.directorySiteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.directorySiteIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.externalId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.keyName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| checkLookbackConfiguration( |
| o.lookbackConfiguration! as api.LookbackConfiguration); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.paymentApproved!, unittest.isTrue); |
| unittest.expect( |
| o.paymentSource!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.placementGroupId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.placementGroupIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.placementStrategyId!, |
| unittest.equals('foo'), |
| ); |
| checkPricingSchedule(o.pricingSchedule! as api.PricingSchedule); |
| unittest.expect(o.primary!, unittest.isTrue); |
| checkLastModifiedInfo(o.publisherUpdateInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.siteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.siteIdDimensionValue! as api.DimensionValue); |
| checkSize(o.size! as api.Size); |
| unittest.expect(o.sslRequired!, unittest.isTrue); |
| unittest.expect( |
| o.status!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5458(o.tagFormats!); |
| checkTagSetting(o.tagSetting! as api.TagSetting); |
| unittest.expect(o.videoActiveViewOptOut!, unittest.isTrue); |
| checkVideoSettings(o.videoSettings! as api.VideoSettings); |
| unittest.expect( |
| o.vpaidAdapterChoice!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPlacement--; |
| } |
| |
| core.int buildCounterPlacementAssignment = 0; |
| api.PlacementAssignment buildPlacementAssignment() { |
| var o = api.PlacementAssignment(); |
| buildCounterPlacementAssignment++; |
| if (buildCounterPlacementAssignment < 3) { |
| o.active = true; |
| o.placementId = 'foo'; |
| o.placementIdDimensionValue = buildDimensionValue(); |
| o.sslRequired = true; |
| } |
| buildCounterPlacementAssignment--; |
| return o; |
| } |
| |
| void checkPlacementAssignment(api.PlacementAssignment o) { |
| buildCounterPlacementAssignment++; |
| if (buildCounterPlacementAssignment < 3) { |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.placementId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.placementIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.sslRequired!, unittest.isTrue); |
| } |
| buildCounterPlacementAssignment--; |
| } |
| |
| core.List<core.String> buildUnnamed5459() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5459(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterPlacementGroup = 0; |
| api.PlacementGroup buildPlacementGroup() { |
| var o = api.PlacementGroup(); |
| buildCounterPlacementGroup++; |
| if (buildCounterPlacementGroup < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.archived = true; |
| o.campaignId = 'foo'; |
| o.campaignIdDimensionValue = buildDimensionValue(); |
| o.childPlacementIds = buildUnnamed5459(); |
| o.comment = 'foo'; |
| o.contentCategoryId = 'foo'; |
| o.createInfo = buildLastModifiedInfo(); |
| o.directorySiteId = 'foo'; |
| o.directorySiteIdDimensionValue = buildDimensionValue(); |
| o.externalId = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.placementGroupType = 'foo'; |
| o.placementStrategyId = 'foo'; |
| o.pricingSchedule = buildPricingSchedule(); |
| o.primaryPlacementId = 'foo'; |
| o.primaryPlacementIdDimensionValue = buildDimensionValue(); |
| o.siteId = 'foo'; |
| o.siteIdDimensionValue = buildDimensionValue(); |
| o.subaccountId = 'foo'; |
| } |
| buildCounterPlacementGroup--; |
| return o; |
| } |
| |
| void checkPlacementGroup(api.PlacementGroup o) { |
| buildCounterPlacementGroup++; |
| if (buildCounterPlacementGroup < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect(o.archived!, unittest.isTrue); |
| unittest.expect( |
| o.campaignId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.campaignIdDimensionValue! as api.DimensionValue); |
| checkUnnamed5459(o.childPlacementIds!); |
| unittest.expect( |
| o.comment!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contentCategoryId!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.createInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.directorySiteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.directorySiteIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.externalId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.placementGroupType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.placementStrategyId!, |
| unittest.equals('foo'), |
| ); |
| checkPricingSchedule(o.pricingSchedule! as api.PricingSchedule); |
| unittest.expect( |
| o.primaryPlacementId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue( |
| o.primaryPlacementIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.siteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.siteIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPlacementGroup--; |
| } |
| |
| core.List<api.PlacementGroup> buildUnnamed5460() { |
| var o = <api.PlacementGroup>[]; |
| o.add(buildPlacementGroup()); |
| o.add(buildPlacementGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5460(core.List<api.PlacementGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlacementGroup(o[0] as api.PlacementGroup); |
| checkPlacementGroup(o[1] as api.PlacementGroup); |
| } |
| |
| core.int buildCounterPlacementGroupsListResponse = 0; |
| api.PlacementGroupsListResponse buildPlacementGroupsListResponse() { |
| var o = api.PlacementGroupsListResponse(); |
| buildCounterPlacementGroupsListResponse++; |
| if (buildCounterPlacementGroupsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.placementGroups = buildUnnamed5460(); |
| } |
| buildCounterPlacementGroupsListResponse--; |
| return o; |
| } |
| |
| void checkPlacementGroupsListResponse(api.PlacementGroupsListResponse o) { |
| buildCounterPlacementGroupsListResponse++; |
| if (buildCounterPlacementGroupsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5460(o.placementGroups!); |
| } |
| buildCounterPlacementGroupsListResponse--; |
| } |
| |
| core.List<api.PlacementStrategy> buildUnnamed5461() { |
| var o = <api.PlacementStrategy>[]; |
| o.add(buildPlacementStrategy()); |
| o.add(buildPlacementStrategy()); |
| return o; |
| } |
| |
| void checkUnnamed5461(core.List<api.PlacementStrategy> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlacementStrategy(o[0] as api.PlacementStrategy); |
| checkPlacementStrategy(o[1] as api.PlacementStrategy); |
| } |
| |
| core.int buildCounterPlacementStrategiesListResponse = 0; |
| api.PlacementStrategiesListResponse buildPlacementStrategiesListResponse() { |
| var o = api.PlacementStrategiesListResponse(); |
| buildCounterPlacementStrategiesListResponse++; |
| if (buildCounterPlacementStrategiesListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.placementStrategies = buildUnnamed5461(); |
| } |
| buildCounterPlacementStrategiesListResponse--; |
| return o; |
| } |
| |
| void checkPlacementStrategiesListResponse( |
| api.PlacementStrategiesListResponse o) { |
| buildCounterPlacementStrategiesListResponse++; |
| if (buildCounterPlacementStrategiesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5461(o.placementStrategies!); |
| } |
| buildCounterPlacementStrategiesListResponse--; |
| } |
| |
| core.int buildCounterPlacementStrategy = 0; |
| api.PlacementStrategy buildPlacementStrategy() { |
| var o = api.PlacementStrategy(); |
| buildCounterPlacementStrategy++; |
| if (buildCounterPlacementStrategy < 3) { |
| o.accountId = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterPlacementStrategy--; |
| return o; |
| } |
| |
| void checkPlacementStrategy(api.PlacementStrategy o) { |
| buildCounterPlacementStrategy++; |
| if (buildCounterPlacementStrategy < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPlacementStrategy--; |
| } |
| |
| core.List<api.TagData> buildUnnamed5462() { |
| var o = <api.TagData>[]; |
| o.add(buildTagData()); |
| o.add(buildTagData()); |
| return o; |
| } |
| |
| void checkUnnamed5462(core.List<api.TagData> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkTagData(o[0] as api.TagData); |
| checkTagData(o[1] as api.TagData); |
| } |
| |
| core.int buildCounterPlacementTag = 0; |
| api.PlacementTag buildPlacementTag() { |
| var o = api.PlacementTag(); |
| buildCounterPlacementTag++; |
| if (buildCounterPlacementTag < 3) { |
| o.placementId = 'foo'; |
| o.tagDatas = buildUnnamed5462(); |
| } |
| buildCounterPlacementTag--; |
| return o; |
| } |
| |
| void checkPlacementTag(api.PlacementTag o) { |
| buildCounterPlacementTag++; |
| if (buildCounterPlacementTag < 3) { |
| unittest.expect( |
| o.placementId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5462(o.tagDatas!); |
| } |
| buildCounterPlacementTag--; |
| } |
| |
| core.List<api.PlacementTag> buildUnnamed5463() { |
| var o = <api.PlacementTag>[]; |
| o.add(buildPlacementTag()); |
| o.add(buildPlacementTag()); |
| return o; |
| } |
| |
| void checkUnnamed5463(core.List<api.PlacementTag> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlacementTag(o[0] as api.PlacementTag); |
| checkPlacementTag(o[1] as api.PlacementTag); |
| } |
| |
| core.int buildCounterPlacementsGenerateTagsResponse = 0; |
| api.PlacementsGenerateTagsResponse buildPlacementsGenerateTagsResponse() { |
| var o = api.PlacementsGenerateTagsResponse(); |
| buildCounterPlacementsGenerateTagsResponse++; |
| if (buildCounterPlacementsGenerateTagsResponse < 3) { |
| o.kind = 'foo'; |
| o.placementTags = buildUnnamed5463(); |
| } |
| buildCounterPlacementsGenerateTagsResponse--; |
| return o; |
| } |
| |
| void checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { |
| buildCounterPlacementsGenerateTagsResponse++; |
| if (buildCounterPlacementsGenerateTagsResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5463(o.placementTags!); |
| } |
| buildCounterPlacementsGenerateTagsResponse--; |
| } |
| |
| core.List<api.Placement> buildUnnamed5464() { |
| var o = <api.Placement>[]; |
| o.add(buildPlacement()); |
| o.add(buildPlacement()); |
| return o; |
| } |
| |
| void checkUnnamed5464(core.List<api.Placement> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlacement(o[0] as api.Placement); |
| checkPlacement(o[1] as api.Placement); |
| } |
| |
| core.int buildCounterPlacementsListResponse = 0; |
| api.PlacementsListResponse buildPlacementsListResponse() { |
| var o = api.PlacementsListResponse(); |
| buildCounterPlacementsListResponse++; |
| if (buildCounterPlacementsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.placements = buildUnnamed5464(); |
| } |
| buildCounterPlacementsListResponse--; |
| return o; |
| } |
| |
| void checkPlacementsListResponse(api.PlacementsListResponse o) { |
| buildCounterPlacementsListResponse++; |
| if (buildCounterPlacementsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5464(o.placements!); |
| } |
| buildCounterPlacementsListResponse--; |
| } |
| |
| core.int buildCounterPlatformType = 0; |
| api.PlatformType buildPlatformType() { |
| var o = api.PlatformType(); |
| buildCounterPlatformType++; |
| if (buildCounterPlatformType < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterPlatformType--; |
| return o; |
| } |
| |
| void checkPlatformType(api.PlatformType o) { |
| buildCounterPlatformType++; |
| if (buildCounterPlatformType < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPlatformType--; |
| } |
| |
| core.List<api.PlatformType> buildUnnamed5465() { |
| var o = <api.PlatformType>[]; |
| o.add(buildPlatformType()); |
| o.add(buildPlatformType()); |
| return o; |
| } |
| |
| void checkUnnamed5465(core.List<api.PlatformType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlatformType(o[0] as api.PlatformType); |
| checkPlatformType(o[1] as api.PlatformType); |
| } |
| |
| core.int buildCounterPlatformTypesListResponse = 0; |
| api.PlatformTypesListResponse buildPlatformTypesListResponse() { |
| var o = api.PlatformTypesListResponse(); |
| buildCounterPlatformTypesListResponse++; |
| if (buildCounterPlatformTypesListResponse < 3) { |
| o.kind = 'foo'; |
| o.platformTypes = buildUnnamed5465(); |
| } |
| buildCounterPlatformTypesListResponse--; |
| return o; |
| } |
| |
| void checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { |
| buildCounterPlatformTypesListResponse++; |
| if (buildCounterPlatformTypesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5465(o.platformTypes!); |
| } |
| buildCounterPlatformTypesListResponse--; |
| } |
| |
| core.int buildCounterPopupWindowProperties = 0; |
| api.PopupWindowProperties buildPopupWindowProperties() { |
| var o = api.PopupWindowProperties(); |
| buildCounterPopupWindowProperties++; |
| if (buildCounterPopupWindowProperties < 3) { |
| o.dimension = buildSize(); |
| o.offset = buildOffsetPosition(); |
| o.positionType = 'foo'; |
| o.showAddressBar = true; |
| o.showMenuBar = true; |
| o.showScrollBar = true; |
| o.showStatusBar = true; |
| o.showToolBar = true; |
| o.title = 'foo'; |
| } |
| buildCounterPopupWindowProperties--; |
| return o; |
| } |
| |
| void checkPopupWindowProperties(api.PopupWindowProperties o) { |
| buildCounterPopupWindowProperties++; |
| if (buildCounterPopupWindowProperties < 3) { |
| checkSize(o.dimension! as api.Size); |
| checkOffsetPosition(o.offset! as api.OffsetPosition); |
| unittest.expect( |
| o.positionType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.showAddressBar!, unittest.isTrue); |
| unittest.expect(o.showMenuBar!, unittest.isTrue); |
| unittest.expect(o.showScrollBar!, unittest.isTrue); |
| unittest.expect(o.showStatusBar!, unittest.isTrue); |
| unittest.expect(o.showToolBar!, unittest.isTrue); |
| unittest.expect( |
| o.title!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPopupWindowProperties--; |
| } |
| |
| core.int buildCounterPostalCode = 0; |
| api.PostalCode buildPostalCode() { |
| var o = api.PostalCode(); |
| buildCounterPostalCode++; |
| if (buildCounterPostalCode < 3) { |
| o.code = 'foo'; |
| o.countryCode = 'foo'; |
| o.countryDartId = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterPostalCode--; |
| return o; |
| } |
| |
| void checkPostalCode(api.PostalCode o) { |
| buildCounterPostalCode++; |
| if (buildCounterPostalCode < 3) { |
| unittest.expect( |
| o.code!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryDartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPostalCode--; |
| } |
| |
| core.List<api.PostalCode> buildUnnamed5466() { |
| var o = <api.PostalCode>[]; |
| o.add(buildPostalCode()); |
| o.add(buildPostalCode()); |
| return o; |
| } |
| |
| void checkUnnamed5466(core.List<api.PostalCode> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPostalCode(o[0] as api.PostalCode); |
| checkPostalCode(o[1] as api.PostalCode); |
| } |
| |
| core.int buildCounterPostalCodesListResponse = 0; |
| api.PostalCodesListResponse buildPostalCodesListResponse() { |
| var o = api.PostalCodesListResponse(); |
| buildCounterPostalCodesListResponse++; |
| if (buildCounterPostalCodesListResponse < 3) { |
| o.kind = 'foo'; |
| o.postalCodes = buildUnnamed5466(); |
| } |
| buildCounterPostalCodesListResponse--; |
| return o; |
| } |
| |
| void checkPostalCodesListResponse(api.PostalCodesListResponse o) { |
| buildCounterPostalCodesListResponse++; |
| if (buildCounterPostalCodesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5466(o.postalCodes!); |
| } |
| buildCounterPostalCodesListResponse--; |
| } |
| |
| core.List<api.Flight> buildUnnamed5467() { |
| var o = <api.Flight>[]; |
| o.add(buildFlight()); |
| o.add(buildFlight()); |
| return o; |
| } |
| |
| void checkUnnamed5467(core.List<api.Flight> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFlight(o[0] as api.Flight); |
| checkFlight(o[1] as api.Flight); |
| } |
| |
| core.int buildCounterPricing = 0; |
| api.Pricing buildPricing() { |
| var o = api.Pricing(); |
| buildCounterPricing++; |
| if (buildCounterPricing < 3) { |
| o.capCostType = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.flights = buildUnnamed5467(); |
| o.groupType = 'foo'; |
| o.pricingType = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| } |
| buildCounterPricing--; |
| return o; |
| } |
| |
| void checkPricing(api.Pricing o) { |
| buildCounterPricing++; |
| if (buildCounterPricing < 3) { |
| unittest.expect( |
| o.capCostType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| checkUnnamed5467(o.flights!); |
| unittest.expect( |
| o.groupType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.pricingType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| } |
| buildCounterPricing--; |
| } |
| |
| core.List<api.PricingSchedulePricingPeriod> buildUnnamed5468() { |
| var o = <api.PricingSchedulePricingPeriod>[]; |
| o.add(buildPricingSchedulePricingPeriod()); |
| o.add(buildPricingSchedulePricingPeriod()); |
| return o; |
| } |
| |
| void checkUnnamed5468(core.List<api.PricingSchedulePricingPeriod> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPricingSchedulePricingPeriod(o[0] as api.PricingSchedulePricingPeriod); |
| checkPricingSchedulePricingPeriod(o[1] as api.PricingSchedulePricingPeriod); |
| } |
| |
| core.int buildCounterPricingSchedule = 0; |
| api.PricingSchedule buildPricingSchedule() { |
| var o = api.PricingSchedule(); |
| buildCounterPricingSchedule++; |
| if (buildCounterPricingSchedule < 3) { |
| o.capCostOption = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.flighted = true; |
| o.floodlightActivityId = 'foo'; |
| o.pricingPeriods = buildUnnamed5468(); |
| o.pricingType = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.testingStartDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| } |
| buildCounterPricingSchedule--; |
| return o; |
| } |
| |
| void checkPricingSchedule(api.PricingSchedule o) { |
| buildCounterPricingSchedule++; |
| if (buildCounterPricingSchedule < 3) { |
| unittest.expect( |
| o.capCostOption!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect(o.flighted!, unittest.isTrue); |
| unittest.expect( |
| o.floodlightActivityId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5468(o.pricingPeriods!); |
| unittest.expect( |
| o.pricingType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.testingStartDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| } |
| buildCounterPricingSchedule--; |
| } |
| |
| core.int buildCounterPricingSchedulePricingPeriod = 0; |
| api.PricingSchedulePricingPeriod buildPricingSchedulePricingPeriod() { |
| var o = api.PricingSchedulePricingPeriod(); |
| buildCounterPricingSchedulePricingPeriod++; |
| if (buildCounterPricingSchedulePricingPeriod < 3) { |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.pricingComment = 'foo'; |
| o.rateOrCostNanos = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.units = 'foo'; |
| } |
| buildCounterPricingSchedulePricingPeriod--; |
| return o; |
| } |
| |
| void checkPricingSchedulePricingPeriod(api.PricingSchedulePricingPeriod o) { |
| buildCounterPricingSchedulePricingPeriod++; |
| if (buildCounterPricingSchedulePricingPeriod < 3) { |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.pricingComment!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.rateOrCostNanos!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.units!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPricingSchedulePricingPeriod--; |
| } |
| |
| core.int buildCounterProject = 0; |
| api.Project buildProject() { |
| var o = api.Project(); |
| buildCounterProject++; |
| if (buildCounterProject < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.audienceAgeGroup = 'foo'; |
| o.audienceGender = 'foo'; |
| o.budget = 'foo'; |
| o.clientBillingCode = 'foo'; |
| o.clientName = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.name = 'foo'; |
| o.overview = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.subaccountId = 'foo'; |
| o.targetClicks = 'foo'; |
| o.targetConversions = 'foo'; |
| o.targetCpaNanos = 'foo'; |
| o.targetCpcNanos = 'foo'; |
| o.targetCpmActiveViewNanos = 'foo'; |
| o.targetCpmNanos = 'foo'; |
| o.targetImpressions = 'foo'; |
| } |
| buildCounterProject--; |
| return o; |
| } |
| |
| void checkProject(api.Project o) { |
| buildCounterProject++; |
| if (buildCounterProject < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.audienceAgeGroup!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.audienceGender!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.budget!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.clientBillingCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.clientName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.endDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLastModifiedInfo(o.lastModifiedInfo! as api.LastModifiedInfo); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.overview!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetClicks!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetConversions!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetCpaNanos!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetCpcNanos!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetCpmActiveViewNanos!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetCpmNanos!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetImpressions!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterProject--; |
| } |
| |
| core.List<api.Project> buildUnnamed5469() { |
| var o = <api.Project>[]; |
| o.add(buildProject()); |
| o.add(buildProject()); |
| return o; |
| } |
| |
| void checkUnnamed5469(core.List<api.Project> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkProject(o[0] as api.Project); |
| checkProject(o[1] as api.Project); |
| } |
| |
| core.int buildCounterProjectsListResponse = 0; |
| api.ProjectsListResponse buildProjectsListResponse() { |
| var o = api.ProjectsListResponse(); |
| buildCounterProjectsListResponse++; |
| if (buildCounterProjectsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.projects = buildUnnamed5469(); |
| } |
| buildCounterProjectsListResponse--; |
| return o; |
| } |
| |
| void checkProjectsListResponse(api.ProjectsListResponse o) { |
| buildCounterProjectsListResponse++; |
| if (buildCounterProjectsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5469(o.projects!); |
| } |
| buildCounterProjectsListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5470() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5470(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5471() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5471(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5472() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5472(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Metric> buildUnnamed5473() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5473(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Metric> buildUnnamed5474() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5474(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.int buildCounterReachReportCompatibleFields = 0; |
| api.ReachReportCompatibleFields buildReachReportCompatibleFields() { |
| var o = api.ReachReportCompatibleFields(); |
| buildCounterReachReportCompatibleFields++; |
| if (buildCounterReachReportCompatibleFields < 3) { |
| o.dimensionFilters = buildUnnamed5470(); |
| o.dimensions = buildUnnamed5471(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5472(); |
| o.pivotedActivityMetrics = buildUnnamed5473(); |
| o.reachByFrequencyMetrics = buildUnnamed5474(); |
| } |
| buildCounterReachReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { |
| buildCounterReachReportCompatibleFields++; |
| if (buildCounterReachReportCompatibleFields < 3) { |
| checkUnnamed5470(o.dimensionFilters!); |
| checkUnnamed5471(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5472(o.metrics!); |
| checkUnnamed5473(o.pivotedActivityMetrics!); |
| checkUnnamed5474(o.reachByFrequencyMetrics!); |
| } |
| buildCounterReachReportCompatibleFields--; |
| } |
| |
| core.int buildCounterRecipient = 0; |
| api.Recipient buildRecipient() { |
| var o = api.Recipient(); |
| buildCounterRecipient++; |
| if (buildCounterRecipient < 3) { |
| o.deliveryType = 'foo'; |
| o.email = 'foo'; |
| o.kind = 'foo'; |
| } |
| buildCounterRecipient--; |
| return o; |
| } |
| |
| void checkRecipient(api.Recipient o) { |
| buildCounterRecipient++; |
| if (buildCounterRecipient < 3) { |
| unittest.expect( |
| o.deliveryType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.email!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterRecipient--; |
| } |
| |
| core.int buildCounterRegion = 0; |
| api.Region buildRegion() { |
| var o = api.Region(); |
| buildCounterRegion++; |
| if (buildCounterRegion < 3) { |
| o.countryCode = 'foo'; |
| o.countryDartId = 'foo'; |
| o.dartId = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.regionCode = 'foo'; |
| } |
| buildCounterRegion--; |
| return o; |
| } |
| |
| void checkRegion(api.Region o) { |
| buildCounterRegion++; |
| if (buildCounterRegion < 3) { |
| unittest.expect( |
| o.countryCode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.countryDartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.dartId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.regionCode!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterRegion--; |
| } |
| |
| core.List<api.Region> buildUnnamed5475() { |
| var o = <api.Region>[]; |
| o.add(buildRegion()); |
| o.add(buildRegion()); |
| return o; |
| } |
| |
| void checkUnnamed5475(core.List<api.Region> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRegion(o[0] as api.Region); |
| checkRegion(o[1] as api.Region); |
| } |
| |
| core.int buildCounterRegionsListResponse = 0; |
| api.RegionsListResponse buildRegionsListResponse() { |
| var o = api.RegionsListResponse(); |
| buildCounterRegionsListResponse++; |
| if (buildCounterRegionsListResponse < 3) { |
| o.kind = 'foo'; |
| o.regions = buildUnnamed5475(); |
| } |
| buildCounterRegionsListResponse--; |
| return o; |
| } |
| |
| void checkRegionsListResponse(api.RegionsListResponse o) { |
| buildCounterRegionsListResponse++; |
| if (buildCounterRegionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5475(o.regions!); |
| } |
| buildCounterRegionsListResponse--; |
| } |
| |
| core.int buildCounterRemarketingList = 0; |
| api.RemarketingList buildRemarketingList() { |
| var o = api.RemarketingList(); |
| buildCounterRemarketingList++; |
| if (buildCounterRemarketingList < 3) { |
| o.accountId = 'foo'; |
| o.active = true; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.description = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lifeSpan = 'foo'; |
| o.listPopulationRule = buildListPopulationRule(); |
| o.listSize = 'foo'; |
| o.listSource = 'foo'; |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| } |
| buildCounterRemarketingList--; |
| return o; |
| } |
| |
| void checkRemarketingList(api.RemarketingList o) { |
| buildCounterRemarketingList++; |
| if (buildCounterRemarketingList < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.description!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.lifeSpan!, |
| unittest.equals('foo'), |
| ); |
| checkListPopulationRule(o.listPopulationRule! as api.ListPopulationRule); |
| unittest.expect( |
| o.listSize!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.listSource!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterRemarketingList--; |
| } |
| |
| core.List<core.String> buildUnnamed5476() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5476(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5477() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5477(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterRemarketingListShare = 0; |
| api.RemarketingListShare buildRemarketingListShare() { |
| var o = api.RemarketingListShare(); |
| buildCounterRemarketingListShare++; |
| if (buildCounterRemarketingListShare < 3) { |
| o.kind = 'foo'; |
| o.remarketingListId = 'foo'; |
| o.sharedAccountIds = buildUnnamed5476(); |
| o.sharedAdvertiserIds = buildUnnamed5477(); |
| } |
| buildCounterRemarketingListShare--; |
| return o; |
| } |
| |
| void checkRemarketingListShare(api.RemarketingListShare o) { |
| buildCounterRemarketingListShare++; |
| if (buildCounterRemarketingListShare < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.remarketingListId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5476(o.sharedAccountIds!); |
| checkUnnamed5477(o.sharedAdvertiserIds!); |
| } |
| buildCounterRemarketingListShare--; |
| } |
| |
| core.List<api.RemarketingList> buildUnnamed5478() { |
| var o = <api.RemarketingList>[]; |
| o.add(buildRemarketingList()); |
| o.add(buildRemarketingList()); |
| return o; |
| } |
| |
| void checkUnnamed5478(core.List<api.RemarketingList> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRemarketingList(o[0] as api.RemarketingList); |
| checkRemarketingList(o[1] as api.RemarketingList); |
| } |
| |
| core.int buildCounterRemarketingListsListResponse = 0; |
| api.RemarketingListsListResponse buildRemarketingListsListResponse() { |
| var o = api.RemarketingListsListResponse(); |
| buildCounterRemarketingListsListResponse++; |
| if (buildCounterRemarketingListsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.remarketingLists = buildUnnamed5478(); |
| } |
| buildCounterRemarketingListsListResponse--; |
| return o; |
| } |
| |
| void checkRemarketingListsListResponse(api.RemarketingListsListResponse o) { |
| buildCounterRemarketingListsListResponse++; |
| if (buildCounterRemarketingListsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5478(o.remarketingLists!); |
| } |
| buildCounterRemarketingListsListResponse--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5479() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5479(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5480() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5480(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<core.String> buildUnnamed5481() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5481(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterReportCriteria = 0; |
| api.ReportCriteria buildReportCriteria() { |
| var o = api.ReportCriteria(); |
| buildCounterReportCriteria++; |
| if (buildCounterReportCriteria < 3) { |
| o.activities = buildActivities(); |
| o.customRichMediaEvents = buildCustomRichMediaEvents(); |
| o.dateRange = buildDateRange(); |
| o.dimensionFilters = buildUnnamed5479(); |
| o.dimensions = buildUnnamed5480(); |
| o.metricNames = buildUnnamed5481(); |
| } |
| buildCounterReportCriteria--; |
| return o; |
| } |
| |
| void checkReportCriteria(api.ReportCriteria o) { |
| buildCounterReportCriteria++; |
| if (buildCounterReportCriteria < 3) { |
| checkActivities(o.activities! as api.Activities); |
| checkCustomRichMediaEvents( |
| o.customRichMediaEvents! as api.CustomRichMediaEvents); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed5479(o.dimensionFilters!); |
| checkUnnamed5480(o.dimensions!); |
| checkUnnamed5481(o.metricNames!); |
| } |
| buildCounterReportCriteria--; |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5482() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5482(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5483() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5483(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<core.String> buildUnnamed5484() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5484(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5485() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5485(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterReportCrossDimensionReachCriteria = 0; |
| api.ReportCrossDimensionReachCriteria buildReportCrossDimensionReachCriteria() { |
| var o = api.ReportCrossDimensionReachCriteria(); |
| buildCounterReportCrossDimensionReachCriteria++; |
| if (buildCounterReportCrossDimensionReachCriteria < 3) { |
| o.breakdown = buildUnnamed5482(); |
| o.dateRange = buildDateRange(); |
| o.dimension = 'foo'; |
| o.dimensionFilters = buildUnnamed5483(); |
| o.metricNames = buildUnnamed5484(); |
| o.overlapMetricNames = buildUnnamed5485(); |
| o.pivoted = true; |
| } |
| buildCounterReportCrossDimensionReachCriteria--; |
| return o; |
| } |
| |
| void checkReportCrossDimensionReachCriteria( |
| api.ReportCrossDimensionReachCriteria o) { |
| buildCounterReportCrossDimensionReachCriteria++; |
| if (buildCounterReportCrossDimensionReachCriteria < 3) { |
| checkUnnamed5482(o.breakdown!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| unittest.expect( |
| o.dimension!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5483(o.dimensionFilters!); |
| checkUnnamed5484(o.metricNames!); |
| checkUnnamed5485(o.overlapMetricNames!); |
| unittest.expect(o.pivoted!, unittest.isTrue); |
| } |
| buildCounterReportCrossDimensionReachCriteria--; |
| } |
| |
| core.List<api.Recipient> buildUnnamed5486() { |
| var o = <api.Recipient>[]; |
| o.add(buildRecipient()); |
| o.add(buildRecipient()); |
| return o; |
| } |
| |
| void checkUnnamed5486(core.List<api.Recipient> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkRecipient(o[0] as api.Recipient); |
| checkRecipient(o[1] as api.Recipient); |
| } |
| |
| core.int buildCounterReportDelivery = 0; |
| api.ReportDelivery buildReportDelivery() { |
| var o = api.ReportDelivery(); |
| buildCounterReportDelivery++; |
| if (buildCounterReportDelivery < 3) { |
| o.emailOwner = true; |
| o.emailOwnerDeliveryType = 'foo'; |
| o.message = 'foo'; |
| o.recipients = buildUnnamed5486(); |
| } |
| buildCounterReportDelivery--; |
| return o; |
| } |
| |
| void checkReportDelivery(api.ReportDelivery o) { |
| buildCounterReportDelivery++; |
| if (buildCounterReportDelivery < 3) { |
| unittest.expect(o.emailOwner!, unittest.isTrue); |
| unittest.expect( |
| o.emailOwnerDeliveryType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.message!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5486(o.recipients!); |
| } |
| buildCounterReportDelivery--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5487() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5487(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5488() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5488(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5489() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5489(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<core.String> buildUnnamed5490() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5490(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterReportFloodlightCriteriaReportProperties = 0; |
| api.ReportFloodlightCriteriaReportProperties |
| buildReportFloodlightCriteriaReportProperties() { |
| var o = api.ReportFloodlightCriteriaReportProperties(); |
| buildCounterReportFloodlightCriteriaReportProperties++; |
| if (buildCounterReportFloodlightCriteriaReportProperties < 3) { |
| o.includeAttributedIPConversions = true; |
| o.includeUnattributedCookieConversions = true; |
| o.includeUnattributedIPConversions = true; |
| } |
| buildCounterReportFloodlightCriteriaReportProperties--; |
| return o; |
| } |
| |
| void checkReportFloodlightCriteriaReportProperties( |
| api.ReportFloodlightCriteriaReportProperties o) { |
| buildCounterReportFloodlightCriteriaReportProperties++; |
| if (buildCounterReportFloodlightCriteriaReportProperties < 3) { |
| unittest.expect(o.includeAttributedIPConversions!, unittest.isTrue); |
| unittest.expect(o.includeUnattributedCookieConversions!, unittest.isTrue); |
| unittest.expect(o.includeUnattributedIPConversions!, unittest.isTrue); |
| } |
| buildCounterReportFloodlightCriteriaReportProperties--; |
| } |
| |
| core.int buildCounterReportFloodlightCriteria = 0; |
| api.ReportFloodlightCriteria buildReportFloodlightCriteria() { |
| var o = api.ReportFloodlightCriteria(); |
| buildCounterReportFloodlightCriteria++; |
| if (buildCounterReportFloodlightCriteria < 3) { |
| o.customRichMediaEvents = buildUnnamed5487(); |
| o.dateRange = buildDateRange(); |
| o.dimensionFilters = buildUnnamed5488(); |
| o.dimensions = buildUnnamed5489(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed5490(); |
| o.reportProperties = buildReportFloodlightCriteriaReportProperties(); |
| } |
| buildCounterReportFloodlightCriteria--; |
| return o; |
| } |
| |
| void checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { |
| buildCounterReportFloodlightCriteria++; |
| if (buildCounterReportFloodlightCriteria < 3) { |
| checkUnnamed5487(o.customRichMediaEvents!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed5488(o.dimensionFilters!); |
| checkUnnamed5489(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed5490(o.metricNames!); |
| checkReportFloodlightCriteriaReportProperties( |
| o.reportProperties! as api.ReportFloodlightCriteriaReportProperties); |
| } |
| buildCounterReportFloodlightCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5491() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5491(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5492() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5492(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<core.String> buildUnnamed5493() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5493(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.PathFilter> buildUnnamed5494() { |
| var o = <api.PathFilter>[]; |
| o.add(buildPathFilter()); |
| o.add(buildPathFilter()); |
| return o; |
| } |
| |
| void checkUnnamed5494(core.List<api.PathFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPathFilter(o[0] as api.PathFilter); |
| checkPathFilter(o[1] as api.PathFilter); |
| } |
| |
| core.int buildCounterReportPathAttributionCriteria = 0; |
| api.ReportPathAttributionCriteria buildReportPathAttributionCriteria() { |
| var o = api.ReportPathAttributionCriteria(); |
| buildCounterReportPathAttributionCriteria++; |
| if (buildCounterReportPathAttributionCriteria < 3) { |
| o.activityFilters = buildUnnamed5491(); |
| o.customChannelGrouping = buildChannelGrouping(); |
| o.dateRange = buildDateRange(); |
| o.dimensions = buildUnnamed5492(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed5493(); |
| o.pathFilters = buildUnnamed5494(); |
| } |
| buildCounterReportPathAttributionCriteria--; |
| return o; |
| } |
| |
| void checkReportPathAttributionCriteria(api.ReportPathAttributionCriteria o) { |
| buildCounterReportPathAttributionCriteria++; |
| if (buildCounterReportPathAttributionCriteria < 3) { |
| checkUnnamed5491(o.activityFilters!); |
| checkChannelGrouping(o.customChannelGrouping! as api.ChannelGrouping); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed5492(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed5493(o.metricNames!); |
| checkUnnamed5494(o.pathFilters!); |
| } |
| buildCounterReportPathAttributionCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5495() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5495(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5496() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5496(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<core.String> buildUnnamed5497() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5497(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.PathFilter> buildUnnamed5498() { |
| var o = <api.PathFilter>[]; |
| o.add(buildPathFilter()); |
| o.add(buildPathFilter()); |
| return o; |
| } |
| |
| void checkUnnamed5498(core.List<api.PathFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPathFilter(o[0] as api.PathFilter); |
| checkPathFilter(o[1] as api.PathFilter); |
| } |
| |
| core.int buildCounterReportPathCriteria = 0; |
| api.ReportPathCriteria buildReportPathCriteria() { |
| var o = api.ReportPathCriteria(); |
| buildCounterReportPathCriteria++; |
| if (buildCounterReportPathCriteria < 3) { |
| o.activityFilters = buildUnnamed5495(); |
| o.customChannelGrouping = buildChannelGrouping(); |
| o.dateRange = buildDateRange(); |
| o.dimensions = buildUnnamed5496(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed5497(); |
| o.pathFilters = buildUnnamed5498(); |
| } |
| buildCounterReportPathCriteria--; |
| return o; |
| } |
| |
| void checkReportPathCriteria(api.ReportPathCriteria o) { |
| buildCounterReportPathCriteria++; |
| if (buildCounterReportPathCriteria < 3) { |
| checkUnnamed5495(o.activityFilters!); |
| checkChannelGrouping(o.customChannelGrouping! as api.ChannelGrouping); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed5496(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed5497(o.metricNames!); |
| checkUnnamed5498(o.pathFilters!); |
| } |
| buildCounterReportPathCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5499() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5499(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5500() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5500(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5501() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5501(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5502() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5502(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<core.String> buildUnnamed5503() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5503(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5504() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5504(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.int buildCounterReportPathToConversionCriteriaReportProperties = 0; |
| api.ReportPathToConversionCriteriaReportProperties |
| buildReportPathToConversionCriteriaReportProperties() { |
| var o = api.ReportPathToConversionCriteriaReportProperties(); |
| buildCounterReportPathToConversionCriteriaReportProperties++; |
| if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { |
| o.clicksLookbackWindow = 42; |
| o.impressionsLookbackWindow = 42; |
| o.includeAttributedIPConversions = true; |
| o.includeUnattributedCookieConversions = true; |
| o.includeUnattributedIPConversions = true; |
| o.maximumClickInteractions = 42; |
| o.maximumImpressionInteractions = 42; |
| o.maximumInteractionGap = 42; |
| o.pivotOnInteractionPath = true; |
| } |
| buildCounterReportPathToConversionCriteriaReportProperties--; |
| return o; |
| } |
| |
| void checkReportPathToConversionCriteriaReportProperties( |
| api.ReportPathToConversionCriteriaReportProperties o) { |
| buildCounterReportPathToConversionCriteriaReportProperties++; |
| if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { |
| unittest.expect( |
| o.clicksLookbackWindow!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.impressionsLookbackWindow!, |
| unittest.equals(42), |
| ); |
| unittest.expect(o.includeAttributedIPConversions!, unittest.isTrue); |
| unittest.expect(o.includeUnattributedCookieConversions!, unittest.isTrue); |
| unittest.expect(o.includeUnattributedIPConversions!, unittest.isTrue); |
| unittest.expect( |
| o.maximumClickInteractions!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.maximumImpressionInteractions!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.maximumInteractionGap!, |
| unittest.equals(42), |
| ); |
| unittest.expect(o.pivotOnInteractionPath!, unittest.isTrue); |
| } |
| buildCounterReportPathToConversionCriteriaReportProperties--; |
| } |
| |
| core.int buildCounterReportPathToConversionCriteria = 0; |
| api.ReportPathToConversionCriteria buildReportPathToConversionCriteria() { |
| var o = api.ReportPathToConversionCriteria(); |
| buildCounterReportPathToConversionCriteria++; |
| if (buildCounterReportPathToConversionCriteria < 3) { |
| o.activityFilters = buildUnnamed5499(); |
| o.conversionDimensions = buildUnnamed5500(); |
| o.customFloodlightVariables = buildUnnamed5501(); |
| o.customRichMediaEvents = buildUnnamed5502(); |
| o.dateRange = buildDateRange(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed5503(); |
| o.perInteractionDimensions = buildUnnamed5504(); |
| o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); |
| } |
| buildCounterReportPathToConversionCriteria--; |
| return o; |
| } |
| |
| void checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { |
| buildCounterReportPathToConversionCriteria++; |
| if (buildCounterReportPathToConversionCriteria < 3) { |
| checkUnnamed5499(o.activityFilters!); |
| checkUnnamed5500(o.conversionDimensions!); |
| checkUnnamed5501(o.customFloodlightVariables!); |
| checkUnnamed5502(o.customRichMediaEvents!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed5503(o.metricNames!); |
| checkUnnamed5504(o.perInteractionDimensions!); |
| checkReportPathToConversionCriteriaReportProperties(o.reportProperties! |
| as api.ReportPathToConversionCriteriaReportProperties); |
| } |
| buildCounterReportPathToConversionCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed5505() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed5505(core.List<api.DimensionValue> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimensionValue(o[0] as api.DimensionValue); |
| checkDimensionValue(o[1] as api.DimensionValue); |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed5506() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5506(core.List<api.SortedDimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSortedDimension(o[0] as api.SortedDimension); |
| checkSortedDimension(o[1] as api.SortedDimension); |
| } |
| |
| core.List<core.String> buildUnnamed5507() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5507(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5508() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5508(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterReportReachCriteria = 0; |
| api.ReportReachCriteria buildReportReachCriteria() { |
| var o = api.ReportReachCriteria(); |
| buildCounterReportReachCriteria++; |
| if (buildCounterReportReachCriteria < 3) { |
| o.activities = buildActivities(); |
| o.customRichMediaEvents = buildCustomRichMediaEvents(); |
| o.dateRange = buildDateRange(); |
| o.dimensionFilters = buildUnnamed5505(); |
| o.dimensions = buildUnnamed5506(); |
| o.enableAllDimensionCombinations = true; |
| o.metricNames = buildUnnamed5507(); |
| o.reachByFrequencyMetricNames = buildUnnamed5508(); |
| } |
| buildCounterReportReachCriteria--; |
| return o; |
| } |
| |
| void checkReportReachCriteria(api.ReportReachCriteria o) { |
| buildCounterReportReachCriteria++; |
| if (buildCounterReportReachCriteria < 3) { |
| checkActivities(o.activities! as api.Activities); |
| checkCustomRichMediaEvents( |
| o.customRichMediaEvents! as api.CustomRichMediaEvents); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed5505(o.dimensionFilters!); |
| checkUnnamed5506(o.dimensions!); |
| unittest.expect(o.enableAllDimensionCombinations!, unittest.isTrue); |
| checkUnnamed5507(o.metricNames!); |
| checkUnnamed5508(o.reachByFrequencyMetricNames!); |
| } |
| buildCounterReportReachCriteria--; |
| } |
| |
| core.List<core.String> buildUnnamed5509() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5509(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterReportSchedule = 0; |
| api.ReportSchedule buildReportSchedule() { |
| var o = api.ReportSchedule(); |
| buildCounterReportSchedule++; |
| if (buildCounterReportSchedule < 3) { |
| o.active = true; |
| o.every = 42; |
| o.expirationDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.repeats = 'foo'; |
| o.repeatsOnWeekDays = buildUnnamed5509(); |
| o.runsOnDayOfMonth = 'foo'; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| } |
| buildCounterReportSchedule--; |
| return o; |
| } |
| |
| void checkReportSchedule(api.ReportSchedule o) { |
| buildCounterReportSchedule++; |
| if (buildCounterReportSchedule < 3) { |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.every!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.expirationDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| unittest.expect( |
| o.repeats!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5509(o.repeatsOnWeekDays!); |
| unittest.expect( |
| o.runsOnDayOfMonth!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.startDate!, |
| unittest.equals(core.DateTime.parse("2002-02-27T00:00:00")), |
| ); |
| } |
| buildCounterReportSchedule--; |
| } |
| |
| core.int buildCounterReport = 0; |
| api.Report buildReport() { |
| var o = api.Report(); |
| buildCounterReport++; |
| if (buildCounterReport < 3) { |
| o.accountId = 'foo'; |
| o.criteria = buildReportCriteria(); |
| o.crossDimensionReachCriteria = buildReportCrossDimensionReachCriteria(); |
| o.delivery = buildReportDelivery(); |
| o.etag = 'foo'; |
| o.fileName = 'foo'; |
| o.floodlightCriteria = buildReportFloodlightCriteria(); |
| o.format = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastModifiedTime = 'foo'; |
| o.name = 'foo'; |
| o.ownerProfileId = 'foo'; |
| o.pathAttributionCriteria = buildReportPathAttributionCriteria(); |
| o.pathCriteria = buildReportPathCriteria(); |
| o.pathToConversionCriteria = buildReportPathToConversionCriteria(); |
| o.reachCriteria = buildReportReachCriteria(); |
| o.schedule = buildReportSchedule(); |
| o.subAccountId = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterReport--; |
| return o; |
| } |
| |
| void checkReport(api.Report o) { |
| buildCounterReport++; |
| if (buildCounterReport < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| checkReportCriteria(o.criteria! as api.ReportCriteria); |
| checkReportCrossDimensionReachCriteria(o.crossDimensionReachCriteria! |
| as api.ReportCrossDimensionReachCriteria); |
| checkReportDelivery(o.delivery! as api.ReportDelivery); |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.fileName!, |
| unittest.equals('foo'), |
| ); |
| checkReportFloodlightCriteria( |
| o.floodlightCriteria! as api.ReportFloodlightCriteria); |
| unittest.expect( |
| o.format!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.lastModifiedTime!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.ownerProfileId!, |
| unittest.equals('foo'), |
| ); |
| checkReportPathAttributionCriteria( |
| o.pathAttributionCriteria! as api.ReportPathAttributionCriteria); |
| checkReportPathCriteria(o.pathCriteria! as api.ReportPathCriteria); |
| checkReportPathToConversionCriteria( |
| o.pathToConversionCriteria! as api.ReportPathToConversionCriteria); |
| checkReportReachCriteria(o.reachCriteria! as api.ReportReachCriteria); |
| checkReportSchedule(o.schedule! as api.ReportSchedule); |
| unittest.expect( |
| o.subAccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.type!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterReport--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed5510() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5510(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Dimension> buildUnnamed5511() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed5511(core.List<api.Dimension> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDimension(o[0] as api.Dimension); |
| checkDimension(o[1] as api.Dimension); |
| } |
| |
| core.List<api.Metric> buildUnnamed5512() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5512(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.List<api.Metric> buildUnnamed5513() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed5513(core.List<api.Metric> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMetric(o[0] as api.Metric); |
| checkMetric(o[1] as api.Metric); |
| } |
| |
| core.int buildCounterReportCompatibleFields = 0; |
| api.ReportCompatibleFields buildReportCompatibleFields() { |
| var o = api.ReportCompatibleFields(); |
| buildCounterReportCompatibleFields++; |
| if (buildCounterReportCompatibleFields < 3) { |
| o.dimensionFilters = buildUnnamed5510(); |
| o.dimensions = buildUnnamed5511(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed5512(); |
| o.pivotedActivityMetrics = buildUnnamed5513(); |
| } |
| buildCounterReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkReportCompatibleFields(api.ReportCompatibleFields o) { |
| buildCounterReportCompatibleFields++; |
| if (buildCounterReportCompatibleFields < 3) { |
| checkUnnamed5510(o.dimensionFilters!); |
| checkUnnamed5511(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5512(o.metrics!); |
| checkUnnamed5513(o.pivotedActivityMetrics!); |
| } |
| buildCounterReportCompatibleFields--; |
| } |
| |
| core.List<api.Report> buildUnnamed5514() { |
| var o = <api.Report>[]; |
| o.add(buildReport()); |
| o.add(buildReport()); |
| return o; |
| } |
| |
| void checkUnnamed5514(core.List<api.Report> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkReport(o[0] as api.Report); |
| checkReport(o[1] as api.Report); |
| } |
| |
| core.int buildCounterReportList = 0; |
| api.ReportList buildReportList() { |
| var o = api.ReportList(); |
| buildCounterReportList++; |
| if (buildCounterReportList < 3) { |
| o.etag = 'foo'; |
| o.items = buildUnnamed5514(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterReportList--; |
| return o; |
| } |
| |
| void checkReportList(api.ReportList o) { |
| buildCounterReportList++; |
| if (buildCounterReportList < 3) { |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5514(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterReportList--; |
| } |
| |
| core.int buildCounterReportsConfiguration = 0; |
| api.ReportsConfiguration buildReportsConfiguration() { |
| var o = api.ReportsConfiguration(); |
| buildCounterReportsConfiguration++; |
| if (buildCounterReportsConfiguration < 3) { |
| o.exposureToConversionEnabled = true; |
| o.lookbackConfiguration = buildLookbackConfiguration(); |
| o.reportGenerationTimeZoneId = 'foo'; |
| } |
| buildCounterReportsConfiguration--; |
| return o; |
| } |
| |
| void checkReportsConfiguration(api.ReportsConfiguration o) { |
| buildCounterReportsConfiguration++; |
| if (buildCounterReportsConfiguration < 3) { |
| unittest.expect(o.exposureToConversionEnabled!, unittest.isTrue); |
| checkLookbackConfiguration( |
| o.lookbackConfiguration! as api.LookbackConfiguration); |
| unittest.expect( |
| o.reportGenerationTimeZoneId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterReportsConfiguration--; |
| } |
| |
| core.int buildCounterRichMediaExitOverride = 0; |
| api.RichMediaExitOverride buildRichMediaExitOverride() { |
| var o = api.RichMediaExitOverride(); |
| buildCounterRichMediaExitOverride++; |
| if (buildCounterRichMediaExitOverride < 3) { |
| o.clickThroughUrl = buildClickThroughUrl(); |
| o.enabled = true; |
| o.exitId = 'foo'; |
| } |
| buildCounterRichMediaExitOverride--; |
| return o; |
| } |
| |
| void checkRichMediaExitOverride(api.RichMediaExitOverride o) { |
| buildCounterRichMediaExitOverride++; |
| if (buildCounterRichMediaExitOverride < 3) { |
| checkClickThroughUrl(o.clickThroughUrl! as api.ClickThroughUrl); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| unittest.expect( |
| o.exitId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterRichMediaExitOverride--; |
| } |
| |
| core.int buildCounterRule = 0; |
| api.Rule buildRule() { |
| var o = api.Rule(); |
| buildCounterRule++; |
| if (buildCounterRule < 3) { |
| o.assetId = 'foo'; |
| o.name = 'foo'; |
| o.targetingTemplateId = 'foo'; |
| } |
| buildCounterRule--; |
| return o; |
| } |
| |
| void checkRule(api.Rule o) { |
| buildCounterRule++; |
| if (buildCounterRule < 3) { |
| unittest.expect( |
| o.assetId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetingTemplateId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterRule--; |
| } |
| |
| core.List<api.SiteContact> buildUnnamed5515() { |
| var o = <api.SiteContact>[]; |
| o.add(buildSiteContact()); |
| o.add(buildSiteContact()); |
| return o; |
| } |
| |
| void checkUnnamed5515(core.List<api.SiteContact> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSiteContact(o[0] as api.SiteContact); |
| checkSiteContact(o[1] as api.SiteContact); |
| } |
| |
| core.int buildCounterSite = 0; |
| api.Site buildSite() { |
| var o = api.Site(); |
| buildCounterSite++; |
| if (buildCounterSite < 3) { |
| o.accountId = 'foo'; |
| o.approved = true; |
| o.directorySiteId = 'foo'; |
| o.directorySiteIdDimensionValue = buildDimensionValue(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.keyName = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.siteContacts = buildUnnamed5515(); |
| o.siteSettings = buildSiteSettings(); |
| o.subaccountId = 'foo'; |
| o.videoSettings = buildSiteVideoSettings(); |
| } |
| buildCounterSite--; |
| return o; |
| } |
| |
| void checkSite(api.Site o) { |
| buildCounterSite++; |
| if (buildCounterSite < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.approved!, unittest.isTrue); |
| unittest.expect( |
| o.directorySiteId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.directorySiteIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.idDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.keyName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5515(o.siteContacts!); |
| checkSiteSettings(o.siteSettings! as api.SiteSettings); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| checkSiteVideoSettings(o.videoSettings! as api.SiteVideoSettings); |
| } |
| buildCounterSite--; |
| } |
| |
| core.List<api.Size> buildUnnamed5516() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5516(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.int buildCounterSiteCompanionSetting = 0; |
| api.SiteCompanionSetting buildSiteCompanionSetting() { |
| var o = api.SiteCompanionSetting(); |
| buildCounterSiteCompanionSetting++; |
| if (buildCounterSiteCompanionSetting < 3) { |
| o.companionsDisabled = true; |
| o.enabledSizes = buildUnnamed5516(); |
| o.imageOnly = true; |
| o.kind = 'foo'; |
| } |
| buildCounterSiteCompanionSetting--; |
| return o; |
| } |
| |
| void checkSiteCompanionSetting(api.SiteCompanionSetting o) { |
| buildCounterSiteCompanionSetting++; |
| if (buildCounterSiteCompanionSetting < 3) { |
| unittest.expect(o.companionsDisabled!, unittest.isTrue); |
| checkUnnamed5516(o.enabledSizes!); |
| unittest.expect(o.imageOnly!, unittest.isTrue); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSiteCompanionSetting--; |
| } |
| |
| core.int buildCounterSiteContact = 0; |
| api.SiteContact buildSiteContact() { |
| var o = api.SiteContact(); |
| buildCounterSiteContact++; |
| if (buildCounterSiteContact < 3) { |
| o.address = 'foo'; |
| o.contactType = 'foo'; |
| o.email = 'foo'; |
| o.firstName = 'foo'; |
| o.id = 'foo'; |
| o.lastName = 'foo'; |
| o.phone = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterSiteContact--; |
| return o; |
| } |
| |
| void checkSiteContact(api.SiteContact o) { |
| buildCounterSiteContact++; |
| if (buildCounterSiteContact < 3) { |
| unittest.expect( |
| o.address!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.contactType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.email!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.firstName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.lastName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.phone!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.title!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSiteContact--; |
| } |
| |
| core.int buildCounterSiteSettings = 0; |
| api.SiteSettings buildSiteSettings() { |
| var o = api.SiteSettings(); |
| buildCounterSiteSettings++; |
| if (buildCounterSiteSettings < 3) { |
| o.activeViewOptOut = true; |
| o.adBlockingOptOut = true; |
| o.disableNewCookie = true; |
| o.tagSetting = buildTagSetting(); |
| o.videoActiveViewOptOutTemplate = true; |
| o.vpaidAdapterChoiceTemplate = 'foo'; |
| } |
| buildCounterSiteSettings--; |
| return o; |
| } |
| |
| void checkSiteSettings(api.SiteSettings o) { |
| buildCounterSiteSettings++; |
| if (buildCounterSiteSettings < 3) { |
| unittest.expect(o.activeViewOptOut!, unittest.isTrue); |
| unittest.expect(o.adBlockingOptOut!, unittest.isTrue); |
| unittest.expect(o.disableNewCookie!, unittest.isTrue); |
| checkTagSetting(o.tagSetting! as api.TagSetting); |
| unittest.expect(o.videoActiveViewOptOutTemplate!, unittest.isTrue); |
| unittest.expect( |
| o.vpaidAdapterChoiceTemplate!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSiteSettings--; |
| } |
| |
| core.int buildCounterSiteSkippableSetting = 0; |
| api.SiteSkippableSetting buildSiteSkippableSetting() { |
| var o = api.SiteSkippableSetting(); |
| buildCounterSiteSkippableSetting++; |
| if (buildCounterSiteSkippableSetting < 3) { |
| o.kind = 'foo'; |
| o.progressOffset = buildVideoOffset(); |
| o.skipOffset = buildVideoOffset(); |
| o.skippable = true; |
| } |
| buildCounterSiteSkippableSetting--; |
| return o; |
| } |
| |
| void checkSiteSkippableSetting(api.SiteSkippableSetting o) { |
| buildCounterSiteSkippableSetting++; |
| if (buildCounterSiteSkippableSetting < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkVideoOffset(o.progressOffset! as api.VideoOffset); |
| checkVideoOffset(o.skipOffset! as api.VideoOffset); |
| unittest.expect(o.skippable!, unittest.isTrue); |
| } |
| buildCounterSiteSkippableSetting--; |
| } |
| |
| core.List<core.int> buildUnnamed5517() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed5517(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals(42), |
| ); |
| } |
| |
| core.int buildCounterSiteTranscodeSetting = 0; |
| api.SiteTranscodeSetting buildSiteTranscodeSetting() { |
| var o = api.SiteTranscodeSetting(); |
| buildCounterSiteTranscodeSetting++; |
| if (buildCounterSiteTranscodeSetting < 3) { |
| o.enabledVideoFormats = buildUnnamed5517(); |
| o.kind = 'foo'; |
| } |
| buildCounterSiteTranscodeSetting--; |
| return o; |
| } |
| |
| void checkSiteTranscodeSetting(api.SiteTranscodeSetting o) { |
| buildCounterSiteTranscodeSetting++; |
| if (buildCounterSiteTranscodeSetting < 3) { |
| checkUnnamed5517(o.enabledVideoFormats!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSiteTranscodeSetting--; |
| } |
| |
| core.int buildCounterSiteVideoSettings = 0; |
| api.SiteVideoSettings buildSiteVideoSettings() { |
| var o = api.SiteVideoSettings(); |
| buildCounterSiteVideoSettings++; |
| if (buildCounterSiteVideoSettings < 3) { |
| o.companionSettings = buildSiteCompanionSetting(); |
| o.kind = 'foo'; |
| o.obaEnabled = true; |
| o.obaSettings = buildObaIcon(); |
| o.orientation = 'foo'; |
| o.skippableSettings = buildSiteSkippableSetting(); |
| o.transcodeSettings = buildSiteTranscodeSetting(); |
| } |
| buildCounterSiteVideoSettings--; |
| return o; |
| } |
| |
| void checkSiteVideoSettings(api.SiteVideoSettings o) { |
| buildCounterSiteVideoSettings++; |
| if (buildCounterSiteVideoSettings < 3) { |
| checkSiteCompanionSetting(o.companionSettings! as api.SiteCompanionSetting); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.obaEnabled!, unittest.isTrue); |
| checkObaIcon(o.obaSettings! as api.ObaIcon); |
| unittest.expect( |
| o.orientation!, |
| unittest.equals('foo'), |
| ); |
| checkSiteSkippableSetting(o.skippableSettings! as api.SiteSkippableSetting); |
| checkSiteTranscodeSetting(o.transcodeSettings! as api.SiteTranscodeSetting); |
| } |
| buildCounterSiteVideoSettings--; |
| } |
| |
| core.List<api.Site> buildUnnamed5518() { |
| var o = <api.Site>[]; |
| o.add(buildSite()); |
| o.add(buildSite()); |
| return o; |
| } |
| |
| void checkUnnamed5518(core.List<api.Site> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSite(o[0] as api.Site); |
| checkSite(o[1] as api.Site); |
| } |
| |
| core.int buildCounterSitesListResponse = 0; |
| api.SitesListResponse buildSitesListResponse() { |
| var o = api.SitesListResponse(); |
| buildCounterSitesListResponse++; |
| if (buildCounterSitesListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.sites = buildUnnamed5518(); |
| } |
| buildCounterSitesListResponse--; |
| return o; |
| } |
| |
| void checkSitesListResponse(api.SitesListResponse o) { |
| buildCounterSitesListResponse++; |
| if (buildCounterSitesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5518(o.sites!); |
| } |
| buildCounterSitesListResponse--; |
| } |
| |
| core.int buildCounterSize = 0; |
| api.Size buildSize() { |
| var o = api.Size(); |
| buildCounterSize++; |
| if (buildCounterSize < 3) { |
| o.height = 42; |
| o.iab = true; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.width = 42; |
| } |
| buildCounterSize--; |
| return o; |
| } |
| |
| void checkSize(api.Size o) { |
| buildCounterSize++; |
| if (buildCounterSize < 3) { |
| unittest.expect( |
| o.height!, |
| unittest.equals(42), |
| ); |
| unittest.expect(o.iab!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.width!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterSize--; |
| } |
| |
| core.List<api.Size> buildUnnamed5519() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed5519(core.List<api.Size> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSize(o[0] as api.Size); |
| checkSize(o[1] as api.Size); |
| } |
| |
| core.int buildCounterSizesListResponse = 0; |
| api.SizesListResponse buildSizesListResponse() { |
| var o = api.SizesListResponse(); |
| buildCounterSizesListResponse++; |
| if (buildCounterSizesListResponse < 3) { |
| o.kind = 'foo'; |
| o.sizes = buildUnnamed5519(); |
| } |
| buildCounterSizesListResponse--; |
| return o; |
| } |
| |
| void checkSizesListResponse(api.SizesListResponse o) { |
| buildCounterSizesListResponse++; |
| if (buildCounterSizesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5519(o.sizes!); |
| } |
| buildCounterSizesListResponse--; |
| } |
| |
| core.int buildCounterSkippableSetting = 0; |
| api.SkippableSetting buildSkippableSetting() { |
| var o = api.SkippableSetting(); |
| buildCounterSkippableSetting++; |
| if (buildCounterSkippableSetting < 3) { |
| o.kind = 'foo'; |
| o.progressOffset = buildVideoOffset(); |
| o.skipOffset = buildVideoOffset(); |
| o.skippable = true; |
| } |
| buildCounterSkippableSetting--; |
| return o; |
| } |
| |
| void checkSkippableSetting(api.SkippableSetting o) { |
| buildCounterSkippableSetting++; |
| if (buildCounterSkippableSetting < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkVideoOffset(o.progressOffset! as api.VideoOffset); |
| checkVideoOffset(o.skipOffset! as api.VideoOffset); |
| unittest.expect(o.skippable!, unittest.isTrue); |
| } |
| buildCounterSkippableSetting--; |
| } |
| |
| core.int buildCounterSortedDimension = 0; |
| api.SortedDimension buildSortedDimension() { |
| var o = api.SortedDimension(); |
| buildCounterSortedDimension++; |
| if (buildCounterSortedDimension < 3) { |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.sortOrder = 'foo'; |
| } |
| buildCounterSortedDimension--; |
| return o; |
| } |
| |
| void checkSortedDimension(api.SortedDimension o) { |
| buildCounterSortedDimension++; |
| if (buildCounterSortedDimension < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.sortOrder!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSortedDimension--; |
| } |
| |
| core.List<core.String> buildUnnamed5520() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5520(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.int buildCounterSubaccount = 0; |
| api.Subaccount buildSubaccount() { |
| var o = api.Subaccount(); |
| buildCounterSubaccount++; |
| if (buildCounterSubaccount < 3) { |
| o.accountId = 'foo'; |
| o.availablePermissionIds = buildUnnamed5520(); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterSubaccount--; |
| return o; |
| } |
| |
| void checkSubaccount(api.Subaccount o) { |
| buildCounterSubaccount++; |
| if (buildCounterSubaccount < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5520(o.availablePermissionIds!); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterSubaccount--; |
| } |
| |
| core.List<api.Subaccount> buildUnnamed5521() { |
| var o = <api.Subaccount>[]; |
| o.add(buildSubaccount()); |
| o.add(buildSubaccount()); |
| return o; |
| } |
| |
| void checkUnnamed5521(core.List<api.Subaccount> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSubaccount(o[0] as api.Subaccount); |
| checkSubaccount(o[1] as api.Subaccount); |
| } |
| |
| core.int buildCounterSubaccountsListResponse = 0; |
| api.SubaccountsListResponse buildSubaccountsListResponse() { |
| var o = api.SubaccountsListResponse(); |
| buildCounterSubaccountsListResponse++; |
| if (buildCounterSubaccountsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.subaccounts = buildUnnamed5521(); |
| } |
| buildCounterSubaccountsListResponse--; |
| return o; |
| } |
| |
| void checkSubaccountsListResponse(api.SubaccountsListResponse o) { |
| buildCounterSubaccountsListResponse++; |
| if (buildCounterSubaccountsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5521(o.subaccounts!); |
| } |
| buildCounterSubaccountsListResponse--; |
| } |
| |
| core.int buildCounterTagData = 0; |
| api.TagData buildTagData() { |
| var o = api.TagData(); |
| buildCounterTagData++; |
| if (buildCounterTagData < 3) { |
| o.adId = 'foo'; |
| o.clickTag = 'foo'; |
| o.creativeId = 'foo'; |
| o.format = 'foo'; |
| o.impressionTag = 'foo'; |
| } |
| buildCounterTagData--; |
| return o; |
| } |
| |
| void checkTagData(api.TagData o) { |
| buildCounterTagData++; |
| if (buildCounterTagData < 3) { |
| unittest.expect( |
| o.adId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.clickTag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.creativeId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.format!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.impressionTag!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterTagData--; |
| } |
| |
| core.int buildCounterTagSetting = 0; |
| api.TagSetting buildTagSetting() { |
| var o = api.TagSetting(); |
| buildCounterTagSetting++; |
| if (buildCounterTagSetting < 3) { |
| o.additionalKeyValues = 'foo'; |
| o.includeClickThroughUrls = true; |
| o.includeClickTracking = true; |
| o.keywordOption = 'foo'; |
| } |
| buildCounterTagSetting--; |
| return o; |
| } |
| |
| void checkTagSetting(api.TagSetting o) { |
| buildCounterTagSetting++; |
| if (buildCounterTagSetting < 3) { |
| unittest.expect( |
| o.additionalKeyValues!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.includeClickThroughUrls!, unittest.isTrue); |
| unittest.expect(o.includeClickTracking!, unittest.isTrue); |
| unittest.expect( |
| o.keywordOption!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterTagSetting--; |
| } |
| |
| core.int buildCounterTagSettings = 0; |
| api.TagSettings buildTagSettings() { |
| var o = api.TagSettings(); |
| buildCounterTagSettings++; |
| if (buildCounterTagSettings < 3) { |
| o.dynamicTagEnabled = true; |
| o.imageTagEnabled = true; |
| } |
| buildCounterTagSettings--; |
| return o; |
| } |
| |
| void checkTagSettings(api.TagSettings o) { |
| buildCounterTagSettings++; |
| if (buildCounterTagSettings < 3) { |
| unittest.expect(o.dynamicTagEnabled!, unittest.isTrue); |
| unittest.expect(o.imageTagEnabled!, unittest.isTrue); |
| } |
| buildCounterTagSettings--; |
| } |
| |
| core.int buildCounterTargetWindow = 0; |
| api.TargetWindow buildTargetWindow() { |
| var o = api.TargetWindow(); |
| buildCounterTargetWindow++; |
| if (buildCounterTargetWindow < 3) { |
| o.customHtml = 'foo'; |
| o.targetWindowOption = 'foo'; |
| } |
| buildCounterTargetWindow--; |
| return o; |
| } |
| |
| void checkTargetWindow(api.TargetWindow o) { |
| buildCounterTargetWindow++; |
| if (buildCounterTargetWindow < 3) { |
| unittest.expect( |
| o.customHtml!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.targetWindowOption!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterTargetWindow--; |
| } |
| |
| core.int buildCounterTargetableRemarketingList = 0; |
| api.TargetableRemarketingList buildTargetableRemarketingList() { |
| var o = api.TargetableRemarketingList(); |
| buildCounterTargetableRemarketingList++; |
| if (buildCounterTargetableRemarketingList < 3) { |
| o.accountId = 'foo'; |
| o.active = true; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.description = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lifeSpan = 'foo'; |
| o.listSize = 'foo'; |
| o.listSource = 'foo'; |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| } |
| buildCounterTargetableRemarketingList--; |
| return o; |
| } |
| |
| void checkTargetableRemarketingList(api.TargetableRemarketingList o) { |
| buildCounterTargetableRemarketingList++; |
| if (buildCounterTargetableRemarketingList < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.active!, unittest.isTrue); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| unittest.expect( |
| o.description!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.lifeSpan!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.listSize!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.listSource!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterTargetableRemarketingList--; |
| } |
| |
| core.List<api.TargetableRemarketingList> buildUnnamed5522() { |
| var o = <api.TargetableRemarketingList>[]; |
| o.add(buildTargetableRemarketingList()); |
| o.add(buildTargetableRemarketingList()); |
| return o; |
| } |
| |
| void checkUnnamed5522(core.List<api.TargetableRemarketingList> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkTargetableRemarketingList(o[0] as api.TargetableRemarketingList); |
| checkTargetableRemarketingList(o[1] as api.TargetableRemarketingList); |
| } |
| |
| core.int buildCounterTargetableRemarketingListsListResponse = 0; |
| api.TargetableRemarketingListsListResponse |
| buildTargetableRemarketingListsListResponse() { |
| var o = api.TargetableRemarketingListsListResponse(); |
| buildCounterTargetableRemarketingListsListResponse++; |
| if (buildCounterTargetableRemarketingListsListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.targetableRemarketingLists = buildUnnamed5522(); |
| } |
| buildCounterTargetableRemarketingListsListResponse--; |
| return o; |
| } |
| |
| void checkTargetableRemarketingListsListResponse( |
| api.TargetableRemarketingListsListResponse o) { |
| buildCounterTargetableRemarketingListsListResponse++; |
| if (buildCounterTargetableRemarketingListsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5522(o.targetableRemarketingLists!); |
| } |
| buildCounterTargetableRemarketingListsListResponse--; |
| } |
| |
| core.int buildCounterTargetingTemplate = 0; |
| api.TargetingTemplate buildTargetingTemplate() { |
| var o = api.TargetingTemplate(); |
| buildCounterTargetingTemplate++; |
| if (buildCounterTargetingTemplate < 3) { |
| o.accountId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.dayPartTargeting = buildDayPartTargeting(); |
| o.geoTargeting = buildGeoTargeting(); |
| o.id = 'foo'; |
| o.keyValueTargetingExpression = buildKeyValueTargetingExpression(); |
| o.kind = 'foo'; |
| o.languageTargeting = buildLanguageTargeting(); |
| o.listTargetingExpression = buildListTargetingExpression(); |
| o.name = 'foo'; |
| o.subaccountId = 'foo'; |
| o.technologyTargeting = buildTechnologyTargeting(); |
| } |
| buildCounterTargetingTemplate--; |
| return o; |
| } |
| |
| void checkTargetingTemplate(api.TargetingTemplate o) { |
| buildCounterTargetingTemplate++; |
| if (buildCounterTargetingTemplate < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.advertiserId!, |
| unittest.equals('foo'), |
| ); |
| checkDimensionValue(o.advertiserIdDimensionValue! as api.DimensionValue); |
| checkDayPartTargeting(o.dayPartTargeting! as api.DayPartTargeting); |
| checkGeoTargeting(o.geoTargeting! as api.GeoTargeting); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| checkKeyValueTargetingExpression( |
| o.keyValueTargetingExpression! as api.KeyValueTargetingExpression); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkLanguageTargeting(o.languageTargeting! as api.LanguageTargeting); |
| checkListTargetingExpression( |
| o.listTargetingExpression! as api.ListTargetingExpression); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| checkTechnologyTargeting(o.technologyTargeting! as api.TechnologyTargeting); |
| } |
| buildCounterTargetingTemplate--; |
| } |
| |
| core.List<api.TargetingTemplate> buildUnnamed5523() { |
| var o = <api.TargetingTemplate>[]; |
| o.add(buildTargetingTemplate()); |
| o.add(buildTargetingTemplate()); |
| return o; |
| } |
| |
| void checkUnnamed5523(core.List<api.TargetingTemplate> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkTargetingTemplate(o[0] as api.TargetingTemplate); |
| checkTargetingTemplate(o[1] as api.TargetingTemplate); |
| } |
| |
| core.int buildCounterTargetingTemplatesListResponse = 0; |
| api.TargetingTemplatesListResponse buildTargetingTemplatesListResponse() { |
| var o = api.TargetingTemplatesListResponse(); |
| buildCounterTargetingTemplatesListResponse++; |
| if (buildCounterTargetingTemplatesListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.targetingTemplates = buildUnnamed5523(); |
| } |
| buildCounterTargetingTemplatesListResponse--; |
| return o; |
| } |
| |
| void checkTargetingTemplatesListResponse(api.TargetingTemplatesListResponse o) { |
| buildCounterTargetingTemplatesListResponse++; |
| if (buildCounterTargetingTemplatesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5523(o.targetingTemplates!); |
| } |
| buildCounterTargetingTemplatesListResponse--; |
| } |
| |
| core.List<api.Browser> buildUnnamed5524() { |
| var o = <api.Browser>[]; |
| o.add(buildBrowser()); |
| o.add(buildBrowser()); |
| return o; |
| } |
| |
| void checkUnnamed5524(core.List<api.Browser> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkBrowser(o[0] as api.Browser); |
| checkBrowser(o[1] as api.Browser); |
| } |
| |
| core.List<api.ConnectionType> buildUnnamed5525() { |
| var o = <api.ConnectionType>[]; |
| o.add(buildConnectionType()); |
| o.add(buildConnectionType()); |
| return o; |
| } |
| |
| void checkUnnamed5525(core.List<api.ConnectionType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkConnectionType(o[0] as api.ConnectionType); |
| checkConnectionType(o[1] as api.ConnectionType); |
| } |
| |
| core.List<api.MobileCarrier> buildUnnamed5526() { |
| var o = <api.MobileCarrier>[]; |
| o.add(buildMobileCarrier()); |
| o.add(buildMobileCarrier()); |
| return o; |
| } |
| |
| void checkUnnamed5526(core.List<api.MobileCarrier> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMobileCarrier(o[0] as api.MobileCarrier); |
| checkMobileCarrier(o[1] as api.MobileCarrier); |
| } |
| |
| core.List<api.OperatingSystemVersion> buildUnnamed5527() { |
| var o = <api.OperatingSystemVersion>[]; |
| o.add(buildOperatingSystemVersion()); |
| o.add(buildOperatingSystemVersion()); |
| return o; |
| } |
| |
| void checkUnnamed5527(core.List<api.OperatingSystemVersion> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperatingSystemVersion(o[0] as api.OperatingSystemVersion); |
| checkOperatingSystemVersion(o[1] as api.OperatingSystemVersion); |
| } |
| |
| core.List<api.OperatingSystem> buildUnnamed5528() { |
| var o = <api.OperatingSystem>[]; |
| o.add(buildOperatingSystem()); |
| o.add(buildOperatingSystem()); |
| return o; |
| } |
| |
| void checkUnnamed5528(core.List<api.OperatingSystem> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperatingSystem(o[0] as api.OperatingSystem); |
| checkOperatingSystem(o[1] as api.OperatingSystem); |
| } |
| |
| core.List<api.PlatformType> buildUnnamed5529() { |
| var o = <api.PlatformType>[]; |
| o.add(buildPlatformType()); |
| o.add(buildPlatformType()); |
| return o; |
| } |
| |
| void checkUnnamed5529(core.List<api.PlatformType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPlatformType(o[0] as api.PlatformType); |
| checkPlatformType(o[1] as api.PlatformType); |
| } |
| |
| core.int buildCounterTechnologyTargeting = 0; |
| api.TechnologyTargeting buildTechnologyTargeting() { |
| var o = api.TechnologyTargeting(); |
| buildCounterTechnologyTargeting++; |
| if (buildCounterTechnologyTargeting < 3) { |
| o.browsers = buildUnnamed5524(); |
| o.connectionTypes = buildUnnamed5525(); |
| o.mobileCarriers = buildUnnamed5526(); |
| o.operatingSystemVersions = buildUnnamed5527(); |
| o.operatingSystems = buildUnnamed5528(); |
| o.platformTypes = buildUnnamed5529(); |
| } |
| buildCounterTechnologyTargeting--; |
| return o; |
| } |
| |
| void checkTechnologyTargeting(api.TechnologyTargeting o) { |
| buildCounterTechnologyTargeting++; |
| if (buildCounterTechnologyTargeting < 3) { |
| checkUnnamed5524(o.browsers!); |
| checkUnnamed5525(o.connectionTypes!); |
| checkUnnamed5526(o.mobileCarriers!); |
| checkUnnamed5527(o.operatingSystemVersions!); |
| checkUnnamed5528(o.operatingSystems!); |
| checkUnnamed5529(o.platformTypes!); |
| } |
| buildCounterTechnologyTargeting--; |
| } |
| |
| core.int buildCounterThirdPartyAuthenticationToken = 0; |
| api.ThirdPartyAuthenticationToken buildThirdPartyAuthenticationToken() { |
| var o = api.ThirdPartyAuthenticationToken(); |
| buildCounterThirdPartyAuthenticationToken++; |
| if (buildCounterThirdPartyAuthenticationToken < 3) { |
| o.name = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterThirdPartyAuthenticationToken--; |
| return o; |
| } |
| |
| void checkThirdPartyAuthenticationToken(api.ThirdPartyAuthenticationToken o) { |
| buildCounterThirdPartyAuthenticationToken++; |
| if (buildCounterThirdPartyAuthenticationToken < 3) { |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterThirdPartyAuthenticationToken--; |
| } |
| |
| core.int buildCounterThirdPartyTrackingUrl = 0; |
| api.ThirdPartyTrackingUrl buildThirdPartyTrackingUrl() { |
| var o = api.ThirdPartyTrackingUrl(); |
| buildCounterThirdPartyTrackingUrl++; |
| if (buildCounterThirdPartyTrackingUrl < 3) { |
| o.thirdPartyUrlType = 'foo'; |
| o.url = 'foo'; |
| } |
| buildCounterThirdPartyTrackingUrl--; |
| return o; |
| } |
| |
| void checkThirdPartyTrackingUrl(api.ThirdPartyTrackingUrl o) { |
| buildCounterThirdPartyTrackingUrl++; |
| if (buildCounterThirdPartyTrackingUrl < 3) { |
| unittest.expect( |
| o.thirdPartyUrlType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.url!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterThirdPartyTrackingUrl--; |
| } |
| |
| core.List<core.int> buildUnnamed5530() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed5530(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals(42), |
| ); |
| } |
| |
| core.int buildCounterTranscodeSetting = 0; |
| api.TranscodeSetting buildTranscodeSetting() { |
| var o = api.TranscodeSetting(); |
| buildCounterTranscodeSetting++; |
| if (buildCounterTranscodeSetting < 3) { |
| o.enabledVideoFormats = buildUnnamed5530(); |
| o.kind = 'foo'; |
| } |
| buildCounterTranscodeSetting--; |
| return o; |
| } |
| |
| void checkTranscodeSetting(api.TranscodeSetting o) { |
| buildCounterTranscodeSetting++; |
| if (buildCounterTranscodeSetting < 3) { |
| checkUnnamed5530(o.enabledVideoFormats!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterTranscodeSetting--; |
| } |
| |
| core.int buildCounterUniversalAdId = 0; |
| api.UniversalAdId buildUniversalAdId() { |
| var o = api.UniversalAdId(); |
| buildCounterUniversalAdId++; |
| if (buildCounterUniversalAdId < 3) { |
| o.registry = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterUniversalAdId--; |
| return o; |
| } |
| |
| void checkUniversalAdId(api.UniversalAdId o) { |
| buildCounterUniversalAdId++; |
| if (buildCounterUniversalAdId < 3) { |
| unittest.expect( |
| o.registry!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.value!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUniversalAdId--; |
| } |
| |
| core.int buildCounterUserDefinedVariableConfiguration = 0; |
| api.UserDefinedVariableConfiguration buildUserDefinedVariableConfiguration() { |
| var o = api.UserDefinedVariableConfiguration(); |
| buildCounterUserDefinedVariableConfiguration++; |
| if (buildCounterUserDefinedVariableConfiguration < 3) { |
| o.dataType = 'foo'; |
| o.reportName = 'foo'; |
| o.variableType = 'foo'; |
| } |
| buildCounterUserDefinedVariableConfiguration--; |
| return o; |
| } |
| |
| void checkUserDefinedVariableConfiguration( |
| api.UserDefinedVariableConfiguration o) { |
| buildCounterUserDefinedVariableConfiguration++; |
| if (buildCounterUserDefinedVariableConfiguration < 3) { |
| unittest.expect( |
| o.dataType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.reportName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.variableType!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserDefinedVariableConfiguration--; |
| } |
| |
| core.int buildCounterUserProfile = 0; |
| api.UserProfile buildUserProfile() { |
| var o = api.UserProfile(); |
| buildCounterUserProfile++; |
| if (buildCounterUserProfile < 3) { |
| o.accountId = 'foo'; |
| o.accountName = 'foo'; |
| o.etag = 'foo'; |
| o.kind = 'foo'; |
| o.profileId = 'foo'; |
| o.subAccountId = 'foo'; |
| o.subAccountName = 'foo'; |
| o.userName = 'foo'; |
| } |
| buildCounterUserProfile--; |
| return o; |
| } |
| |
| void checkUserProfile(api.UserProfile o) { |
| buildCounterUserProfile++; |
| if (buildCounterUserProfile < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.accountName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.profileId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subAccountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.subAccountName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.userName!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserProfile--; |
| } |
| |
| core.List<api.UserProfile> buildUnnamed5531() { |
| var o = <api.UserProfile>[]; |
| o.add(buildUserProfile()); |
| o.add(buildUserProfile()); |
| return o; |
| } |
| |
| void checkUnnamed5531(core.List<api.UserProfile> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserProfile(o[0] as api.UserProfile); |
| checkUserProfile(o[1] as api.UserProfile); |
| } |
| |
| core.int buildCounterUserProfileList = 0; |
| api.UserProfileList buildUserProfileList() { |
| var o = api.UserProfileList(); |
| buildCounterUserProfileList++; |
| if (buildCounterUserProfileList < 3) { |
| o.etag = 'foo'; |
| o.items = buildUnnamed5531(); |
| o.kind = 'foo'; |
| } |
| buildCounterUserProfileList--; |
| return o; |
| } |
| |
| void checkUserProfileList(api.UserProfileList o) { |
| buildCounterUserProfileList++; |
| if (buildCounterUserProfileList < 3) { |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5531(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserProfileList--; |
| } |
| |
| core.List<api.UserRolePermission> buildUnnamed5532() { |
| var o = <api.UserRolePermission>[]; |
| o.add(buildUserRolePermission()); |
| o.add(buildUserRolePermission()); |
| return o; |
| } |
| |
| void checkUnnamed5532(core.List<api.UserRolePermission> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserRolePermission(o[0] as api.UserRolePermission); |
| checkUserRolePermission(o[1] as api.UserRolePermission); |
| } |
| |
| core.int buildCounterUserRole = 0; |
| api.UserRole buildUserRole() { |
| var o = api.UserRole(); |
| buildCounterUserRole++; |
| if (buildCounterUserRole < 3) { |
| o.accountId = 'foo'; |
| o.defaultUserRole = true; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.parentUserRoleId = 'foo'; |
| o.permissions = buildUnnamed5532(); |
| o.subaccountId = 'foo'; |
| } |
| buildCounterUserRole--; |
| return o; |
| } |
| |
| void checkUserRole(api.UserRole o) { |
| buildCounterUserRole++; |
| if (buildCounterUserRole < 3) { |
| unittest.expect( |
| o.accountId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.defaultUserRole!, unittest.isTrue); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.parentUserRoleId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5532(o.permissions!); |
| unittest.expect( |
| o.subaccountId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserRole--; |
| } |
| |
| core.int buildCounterUserRolePermission = 0; |
| api.UserRolePermission buildUserRolePermission() { |
| var o = api.UserRolePermission(); |
| buildCounterUserRolePermission++; |
| if (buildCounterUserRolePermission < 3) { |
| o.availability = 'foo'; |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| o.permissionGroupId = 'foo'; |
| } |
| buildCounterUserRolePermission--; |
| return o; |
| } |
| |
| void checkUserRolePermission(api.UserRolePermission o) { |
| buildCounterUserRolePermission++; |
| if (buildCounterUserRolePermission < 3) { |
| unittest.expect( |
| o.availability!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.permissionGroupId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserRolePermission--; |
| } |
| |
| core.int buildCounterUserRolePermissionGroup = 0; |
| api.UserRolePermissionGroup buildUserRolePermissionGroup() { |
| var o = api.UserRolePermissionGroup(); |
| buildCounterUserRolePermissionGroup++; |
| if (buildCounterUserRolePermissionGroup < 3) { |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterUserRolePermissionGroup--; |
| return o; |
| } |
| |
| void checkUserRolePermissionGroup(api.UserRolePermissionGroup o) { |
| buildCounterUserRolePermissionGroup++; |
| if (buildCounterUserRolePermissionGroup < 3) { |
| unittest.expect( |
| o.id!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserRolePermissionGroup--; |
| } |
| |
| core.List<api.UserRolePermissionGroup> buildUnnamed5533() { |
| var o = <api.UserRolePermissionGroup>[]; |
| o.add(buildUserRolePermissionGroup()); |
| o.add(buildUserRolePermissionGroup()); |
| return o; |
| } |
| |
| void checkUnnamed5533(core.List<api.UserRolePermissionGroup> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserRolePermissionGroup(o[0] as api.UserRolePermissionGroup); |
| checkUserRolePermissionGroup(o[1] as api.UserRolePermissionGroup); |
| } |
| |
| core.int buildCounterUserRolePermissionGroupsListResponse = 0; |
| api.UserRolePermissionGroupsListResponse |
| buildUserRolePermissionGroupsListResponse() { |
| var o = api.UserRolePermissionGroupsListResponse(); |
| buildCounterUserRolePermissionGroupsListResponse++; |
| if (buildCounterUserRolePermissionGroupsListResponse < 3) { |
| o.kind = 'foo'; |
| o.userRolePermissionGroups = buildUnnamed5533(); |
| } |
| buildCounterUserRolePermissionGroupsListResponse--; |
| return o; |
| } |
| |
| void checkUserRolePermissionGroupsListResponse( |
| api.UserRolePermissionGroupsListResponse o) { |
| buildCounterUserRolePermissionGroupsListResponse++; |
| if (buildCounterUserRolePermissionGroupsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5533(o.userRolePermissionGroups!); |
| } |
| buildCounterUserRolePermissionGroupsListResponse--; |
| } |
| |
| core.List<api.UserRolePermission> buildUnnamed5534() { |
| var o = <api.UserRolePermission>[]; |
| o.add(buildUserRolePermission()); |
| o.add(buildUserRolePermission()); |
| return o; |
| } |
| |
| void checkUnnamed5534(core.List<api.UserRolePermission> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserRolePermission(o[0] as api.UserRolePermission); |
| checkUserRolePermission(o[1] as api.UserRolePermission); |
| } |
| |
| core.int buildCounterUserRolePermissionsListResponse = 0; |
| api.UserRolePermissionsListResponse buildUserRolePermissionsListResponse() { |
| var o = api.UserRolePermissionsListResponse(); |
| buildCounterUserRolePermissionsListResponse++; |
| if (buildCounterUserRolePermissionsListResponse < 3) { |
| o.kind = 'foo'; |
| o.userRolePermissions = buildUnnamed5534(); |
| } |
| buildCounterUserRolePermissionsListResponse--; |
| return o; |
| } |
| |
| void checkUserRolePermissionsListResponse( |
| api.UserRolePermissionsListResponse o) { |
| buildCounterUserRolePermissionsListResponse++; |
| if (buildCounterUserRolePermissionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5534(o.userRolePermissions!); |
| } |
| buildCounterUserRolePermissionsListResponse--; |
| } |
| |
| core.List<api.UserRole> buildUnnamed5535() { |
| var o = <api.UserRole>[]; |
| o.add(buildUserRole()); |
| o.add(buildUserRole()); |
| return o; |
| } |
| |
| void checkUnnamed5535(core.List<api.UserRole> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserRole(o[0] as api.UserRole); |
| checkUserRole(o[1] as api.UserRole); |
| } |
| |
| core.int buildCounterUserRolesListResponse = 0; |
| api.UserRolesListResponse buildUserRolesListResponse() { |
| var o = api.UserRolesListResponse(); |
| buildCounterUserRolesListResponse++; |
| if (buildCounterUserRolesListResponse < 3) { |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| o.userRoles = buildUnnamed5535(); |
| } |
| buildCounterUserRolesListResponse--; |
| return o; |
| } |
| |
| void checkUserRolesListResponse(api.UserRolesListResponse o) { |
| buildCounterUserRolesListResponse++; |
| if (buildCounterUserRolesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5535(o.userRoles!); |
| } |
| buildCounterUserRolesListResponse--; |
| } |
| |
| core.int buildCounterVideoFormat = 0; |
| api.VideoFormat buildVideoFormat() { |
| var o = api.VideoFormat(); |
| buildCounterVideoFormat++; |
| if (buildCounterVideoFormat < 3) { |
| o.fileType = 'foo'; |
| o.id = 42; |
| o.kind = 'foo'; |
| o.resolution = buildSize(); |
| o.targetBitRate = 42; |
| } |
| buildCounterVideoFormat--; |
| return o; |
| } |
| |
| void checkVideoFormat(api.VideoFormat o) { |
| buildCounterVideoFormat++; |
| if (buildCounterVideoFormat < 3) { |
| unittest.expect( |
| o.fileType!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.id!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkSize(o.resolution! as api.Size); |
| unittest.expect( |
| o.targetBitRate!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterVideoFormat--; |
| } |
| |
| core.List<api.VideoFormat> buildUnnamed5536() { |
| var o = <api.VideoFormat>[]; |
| o.add(buildVideoFormat()); |
| o.add(buildVideoFormat()); |
| return o; |
| } |
| |
| void checkUnnamed5536(core.List<api.VideoFormat> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkVideoFormat(o[0] as api.VideoFormat); |
| checkVideoFormat(o[1] as api.VideoFormat); |
| } |
| |
| core.int buildCounterVideoFormatsListResponse = 0; |
| api.VideoFormatsListResponse buildVideoFormatsListResponse() { |
| var o = api.VideoFormatsListResponse(); |
| buildCounterVideoFormatsListResponse++; |
| if (buildCounterVideoFormatsListResponse < 3) { |
| o.kind = 'foo'; |
| o.videoFormats = buildUnnamed5536(); |
| } |
| buildCounterVideoFormatsListResponse--; |
| return o; |
| } |
| |
| void checkVideoFormatsListResponse(api.VideoFormatsListResponse o) { |
| buildCounterVideoFormatsListResponse++; |
| if (buildCounterVideoFormatsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed5536(o.videoFormats!); |
| } |
| buildCounterVideoFormatsListResponse--; |
| } |
| |
| core.int buildCounterVideoOffset = 0; |
| api.VideoOffset buildVideoOffset() { |
| var o = api.VideoOffset(); |
| buildCounterVideoOffset++; |
| if (buildCounterVideoOffset < 3) { |
| o.offsetPercentage = 42; |
| o.offsetSeconds = 42; |
| } |
| buildCounterVideoOffset--; |
| return o; |
| } |
| |
| void checkVideoOffset(api.VideoOffset o) { |
| buildCounterVideoOffset++; |
| if (buildCounterVideoOffset < 3) { |
| unittest.expect( |
| o.offsetPercentage!, |
| unittest.equals(42), |
| ); |
| unittest.expect( |
| o.offsetSeconds!, |
| unittest.equals(42), |
| ); |
| } |
| buildCounterVideoOffset--; |
| } |
| |
| core.int buildCounterVideoSettings = 0; |
| api.VideoSettings buildVideoSettings() { |
| var o = api.VideoSettings(); |
| buildCounterVideoSettings++; |
| if (buildCounterVideoSettings < 3) { |
| o.companionSettings = buildCompanionSetting(); |
| o.kind = 'foo'; |
| o.obaEnabled = true; |
| o.obaSettings = buildObaIcon(); |
| o.orientation = 'foo'; |
| o.skippableSettings = buildSkippableSetting(); |
| o.transcodeSettings = buildTranscodeSetting(); |
| } |
| buildCounterVideoSettings--; |
| return o; |
| } |
| |
| void checkVideoSettings(api.VideoSettings o) { |
| buildCounterVideoSettings++; |
| if (buildCounterVideoSettings < 3) { |
| checkCompanionSetting(o.companionSettings! as api.CompanionSetting); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.obaEnabled!, unittest.isTrue); |
| checkObaIcon(o.obaSettings! as api.ObaIcon); |
| unittest.expect( |
| o.orientation!, |
| unittest.equals('foo'), |
| ); |
| checkSkippableSetting(o.skippableSettings! as api.SkippableSetting); |
| checkTranscodeSetting(o.transcodeSettings! as api.TranscodeSetting); |
| } |
| buildCounterVideoSettings--; |
| } |
| |
| core.List<core.String> buildUnnamed5537() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5537(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5538() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5538(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5539() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5539(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5540() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5540(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5541() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5541(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5542() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5542(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5543() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5543(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5544() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5544(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5545() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5545(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5546() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5546(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5547() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5547(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5548() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5548(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5549() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5549(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5550() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5550(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5551() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5551(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5552() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5552(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5553() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5553(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5554() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5554(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5555() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5555(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5556() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5556(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5557() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5557(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5558() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5558(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5559() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5559(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5560() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5560(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5561() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5561(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5562() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5562(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5563() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5563(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5564() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5564(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5565() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5565(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5566() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5566(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5567() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5567(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5568() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5568(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5569() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5569(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5570() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5570(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5571() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5571(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5572() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5572(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5573() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5573(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5574() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5574(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5575() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5575(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5576() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5576(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5577() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5577(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5578() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5578(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5579() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5579(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5580() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5580(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5581() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5581(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5582() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5582(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5583() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5583(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5584() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5584(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5585() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5585(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5586() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5586(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5587() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5587(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5588() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5588(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5589() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5589(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5590() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5590(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5591() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5591(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5592() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5592(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5593() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5593(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5594() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5594(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5595() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5595(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5596() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5596(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5597() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5597(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5598() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5598(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5599() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5599(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5600() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5600(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5601() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5601(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5602() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5602(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5603() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5603(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5604() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5604(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5605() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5605(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5606() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5606(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5607() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5607(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5608() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5608(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5609() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5609(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5610() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5610(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5611() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5611(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5612() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5612(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5613() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5613(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5614() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5614(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5615() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5615(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5616() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5616(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5617() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5617(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5618() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5618(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5619() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5619(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5620() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5620(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5621() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5621(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5622() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5622(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5623() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5623(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5624() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5624(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5625() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5625(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5626() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5626(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed5627() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5627(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect( |
| o[0], |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o[1], |
| unittest.equals('foo'), |
| ); |
| } |
| |
| void main() { |
| unittest.group('obj-schema-Account', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccount(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Account.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkAccount(od as api.Account); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountActiveAdSummary', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountActiveAdSummary(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountActiveAdSummary.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountActiveAdSummary(od as api.AccountActiveAdSummary); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountPermission', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountPermission(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountPermission.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountPermission(od as api.AccountPermission); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountPermissionGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountPermissionGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountPermissionGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountPermissionGroup(od as api.AccountPermissionGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountPermissionGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountPermissionGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountPermissionGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountPermissionGroupsListResponse( |
| od as api.AccountPermissionGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountPermissionsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountPermissionsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountPermissionsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountPermissionsListResponse( |
| od as api.AccountPermissionsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountUserProfile', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountUserProfile(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountUserProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountUserProfile(od as api.AccountUserProfile); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountUserProfilesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountUserProfilesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountUserProfilesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountUserProfilesListResponse( |
| od as api.AccountUserProfilesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AccountsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAccountsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AccountsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAccountsListResponse(od as api.AccountsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Activities', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildActivities(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Activities.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkActivities(od as api.Activities); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Ad', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAd(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Ad.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkAd(od as api.Ad); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdBlockingConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdBlockingConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdBlockingConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdBlockingConfiguration(od as api.AdBlockingConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdSlot', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdSlot(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.AdSlot.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkAdSlot(od as api.AdSlot); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdsListResponse(od as api.AdsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Advertiser', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdvertiser(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Advertiser.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkAdvertiser(od as api.Advertiser); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvertiserGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdvertiserGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdvertiserGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdvertiserGroup(od as api.AdvertiserGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvertiserGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdvertiserGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdvertiserGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdvertiserGroupsListResponse(od as api.AdvertiserGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvertiserLandingPagesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdvertiserLandingPagesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdvertiserLandingPagesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdvertiserLandingPagesListResponse( |
| od as api.AdvertiserLandingPagesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvertisersListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAdvertisersListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AdvertisersListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAdvertisersListResponse(od as api.AdvertisersListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AudienceSegment', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAudienceSegment(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AudienceSegment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAudienceSegment(od as api.AudienceSegment); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AudienceSegmentGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildAudienceSegmentGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.AudienceSegmentGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkAudienceSegmentGroup(od as api.AudienceSegmentGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Browser', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildBrowser(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Browser.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkBrowser(od as api.Browser); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BrowsersListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildBrowsersListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.BrowsersListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkBrowsersListResponse(od as api.BrowsersListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Campaign', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCampaign(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Campaign.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkCampaign(od as api.Campaign); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CampaignCreativeAssociation', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCampaignCreativeAssociation(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CampaignCreativeAssociation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCampaignCreativeAssociation(od as api.CampaignCreativeAssociation); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CampaignCreativeAssociationsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCampaignCreativeAssociationsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CampaignCreativeAssociationsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCampaignCreativeAssociationsListResponse( |
| od as api.CampaignCreativeAssociationsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CampaignManagerIds', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCampaignManagerIds(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CampaignManagerIds.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCampaignManagerIds(od as api.CampaignManagerIds); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CampaignsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCampaignsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CampaignsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCampaignsListResponse(od as api.CampaignsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ChangeLog', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildChangeLog(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.ChangeLog.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkChangeLog(od as api.ChangeLog); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ChangeLogsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildChangeLogsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ChangeLogsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkChangeLogsListResponse(od as api.ChangeLogsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ChannelGrouping', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildChannelGrouping(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ChannelGrouping.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkChannelGrouping(od as api.ChannelGrouping); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ChannelGroupingRule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildChannelGroupingRule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ChannelGroupingRule.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkChannelGroupingRule(od as api.ChannelGroupingRule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CitiesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCitiesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CitiesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCitiesListResponse(od as api.CitiesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-City', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCity(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.City.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkCity(od as api.City); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClickTag', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildClickTag(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.ClickTag.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkClickTag(od as api.ClickTag); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClickThroughUrl', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildClickThroughUrl(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ClickThroughUrl.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkClickThroughUrl(od as api.ClickThroughUrl); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClickThroughUrlSuffixProperties', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildClickThroughUrlSuffixProperties(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ClickThroughUrlSuffixProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkClickThroughUrlSuffixProperties( |
| od as api.ClickThroughUrlSuffixProperties); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompanionClickThroughOverride', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCompanionClickThroughOverride(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CompanionClickThroughOverride.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCompanionClickThroughOverride( |
| od as api.CompanionClickThroughOverride); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompanionSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCompanionSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CompanionSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCompanionSetting(od as api.CompanionSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCompatibleFields(od as api.CompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConnectionType', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConnectionType(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConnectionType.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConnectionType(od as api.ConnectionType); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConnectionTypesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConnectionTypesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConnectionTypesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConnectionTypesListResponse(od as api.ConnectionTypesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ContentCategoriesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildContentCategoriesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ContentCategoriesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkContentCategoriesListResponse( |
| od as api.ContentCategoriesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ContentCategory', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildContentCategory(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ContentCategory.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkContentCategory(od as api.ContentCategory); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Conversion', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversion(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Conversion.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkConversion(od as api.Conversion); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionError', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionError(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionError.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionError(od as api.ConversionError); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionStatus', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionStatus(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionStatus(od as api.ConversionStatus); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionsBatchInsertRequest', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionsBatchInsertRequest(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionsBatchInsertRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchInsertRequest( |
| od as api.ConversionsBatchInsertRequest); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionsBatchInsertResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionsBatchInsertResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionsBatchInsertResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchInsertResponse( |
| od as api.ConversionsBatchInsertResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionsBatchUpdateRequest', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionsBatchUpdateRequest(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionsBatchUpdateRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchUpdateRequest( |
| od as api.ConversionsBatchUpdateRequest); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ConversionsBatchUpdateResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildConversionsBatchUpdateResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ConversionsBatchUpdateResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchUpdateResponse( |
| od as api.ConversionsBatchUpdateResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CountriesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCountriesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CountriesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCountriesListResponse(od as api.CountriesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Country', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCountry(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Country.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkCountry(od as api.Country); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Creative', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreative(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Creative.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkCreative(od as api.Creative); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeAsset', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeAsset(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeAsset.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeAsset(od as api.CreativeAsset); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeAssetId', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeAssetId(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeAssetId.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeAssetId(od as api.CreativeAssetId); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeAssetMetadata', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeAssetMetadata(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeAssetMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeAssetMetadata(od as api.CreativeAssetMetadata); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeAssetSelection', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeAssetSelection(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeAssetSelection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeAssetSelection(od as api.CreativeAssetSelection); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeAssignment', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeAssignment(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeAssignment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeAssignment(od as api.CreativeAssignment); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeClickThroughUrl', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeClickThroughUrl(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeClickThroughUrl.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeClickThroughUrl(od as api.CreativeClickThroughUrl); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeCustomEvent', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeCustomEvent(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeCustomEvent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeCustomEvent(od as api.CreativeCustomEvent); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeField', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeField(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeField.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeField(od as api.CreativeField); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeFieldAssignment', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeFieldAssignment(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeFieldAssignment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldAssignment(od as api.CreativeFieldAssignment); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeFieldValue', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeFieldValue(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeFieldValue.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldValue(od as api.CreativeFieldValue); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeFieldValuesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeFieldValuesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeFieldValuesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldValuesListResponse( |
| od as api.CreativeFieldValuesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeFieldsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeFieldsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeFieldsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldsListResponse(od as api.CreativeFieldsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeGroup(od as api.CreativeGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeGroupAssignment', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeGroupAssignment(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeGroupAssignment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeGroupAssignment(od as api.CreativeGroupAssignment); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeGroupsListResponse(od as api.CreativeGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeOptimizationConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeOptimizationConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeOptimizationConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeOptimizationConfiguration( |
| od as api.CreativeOptimizationConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeRotation', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativeRotation(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativeRotation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativeRotation(od as api.CreativeRotation); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCreativesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CreativesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCreativesListResponse(od as api.CreativesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CrossDimensionReachReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCrossDimensionReachReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CrossDimensionReachReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCrossDimensionReachReportCompatibleFields( |
| od as api.CrossDimensionReachReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEvent', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEvent(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEvent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEvent(od as api.CustomEvent); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventClickAnnotation', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventClickAnnotation(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventClickAnnotation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventClickAnnotation(od as api.CustomEventClickAnnotation); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventError', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventError(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventError.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventError(od as api.CustomEventError); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventImpressionAnnotation', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventImpressionAnnotation(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventImpressionAnnotation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventImpressionAnnotation( |
| od as api.CustomEventImpressionAnnotation); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventInsert', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventInsert(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventInsert.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventInsert(od as api.CustomEventInsert); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventStatus', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventStatus(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventStatus(od as api.CustomEventStatus); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventsBatchInsertRequest', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventsBatchInsertRequest(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventsBatchInsertRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventsBatchInsertRequest( |
| od as api.CustomEventsBatchInsertRequest); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomEventsBatchInsertResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomEventsBatchInsertResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomEventsBatchInsertResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomEventsBatchInsertResponse( |
| od as api.CustomEventsBatchInsertResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomFloodlightVariable', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomFloodlightVariable(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomFloodlightVariable.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomFloodlightVariable(od as api.CustomFloodlightVariable); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomRichMediaEvents', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomRichMediaEvents(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomRichMediaEvents.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomRichMediaEvents(od as api.CustomRichMediaEvents); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomVariable', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomVariable(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomVariable.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomVariable(od as api.CustomVariable); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomViewabilityMetric', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomViewabilityMetric(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomViewabilityMetric.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomViewabilityMetric(od as api.CustomViewabilityMetric); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomViewabilityMetricConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildCustomViewabilityMetricConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.CustomViewabilityMetricConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkCustomViewabilityMetricConfiguration( |
| od as api.CustomViewabilityMetricConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DV3Ids', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDV3Ids(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.DV3Ids.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkDV3Ids(od as api.DV3Ids); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DateRange', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDateRange(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.DateRange.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkDateRange(od as api.DateRange); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DayPartTargeting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDayPartTargeting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DayPartTargeting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDayPartTargeting(od as api.DayPartTargeting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DeepLink', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDeepLink(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.DeepLink.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkDeepLink(od as api.DeepLink); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DefaultClickThroughEventTagProperties', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDefaultClickThroughEventTagProperties(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DefaultClickThroughEventTagProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDefaultClickThroughEventTagProperties( |
| od as api.DefaultClickThroughEventTagProperties); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DeliverySchedule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDeliverySchedule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DeliverySchedule.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDeliverySchedule(od as api.DeliverySchedule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DfpSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDfpSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DfpSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDfpSettings(od as api.DfpSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Dimension', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDimension(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Dimension.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkDimension(od as api.Dimension); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DimensionFilter', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDimensionFilter(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DimensionFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDimensionFilter(od as api.DimensionFilter); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DimensionValue', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDimensionValue(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DimensionValue.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDimensionValue(od as api.DimensionValue); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DimensionValueList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDimensionValueList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DimensionValueList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDimensionValueList(od as api.DimensionValueList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DimensionValueRequest', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDimensionValueRequest(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DimensionValueRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDimensionValueRequest(od as api.DimensionValueRequest); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DirectorySite', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDirectorySite(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DirectorySite.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDirectorySite(od as api.DirectorySite); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DirectorySiteSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDirectorySiteSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DirectorySiteSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDirectorySiteSettings(od as api.DirectorySiteSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DirectorySitesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDirectorySitesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DirectorySitesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDirectorySitesListResponse(od as api.DirectorySitesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DisjunctiveMatchStatement', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDisjunctiveMatchStatement(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DisjunctiveMatchStatement.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDisjunctiveMatchStatement(od as api.DisjunctiveMatchStatement); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DynamicTargetingKey', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDynamicTargetingKey(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DynamicTargetingKey.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDynamicTargetingKey(od as api.DynamicTargetingKey); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DynamicTargetingKeysListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildDynamicTargetingKeysListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.DynamicTargetingKeysListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkDynamicTargetingKeysListResponse( |
| od as api.DynamicTargetingKeysListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EncryptionInfo', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildEncryptionInfo(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.EncryptionInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkEncryptionInfo(od as api.EncryptionInfo); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EventFilter', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildEventFilter(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.EventFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkEventFilter(od as api.EventFilter); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EventTag', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildEventTag(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.EventTag.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkEventTag(od as api.EventTag); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EventTagOverride', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildEventTagOverride(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.EventTagOverride.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkEventTagOverride(od as api.EventTagOverride); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EventTagsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildEventTagsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.EventTagsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkEventTagsListResponse(od as api.EventTagsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FileUrls', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFileUrls(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.FileUrls.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkFileUrls(od as api.FileUrls); |
| }); |
| }); |
| |
| unittest.group('obj-schema-File', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFile(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.File.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkFile(od as api.File); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FileList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFileList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.FileList.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkFileList(od as api.FileList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Flight', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFlight(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Flight.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkFlight(od as api.Flight); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivitiesGenerateTagResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivitiesGenerateTagResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivitiesGenerateTagResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivitiesGenerateTagResponse( |
| od as api.FloodlightActivitiesGenerateTagResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivitiesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivitiesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivitiesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivitiesListResponse( |
| od as api.FloodlightActivitiesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivity', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivity(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivity.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivity(od as api.FloodlightActivity); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivityDynamicTag', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivityDynamicTag(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivityDynamicTag.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityDynamicTag(od as api.FloodlightActivityDynamicTag); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivityGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivityGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivityGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityGroup(od as api.FloodlightActivityGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivityGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivityGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivityGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityGroupsListResponse( |
| od as api.FloodlightActivityGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightActivityPublisherDynamicTag', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightActivityPublisherDynamicTag(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightActivityPublisherDynamicTag.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityPublisherDynamicTag( |
| od as api.FloodlightActivityPublisherDynamicTag); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightConfiguration(od as api.FloodlightConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightConfigurationsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightConfigurationsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightConfigurationsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightConfigurationsListResponse( |
| od as api.FloodlightConfigurationsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FloodlightReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFloodlightReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FloodlightReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFloodlightReportCompatibleFields( |
| od as api.FloodlightReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FrequencyCap', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFrequencyCap(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.FrequencyCap.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkFrequencyCap(od as api.FrequencyCap); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FsCommand', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildFsCommand(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.FsCommand.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkFsCommand(od as api.FsCommand); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GeoTargeting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildGeoTargeting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.GeoTargeting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkGeoTargeting(od as api.GeoTargeting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-InventoryItem', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildInventoryItem(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.InventoryItem.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkInventoryItem(od as api.InventoryItem); |
| }); |
| }); |
| |
| unittest.group('obj-schema-InventoryItemsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildInventoryItemsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.InventoryItemsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkInventoryItemsListResponse(od as api.InventoryItemsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-KeyValueTargetingExpression', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildKeyValueTargetingExpression(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.KeyValueTargetingExpression.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkKeyValueTargetingExpression(od as api.KeyValueTargetingExpression); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LandingPage', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLandingPage(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.LandingPage.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkLandingPage(od as api.LandingPage); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Language', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLanguage(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Language.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkLanguage(od as api.Language); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LanguageTargeting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLanguageTargeting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.LanguageTargeting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkLanguageTargeting(od as api.LanguageTargeting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LanguagesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLanguagesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.LanguagesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkLanguagesListResponse(od as api.LanguagesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LastModifiedInfo', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLastModifiedInfo(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.LastModifiedInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkLastModifiedInfo(od as api.LastModifiedInfo); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPopulationClause', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildListPopulationClause(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ListPopulationClause.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkListPopulationClause(od as api.ListPopulationClause); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPopulationRule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildListPopulationRule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ListPopulationRule.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkListPopulationRule(od as api.ListPopulationRule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPopulationTerm', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildListPopulationTerm(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ListPopulationTerm.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkListPopulationTerm(od as api.ListPopulationTerm); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListTargetingExpression', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildListTargetingExpression(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ListTargetingExpression.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkListTargetingExpression(od as api.ListTargetingExpression); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LookbackConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildLookbackConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.LookbackConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkLookbackConfiguration(od as api.LookbackConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Metric', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMetric(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Metric.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkMetric(od as api.Metric); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Metro', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMetro(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Metro.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkMetro(od as api.Metro); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MetrosListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMetrosListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MetrosListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMetrosListResponse(od as api.MetrosListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MobileApp', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMobileApp(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.MobileApp.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkMobileApp(od as api.MobileApp); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MobileAppsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMobileAppsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MobileAppsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMobileAppsListResponse(od as api.MobileAppsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MobileCarrier', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMobileCarrier(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MobileCarrier.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMobileCarrier(od as api.MobileCarrier); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MobileCarriersListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMobileCarriersListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MobileCarriersListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMobileCarriersListResponse(od as api.MobileCarriersListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ObaIcon', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildObaIcon(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.ObaIcon.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkObaIcon(od as api.ObaIcon); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ObjectFilter', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildObjectFilter(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ObjectFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkObjectFilter(od as api.ObjectFilter); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OffsetPosition', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOffsetPosition(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OffsetPosition.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOffsetPosition(od as api.OffsetPosition); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OmnitureSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOmnitureSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OmnitureSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOmnitureSettings(od as api.OmnitureSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OperatingSystem', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOperatingSystem(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OperatingSystem.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOperatingSystem(od as api.OperatingSystem); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OperatingSystemVersion', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOperatingSystemVersion(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OperatingSystemVersion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOperatingSystemVersion(od as api.OperatingSystemVersion); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OperatingSystemVersionsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOperatingSystemVersionsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OperatingSystemVersionsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOperatingSystemVersionsListResponse( |
| od as api.OperatingSystemVersionsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OperatingSystemsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOperatingSystemsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OperatingSystemsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOperatingSystemsListResponse(od as api.OperatingSystemsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OptimizationActivity', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOptimizationActivity(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OptimizationActivity.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOptimizationActivity(od as api.OptimizationActivity); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Order', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOrder(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Order.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkOrder(od as api.Order); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OrderContact', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOrderContact(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OrderContact.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOrderContact(od as api.OrderContact); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OrderDocument', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOrderDocument(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OrderDocument.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOrderDocument(od as api.OrderDocument); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OrderDocumentsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOrderDocumentsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OrderDocumentsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOrderDocumentsListResponse(od as api.OrderDocumentsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OrdersListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildOrdersListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.OrdersListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkOrdersListResponse(od as api.OrdersListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PathFilter', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPathFilter(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.PathFilter.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkPathFilter(od as api.PathFilter); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PathReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPathReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PathReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPathReportCompatibleFields(od as api.PathReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PathReportDimensionValue', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPathReportDimensionValue(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PathReportDimensionValue.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPathReportDimensionValue(od as api.PathReportDimensionValue); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PathToConversionReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPathToConversionReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PathToConversionReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPathToConversionReportCompatibleFields( |
| od as api.PathToConversionReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Placement', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacement(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Placement.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkPlacement(od as api.Placement); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementAssignment', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementAssignment(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementAssignment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementAssignment(od as api.PlacementAssignment); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementGroup(od as api.PlacementGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementGroupsListResponse(od as api.PlacementGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementStrategiesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementStrategiesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementStrategiesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementStrategiesListResponse( |
| od as api.PlacementStrategiesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementStrategy', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementStrategy(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementStrategy.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementStrategy(od as api.PlacementStrategy); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementTag', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementTag(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementTag.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementTag(od as api.PlacementTag); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementsGenerateTagsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementsGenerateTagsResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementsGenerateTagsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementsGenerateTagsResponse( |
| od as api.PlacementsGenerateTagsResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlacementsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlacementsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlacementsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlacementsListResponse(od as api.PlacementsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlatformType', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlatformType(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlatformType.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlatformType(od as api.PlatformType); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PlatformTypesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPlatformTypesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PlatformTypesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPlatformTypesListResponse(od as api.PlatformTypesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PopupWindowProperties', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPopupWindowProperties(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PopupWindowProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPopupWindowProperties(od as api.PopupWindowProperties); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PostalCode', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPostalCode(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.PostalCode.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkPostalCode(od as api.PostalCode); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PostalCodesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPostalCodesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PostalCodesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPostalCodesListResponse(od as api.PostalCodesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Pricing', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPricing(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Pricing.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkPricing(od as api.Pricing); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PricingSchedule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPricingSchedule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PricingSchedule.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPricingSchedule(od as api.PricingSchedule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PricingSchedulePricingPeriod', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildPricingSchedulePricingPeriod(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.PricingSchedulePricingPeriod.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkPricingSchedulePricingPeriod(od as api.PricingSchedulePricingPeriod); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Project', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildProject(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Project.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkProject(od as api.Project); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ProjectsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildProjectsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ProjectsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkProjectsListResponse(od as api.ProjectsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReachReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReachReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReachReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReachReportCompatibleFields(od as api.ReachReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Recipient', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRecipient(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Recipient.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkRecipient(od as api.Recipient); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Region', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRegion(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Region.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkRegion(od as api.Region); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RegionsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRegionsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.RegionsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkRegionsListResponse(od as api.RegionsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemarketingList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRemarketingList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.RemarketingList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkRemarketingList(od as api.RemarketingList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemarketingListShare', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRemarketingListShare(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.RemarketingListShare.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkRemarketingListShare(od as api.RemarketingListShare); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemarketingListsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRemarketingListsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.RemarketingListsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkRemarketingListsListResponse(od as api.RemarketingListsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportCriteria(od as api.ReportCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportCrossDimensionReachCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportCrossDimensionReachCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportCrossDimensionReachCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportCrossDimensionReachCriteria( |
| od as api.ReportCrossDimensionReachCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportDelivery', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportDelivery(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportDelivery.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportDelivery(od as api.ReportDelivery); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportFloodlightCriteriaReportProperties', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportFloodlightCriteriaReportProperties(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportFloodlightCriteriaReportProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportFloodlightCriteriaReportProperties( |
| od as api.ReportFloodlightCriteriaReportProperties); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportFloodlightCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportFloodlightCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportFloodlightCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportFloodlightCriteria(od as api.ReportFloodlightCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportPathAttributionCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportPathAttributionCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportPathAttributionCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportPathAttributionCriteria( |
| od as api.ReportPathAttributionCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportPathCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportPathCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportPathCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportPathCriteria(od as api.ReportPathCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportPathToConversionCriteriaReportProperties', |
| () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportPathToConversionCriteriaReportProperties(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportPathToConversionCriteriaReportProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportPathToConversionCriteriaReportProperties( |
| od as api.ReportPathToConversionCriteriaReportProperties); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportPathToConversionCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportPathToConversionCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportPathToConversionCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportPathToConversionCriteria( |
| od as api.ReportPathToConversionCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportReachCriteria', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportReachCriteria(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportReachCriteria.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportReachCriteria(od as api.ReportReachCriteria); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportSchedule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportSchedule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportSchedule.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportSchedule(od as api.ReportSchedule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Report', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReport(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Report.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkReport(od as api.Report); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportCompatibleFields', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportCompatibleFields(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportCompatibleFields.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportCompatibleFields(od as api.ReportCompatibleFields); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.ReportList.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkReportList(od as api.ReportList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ReportsConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildReportsConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ReportsConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkReportsConfiguration(od as api.ReportsConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RichMediaExitOverride', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRichMediaExitOverride(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.RichMediaExitOverride.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkRichMediaExitOverride(od as api.RichMediaExitOverride); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Rule', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildRule(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Rule.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkRule(od as api.Rule); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Site', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSite(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Site.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkSite(od as api.Site); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteCompanionSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteCompanionSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteCompanionSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteCompanionSetting(od as api.SiteCompanionSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteContact', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteContact(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteContact.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteContact(od as api.SiteContact); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteSettings(od as api.SiteSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteSkippableSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteSkippableSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteSkippableSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteSkippableSetting(od as api.SiteSkippableSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteTranscodeSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteTranscodeSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteTranscodeSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteTranscodeSetting(od as api.SiteTranscodeSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SiteVideoSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSiteVideoSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SiteVideoSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSiteVideoSettings(od as api.SiteVideoSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SitesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSitesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SitesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSitesListResponse(od as api.SitesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Size', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSize(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.Size.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkSize(od as api.Size); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SizesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSizesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SizesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSizesListResponse(od as api.SizesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SkippableSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSkippableSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SkippableSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSkippableSetting(od as api.SkippableSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SortedDimension', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSortedDimension(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SortedDimension.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSortedDimension(od as api.SortedDimension); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Subaccount', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSubaccount(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.Subaccount.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkSubaccount(od as api.Subaccount); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SubaccountsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildSubaccountsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.SubaccountsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkSubaccountsListResponse(od as api.SubaccountsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TagData', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTagData(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.TagData.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkTagData(od as api.TagData); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TagSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTagSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.TagSetting.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkTagSetting(od as api.TagSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TagSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTagSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TagSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTagSettings(od as api.TagSettings); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TargetWindow', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTargetWindow(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TargetWindow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTargetWindow(od as api.TargetWindow); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TargetableRemarketingList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTargetableRemarketingList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TargetableRemarketingList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTargetableRemarketingList(od as api.TargetableRemarketingList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TargetableRemarketingListsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTargetableRemarketingListsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TargetableRemarketingListsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTargetableRemarketingListsListResponse( |
| od as api.TargetableRemarketingListsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TargetingTemplate', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTargetingTemplate(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TargetingTemplate.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTargetingTemplate(od as api.TargetingTemplate); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TargetingTemplatesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTargetingTemplatesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TargetingTemplatesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTargetingTemplatesListResponse( |
| od as api.TargetingTemplatesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TechnologyTargeting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTechnologyTargeting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TechnologyTargeting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTechnologyTargeting(od as api.TechnologyTargeting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ThirdPartyAuthenticationToken', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildThirdPartyAuthenticationToken(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ThirdPartyAuthenticationToken.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkThirdPartyAuthenticationToken( |
| od as api.ThirdPartyAuthenticationToken); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ThirdPartyTrackingUrl', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildThirdPartyTrackingUrl(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.ThirdPartyTrackingUrl.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkThirdPartyTrackingUrl(od as api.ThirdPartyTrackingUrl); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TranscodeSetting', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildTranscodeSetting(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.TranscodeSetting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkTranscodeSetting(od as api.TranscodeSetting); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UniversalAdId', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUniversalAdId(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UniversalAdId.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUniversalAdId(od as api.UniversalAdId); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserDefinedVariableConfiguration', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserDefinedVariableConfiguration(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserDefinedVariableConfiguration.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserDefinedVariableConfiguration( |
| od as api.UserDefinedVariableConfiguration); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserProfile', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserProfile(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserProfile(od as api.UserProfile); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserProfileList', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserProfileList(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserProfileList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserProfileList(od as api.UserProfileList); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRole', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRole(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = |
| api.UserRole.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkUserRole(od as api.UserRole); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRolePermission', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRolePermission(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserRolePermission.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserRolePermission(od as api.UserRolePermission); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRolePermissionGroup', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRolePermissionGroup(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserRolePermissionGroup.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserRolePermissionGroup(od as api.UserRolePermissionGroup); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRolePermissionGroupsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRolePermissionGroupsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserRolePermissionGroupsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserRolePermissionGroupsListResponse( |
| od as api.UserRolePermissionGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRolePermissionsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRolePermissionsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserRolePermissionsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserRolePermissionsListResponse( |
| od as api.UserRolePermissionsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserRolesListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildUserRolesListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.UserRolesListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkUserRolesListResponse(od as api.UserRolesListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoFormat', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildVideoFormat(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.VideoFormat.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkVideoFormat(od as api.VideoFormat); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoFormatsListResponse', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildVideoFormatsListResponse(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.VideoFormatsListResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkVideoFormatsListResponse(od as api.VideoFormatsListResponse); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoOffset', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildVideoOffset(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.VideoOffset.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkVideoOffset(od as api.VideoOffset); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoSettings', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildVideoSettings(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.VideoSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkVideoSettings(od as api.VideoSettings); |
| }); |
| }); |
| |
| unittest.group('resource-AccountActiveAdSummariesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountActiveAdSummaries; |
| var arg_profileId = 'foo'; |
| var arg_summaryAccountId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountActiveAdSummaries/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 26), |
| unittest.equals("/accountActiveAdSummaries/"), |
| ); |
| pathOffset += 26; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_summaryAccountId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountActiveAdSummary()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_summaryAccountId, |
| $fields: arg_$fields); |
| checkAccountActiveAdSummary(response as api.AccountActiveAdSummary); |
| }); |
| }); |
| |
| unittest.group('resource-AccountPermissionGroupsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountPermissionGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountPermissionGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/accountPermissionGroups/"), |
| ); |
| pathOffset += 25; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountPermissionGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAccountPermissionGroup(response as api.AccountPermissionGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountPermissionGroups; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountPermissionGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/accountPermissionGroups"), |
| ); |
| pathOffset += 24; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildAccountPermissionGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkAccountPermissionGroupsListResponse( |
| response as api.AccountPermissionGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-AccountPermissionsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountPermissions; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountPermissions/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/accountPermissions/"), |
| ); |
| pathOffset += 20; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountPermission()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAccountPermission(response as api.AccountPermission); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountPermissions; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountPermissions', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/accountPermissions"), |
| ); |
| pathOffset += 19; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountPermissionsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkAccountPermissionsListResponse( |
| response as api.AccountPermissionsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-AccountUserProfilesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountUserProfiles; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountUserProfiles/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/accountUserProfiles/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountUserProfile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAccountUserProfile(response as api.AccountUserProfile); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountUserProfiles; |
| var arg_request = buildAccountUserProfile(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AccountUserProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAccountUserProfile(obj as api.AccountUserProfile); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountUserProfiles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/accountUserProfiles"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountUserProfile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAccountUserProfile(response as api.AccountUserProfile); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountUserProfiles; |
| var arg_profileId = 'foo'; |
| var arg_active = true; |
| var arg_ids = buildUnnamed5537(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_userRoleId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountUserProfiles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/accountUserProfiles"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["userRoleId"]!.first, |
| unittest.equals(arg_userRoleId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountUserProfilesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await 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, |
| userRoleId: arg_userRoleId, |
| $fields: arg_$fields); |
| checkAccountUserProfilesListResponse( |
| response as api.AccountUserProfilesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountUserProfiles; |
| var arg_request = buildAccountUserProfile(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AccountUserProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAccountUserProfile(obj as api.AccountUserProfile); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountUserProfiles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/accountUserProfiles"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountUserProfile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkAccountUserProfile(response as api.AccountUserProfile); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accountUserProfiles; |
| var arg_request = buildAccountUserProfile(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AccountUserProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAccountUserProfile(obj as api.AccountUserProfile); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accountUserProfiles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/accountUserProfiles"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountUserProfile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAccountUserProfile(response as api.AccountUserProfile); |
| }); |
| }); |
| |
| unittest.group('resource-AccountsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accounts; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accounts/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/accounts/"), |
| ); |
| pathOffset += 10; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAccount(response as api.Account); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accounts; |
| var arg_profileId = 'foo'; |
| var arg_active = true; |
| var arg_ids = buildUnnamed5538(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/accounts"), |
| ); |
| pathOffset += 9; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccountsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await 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, |
| $fields: arg_$fields); |
| checkAccountsListResponse(response as api.AccountsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accounts; |
| var arg_request = buildAccount(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Account.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkAccount(obj as api.Account); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/accounts"), |
| ); |
| pathOffset += 9; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkAccount(response as api.Account); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).accounts; |
| var arg_request = buildAccount(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Account.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkAccount(obj as api.Account); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/accounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/accounts"), |
| ); |
| pathOffset += 9; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAccount(response as api.Account); |
| }); |
| }); |
| |
| unittest.group('resource-AdsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).ads; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/ads/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 5), |
| unittest.equals("/ads/"), |
| ); |
| pathOffset += 5; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAd()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAd(response as api.Ad); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).ads; |
| var arg_request = buildAd(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Ad.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkAd(obj as api.Ad); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/ads', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 4), |
| unittest.equals("/ads"), |
| ); |
| pathOffset += 4; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAd()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAd(response as api.Ad); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).ads; |
| var arg_profileId = 'foo'; |
| var arg_active = true; |
| var arg_advertiserId = 'foo'; |
| var arg_archived = true; |
| var arg_audienceSegmentIds = buildUnnamed5539(); |
| var arg_campaignIds = buildUnnamed5540(); |
| var arg_compatibility = 'foo'; |
| var arg_creativeIds = buildUnnamed5541(); |
| var arg_creativeOptimizationConfigurationIds = buildUnnamed5542(); |
| var arg_dynamicClickTracker = true; |
| var arg_ids = buildUnnamed5543(); |
| var arg_landingPageIds = buildUnnamed5544(); |
| var arg_maxResults = 42; |
| var arg_overriddenEventTagId = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_placementIds = buildUnnamed5545(); |
| var arg_remarketingListIds = buildUnnamed5546(); |
| var arg_searchString = 'foo'; |
| var arg_sizeIds = buildUnnamed5547(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_sslCompliant = true; |
| var arg_sslRequired = true; |
| var arg_type = buildUnnamed5548(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/ads', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 4), |
| unittest.equals("/ads"), |
| ); |
| pathOffset += 4; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["audienceSegmentIds"]!, |
| unittest.equals(arg_audienceSegmentIds), |
| ); |
| unittest.expect( |
| queryMap["campaignIds"]!, |
| unittest.equals(arg_campaignIds), |
| ); |
| unittest.expect( |
| queryMap["compatibility"]!.first, |
| unittest.equals(arg_compatibility), |
| ); |
| unittest.expect( |
| queryMap["creativeIds"]!, |
| unittest.equals(arg_creativeIds), |
| ); |
| unittest.expect( |
| queryMap["creativeOptimizationConfigurationIds"]!, |
| unittest.equals(arg_creativeOptimizationConfigurationIds), |
| ); |
| unittest.expect( |
| queryMap["dynamicClickTracker"]!.first, |
| unittest.equals("$arg_dynamicClickTracker"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["landingPageIds"]!, |
| unittest.equals(arg_landingPageIds), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["overriddenEventTagId"]!.first, |
| unittest.equals(arg_overriddenEventTagId), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["placementIds"]!, |
| unittest.equals(arg_placementIds), |
| ); |
| unittest.expect( |
| queryMap["remarketingListIds"]!, |
| unittest.equals(arg_remarketingListIds), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sizeIds"]!, |
| unittest.equals(arg_sizeIds), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["sslCompliant"]!.first, |
| unittest.equals("$arg_sslCompliant"), |
| ); |
| unittest.expect( |
| queryMap["sslRequired"]!.first, |
| unittest.equals("$arg_sslRequired"), |
| ); |
| unittest.expect( |
| queryMap["type"]!, |
| unittest.equals(arg_type), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| active: arg_active, |
| advertiserId: arg_advertiserId, |
| archived: arg_archived, |
| audienceSegmentIds: arg_audienceSegmentIds, |
| campaignIds: arg_campaignIds, |
| compatibility: arg_compatibility, |
| creativeIds: arg_creativeIds, |
| creativeOptimizationConfigurationIds: |
| arg_creativeOptimizationConfigurationIds, |
| dynamicClickTracker: arg_dynamicClickTracker, |
| ids: arg_ids, |
| landingPageIds: arg_landingPageIds, |
| maxResults: arg_maxResults, |
| overriddenEventTagId: arg_overriddenEventTagId, |
| pageToken: arg_pageToken, |
| placementIds: arg_placementIds, |
| remarketingListIds: arg_remarketingListIds, |
| searchString: arg_searchString, |
| sizeIds: arg_sizeIds, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| sslCompliant: arg_sslCompliant, |
| sslRequired: arg_sslRequired, |
| type: arg_type, |
| $fields: arg_$fields); |
| checkAdsListResponse(response as api.AdsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).ads; |
| var arg_request = buildAd(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Ad.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkAd(obj as api.Ad); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/ads', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 4), |
| unittest.equals("/ads"), |
| ); |
| pathOffset += 4; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAd()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkAd(response as api.Ad); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).ads; |
| var arg_request = buildAd(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Ad.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkAd(obj as api.Ad); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/ads', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 4), |
| unittest.equals("/ads"), |
| ); |
| pathOffset += 4; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAd()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAd(response as api.Ad); |
| }); |
| }); |
| |
| unittest.group('resource-AdvertiserGroupsResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/advertiserGroups/"), |
| ); |
| pathOffset += 18; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/advertiserGroups/"), |
| ); |
| pathOffset += 18; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiserGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAdvertiserGroup(response as api.AdvertiserGroup); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_request = buildAdvertiserGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AdvertiserGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiserGroup(obj as api.AdvertiserGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/advertiserGroups"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiserGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAdvertiserGroup(response as api.AdvertiserGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5549(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/advertiserGroups"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiserGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkAdvertiserGroupsListResponse( |
| response as api.AdvertiserGroupsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_request = buildAdvertiserGroup(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AdvertiserGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiserGroup(obj as api.AdvertiserGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/advertiserGroups"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiserGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkAdvertiserGroup(response as api.AdvertiserGroup); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserGroups; |
| var arg_request = buildAdvertiserGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.AdvertiserGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiserGroup(obj as api.AdvertiserGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/advertiserGroups"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiserGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAdvertiserGroup(response as api.AdvertiserGroup); |
| }); |
| }); |
| |
| unittest.group('resource-AdvertiserLandingPagesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserLandingPages; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserLandingPages/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/advertiserLandingPages/"), |
| ); |
| pathOffset += 24; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildLandingPage()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkLandingPage(response as api.LandingPage); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserLandingPages; |
| var arg_request = buildLandingPage(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.LandingPage.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkLandingPage(obj as api.LandingPage); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserLandingPages', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 23), |
| unittest.equals("/advertiserLandingPages"), |
| ); |
| pathOffset += 23; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildLandingPage()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkLandingPage(response as api.LandingPage); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserLandingPages; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5550(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed5551(); |
| var arg_ids = buildUnnamed5552(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserLandingPages', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 23), |
| unittest.equals("/advertiserLandingPages"), |
| ); |
| pathOffset += 23; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["campaignIds"]!, |
| unittest.equals(arg_campaignIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildAdvertiserLandingPagesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserIds: arg_advertiserIds, |
| archived: arg_archived, |
| campaignIds: arg_campaignIds, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| subaccountId: arg_subaccountId, |
| $fields: arg_$fields); |
| checkAdvertiserLandingPagesListResponse( |
| response as api.AdvertiserLandingPagesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserLandingPages; |
| var arg_request = buildLandingPage(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.LandingPage.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkLandingPage(obj as api.LandingPage); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserLandingPages', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 23), |
| unittest.equals("/advertiserLandingPages"), |
| ); |
| pathOffset += 23; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildLandingPage()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkLandingPage(response as api.LandingPage); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertiserLandingPages; |
| var arg_request = buildLandingPage(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.LandingPage.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkLandingPage(obj as api.LandingPage); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertiserLandingPages', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 23), |
| unittest.equals("/advertiserLandingPages"), |
| ); |
| pathOffset += 23; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildLandingPage()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkLandingPage(response as api.LandingPage); |
| }); |
| }); |
| |
| unittest.group('resource-AdvertisersResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertisers; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertisers/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("/advertisers/"), |
| ); |
| pathOffset += 13; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiser()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkAdvertiser(response as api.Advertiser); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertisers; |
| var arg_request = buildAdvertiser(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Advertiser.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiser(obj as api.Advertiser); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertisers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/advertisers"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiser()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAdvertiser(response as api.Advertiser); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertisers; |
| var arg_profileId = 'foo'; |
| var arg_advertiserGroupIds = buildUnnamed5553(); |
| var arg_floodlightConfigurationIds = buildUnnamed5554(); |
| var arg_ids = buildUnnamed5555(); |
| var arg_includeAdvertisersWithoutGroupsOnly = true; |
| var arg_maxResults = 42; |
| var arg_onlyParent = true; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_status = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertisers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/advertisers"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserGroupIds"]!, |
| unittest.equals(arg_advertiserGroupIds), |
| ); |
| unittest.expect( |
| queryMap["floodlightConfigurationIds"]!, |
| unittest.equals(arg_floodlightConfigurationIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["includeAdvertisersWithoutGroupsOnly"]!.first, |
| unittest.equals("$arg_includeAdvertisersWithoutGroupsOnly"), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["onlyParent"]!.first, |
| unittest.equals("$arg_onlyParent"), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["status"]!.first, |
| unittest.equals(arg_status), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertisersListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserGroupIds: arg_advertiserGroupIds, |
| floodlightConfigurationIds: arg_floodlightConfigurationIds, |
| ids: arg_ids, |
| includeAdvertisersWithoutGroupsOnly: |
| arg_includeAdvertisersWithoutGroupsOnly, |
| maxResults: arg_maxResults, |
| onlyParent: arg_onlyParent, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| status: arg_status, |
| subaccountId: arg_subaccountId, |
| $fields: arg_$fields); |
| checkAdvertisersListResponse(response as api.AdvertisersListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertisers; |
| var arg_request = buildAdvertiser(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Advertiser.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiser(obj as api.Advertiser); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertisers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/advertisers"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiser()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkAdvertiser(response as api.Advertiser); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).advertisers; |
| var arg_request = buildAdvertiser(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Advertiser.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkAdvertiser(obj as api.Advertiser); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/advertisers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/advertisers"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildAdvertiser()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkAdvertiser(response as api.Advertiser); |
| }); |
| }); |
| |
| unittest.group('resource-BrowsersResource', () { |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).browsers; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/browsers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/browsers"), |
| ); |
| pathOffset += 9; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildBrowsersListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkBrowsersListResponse(response as api.BrowsersListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-CampaignCreativeAssociationsResource', () { |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaignCreativeAssociations; |
| var arg_request = buildCampaignCreativeAssociation(); |
| var arg_profileId = 'foo'; |
| var arg_campaignId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CampaignCreativeAssociation.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCampaignCreativeAssociation( |
| obj as api.CampaignCreativeAssociation); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/campaigns/"), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/campaignCreativeAssociations', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_campaignId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 29), |
| unittest.equals("/campaignCreativeAssociations"), |
| ); |
| pathOffset += 29; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaignCreativeAssociation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.insert( |
| arg_request, arg_profileId, arg_campaignId, |
| $fields: arg_$fields); |
| checkCampaignCreativeAssociation( |
| response as api.CampaignCreativeAssociation); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaignCreativeAssociations; |
| var arg_profileId = 'foo'; |
| var arg_campaignId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/campaigns/"), |
| ); |
| pathOffset += 11; |
| index = path.indexOf('/campaignCreativeAssociations', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_campaignId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 29), |
| unittest.equals("/campaignCreativeAssociations"), |
| ); |
| pathOffset += 29; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json |
| .encode(buildCampaignCreativeAssociationsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_campaignId, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkCampaignCreativeAssociationsListResponse( |
| response as api.CampaignCreativeAssociationsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-CampaignsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaigns; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/campaigns/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaign()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkCampaign(response as api.Campaign); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaigns; |
| var arg_request = buildCampaign(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Campaign.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCampaign(obj as api.Campaign); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/campaigns"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaign()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCampaign(response as api.Campaign); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaigns; |
| var arg_profileId = 'foo'; |
| var arg_advertiserGroupIds = buildUnnamed5556(); |
| var arg_advertiserIds = buildUnnamed5557(); |
| var arg_archived = true; |
| var arg_atLeastOneOptimizationActivity = true; |
| var arg_excludedIds = buildUnnamed5558(); |
| var arg_ids = buildUnnamed5559(); |
| var arg_maxResults = 42; |
| var arg_overriddenEventTagId = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/campaigns"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserGroupIds"]!, |
| unittest.equals(arg_advertiserGroupIds), |
| ); |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["atLeastOneOptimizationActivity"]!.first, |
| unittest.equals("$arg_atLeastOneOptimizationActivity"), |
| ); |
| unittest.expect( |
| queryMap["excludedIds"]!, |
| unittest.equals(arg_excludedIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["overriddenEventTagId"]!.first, |
| unittest.equals(arg_overriddenEventTagId), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaignsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserGroupIds: arg_advertiserGroupIds, |
| advertiserIds: arg_advertiserIds, |
| archived: arg_archived, |
| atLeastOneOptimizationActivity: arg_atLeastOneOptimizationActivity, |
| excludedIds: arg_excludedIds, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| overriddenEventTagId: arg_overriddenEventTagId, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| subaccountId: arg_subaccountId, |
| $fields: arg_$fields); |
| checkCampaignsListResponse(response as api.CampaignsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaigns; |
| var arg_request = buildCampaign(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Campaign.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCampaign(obj as api.Campaign); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/campaigns"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaign()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkCampaign(response as api.Campaign); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).campaigns; |
| var arg_request = buildCampaign(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Campaign.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCampaign(obj as api.Campaign); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/campaigns', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/campaigns"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCampaign()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCampaign(response as api.Campaign); |
| }); |
| }); |
| |
| unittest.group('resource-ChangeLogsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).changeLogs; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/changeLogs/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/changeLogs/"), |
| ); |
| pathOffset += 12; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildChangeLog()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkChangeLog(response as api.ChangeLog); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).changeLogs; |
| var arg_profileId = 'foo'; |
| var arg_action = 'foo'; |
| var arg_ids = buildUnnamed5560(); |
| var arg_maxChangeTime = 'foo'; |
| var arg_maxResults = 42; |
| var arg_minChangeTime = 'foo'; |
| var arg_objectIds = buildUnnamed5561(); |
| var arg_objectType = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_userProfileIds = buildUnnamed5562(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/changeLogs', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/changeLogs"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["action"]!.first, |
| unittest.equals(arg_action), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["maxChangeTime"]!.first, |
| unittest.equals(arg_maxChangeTime), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["minChangeTime"]!.first, |
| unittest.equals(arg_minChangeTime), |
| ); |
| unittest.expect( |
| queryMap["objectIds"]!, |
| unittest.equals(arg_objectIds), |
| ); |
| unittest.expect( |
| queryMap["objectType"]!.first, |
| unittest.equals(arg_objectType), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["userProfileIds"]!, |
| unittest.equals(arg_userProfileIds), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildChangeLogsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| action: arg_action, |
| ids: arg_ids, |
| maxChangeTime: arg_maxChangeTime, |
| maxResults: arg_maxResults, |
| minChangeTime: arg_minChangeTime, |
| objectIds: arg_objectIds, |
| objectType: arg_objectType, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| userProfileIds: arg_userProfileIds, |
| $fields: arg_$fields); |
| checkChangeLogsListResponse(response as api.ChangeLogsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-CitiesResource', () { |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).cities; |
| var arg_profileId = 'foo'; |
| var arg_countryDartIds = buildUnnamed5563(); |
| var arg_dartIds = buildUnnamed5564(); |
| var arg_namePrefix = 'foo'; |
| var arg_regionDartIds = buildUnnamed5565(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/cities', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/cities"), |
| ); |
| pathOffset += 7; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["countryDartIds"]!, |
| unittest.equals(arg_countryDartIds), |
| ); |
| unittest.expect( |
| queryMap["dartIds"]!, |
| unittest.equals(arg_dartIds), |
| ); |
| unittest.expect( |
| queryMap["namePrefix"]!.first, |
| unittest.equals(arg_namePrefix), |
| ); |
| unittest.expect( |
| queryMap["regionDartIds"]!, |
| unittest.equals(arg_regionDartIds), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCitiesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| countryDartIds: arg_countryDartIds, |
| dartIds: arg_dartIds, |
| namePrefix: arg_namePrefix, |
| regionDartIds: arg_regionDartIds, |
| $fields: arg_$fields); |
| checkCitiesListResponse(response as api.CitiesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ConnectionTypesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).connectionTypes; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/connectionTypes/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/connectionTypes/"), |
| ); |
| pathOffset += 17; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildConnectionType()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkConnectionType(response as api.ConnectionType); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).connectionTypes; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/connectionTypes', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/connectionTypes"), |
| ); |
| pathOffset += 16; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildConnectionTypesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkConnectionTypesListResponse( |
| response as api.ConnectionTypesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ContentCategoriesResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/contentCategories/"), |
| ); |
| pathOffset += 19; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/contentCategories/"), |
| ); |
| pathOffset += 19; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildContentCategory()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkContentCategory(response as api.ContentCategory); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_request = buildContentCategory(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.ContentCategory.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkContentCategory(obj as api.ContentCategory); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/contentCategories"), |
| ); |
| pathOffset += 18; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildContentCategory()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkContentCategory(response as api.ContentCategory); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5566(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/contentCategories"), |
| ); |
| pathOffset += 18; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildContentCategoriesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkContentCategoriesListResponse( |
| response as api.ContentCategoriesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_request = buildContentCategory(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.ContentCategory.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkContentCategory(obj as api.ContentCategory); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/contentCategories"), |
| ); |
| pathOffset += 18; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildContentCategory()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkContentCategory(response as api.ContentCategory); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).contentCategories; |
| var arg_request = buildContentCategory(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.ContentCategory.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkContentCategory(obj as api.ContentCategory); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/contentCategories', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/contentCategories"), |
| ); |
| pathOffset += 18; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildContentCategory()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkContentCategory(response as api.ContentCategory); |
| }); |
| }); |
| |
| unittest.group('resource-ConversionsResource', () { |
| unittest.test('method--batchinsert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).conversions; |
| var arg_request = buildConversionsBatchInsertRequest(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.ConversionsBatchInsertRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchInsertRequest( |
| obj as api.ConversionsBatchInsertRequest); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/conversions/batchinsert', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/conversions/batchinsert"), |
| ); |
| pathOffset += 24; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildConversionsBatchInsertResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.batchinsert(arg_request, arg_profileId, |
| $fields: arg_$fields); |
| checkConversionsBatchInsertResponse( |
| response as api.ConversionsBatchInsertResponse); |
| }); |
| |
| unittest.test('method--batchupdate', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).conversions; |
| var arg_request = buildConversionsBatchUpdateRequest(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.ConversionsBatchUpdateRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkConversionsBatchUpdateRequest( |
| obj as api.ConversionsBatchUpdateRequest); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/conversions/batchupdate', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/conversions/batchupdate"), |
| ); |
| pathOffset += 24; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildConversionsBatchUpdateResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.batchupdate(arg_request, arg_profileId, |
| $fields: arg_$fields); |
| checkConversionsBatchUpdateResponse( |
| response as api.ConversionsBatchUpdateResponse); |
| }); |
| }); |
| |
| unittest.group('resource-CountriesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).countries; |
| var arg_profileId = 'foo'; |
| var arg_dartId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/countries/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/countries/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_dartId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCountry()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_dartId, $fields: arg_$fields); |
| checkCountry(response as api.Country); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).countries; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/countries', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/countries"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCountriesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkCountriesListResponse(response as api.CountriesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-CreativeAssetsResource', () { |
| unittest.test('method--insert', () async { |
| // TODO: Implement tests for media upload; |
| // TODO: Implement tests for media download; |
| |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeAssets; |
| var arg_request = buildCreativeAssetMetadata(); |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeAssetMetadata.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeAssetMetadata(obj as api.CreativeAssetMetadata); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeAssets/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeAssets/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeAssets', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_advertiserId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeAssets"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeAssetMetadata()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.insert( |
| arg_request, arg_profileId, arg_advertiserId, |
| $fields: arg_$fields); |
| checkCreativeAssetMetadata(response as api.CreativeAssetMetadata); |
| }); |
| }); |
| |
| unittest.group('resource-CreativeFieldValuesResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/creativeFieldValues/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_creativeFieldId, arg_id, |
| $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/creativeFieldValues/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldValue()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_creativeFieldId, arg_id, |
| $fields: arg_$fields); |
| checkCreativeFieldValue(response as api.CreativeFieldValue); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_request = buildCreativeFieldValue(); |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeFieldValue.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldValue(obj as api.CreativeFieldValue); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/creativeFieldValues"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldValue()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.insert( |
| arg_request, arg_profileId, arg_creativeFieldId, |
| $fields: arg_$fields); |
| checkCreativeFieldValue(response as api.CreativeFieldValue); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_ids = buildUnnamed5567(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/creativeFieldValues"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldValuesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_creativeFieldId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkCreativeFieldValuesListResponse( |
| response as api.CreativeFieldValuesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_request = buildCreativeFieldValue(); |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeFieldValue.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldValue(obj as api.CreativeFieldValue); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/creativeFieldValues"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldValue()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch( |
| arg_request, arg_profileId, arg_creativeFieldId, arg_id, |
| $fields: arg_$fields); |
| checkCreativeFieldValue(response as api.CreativeFieldValue); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFieldValues; |
| var arg_request = buildCreativeFieldValue(); |
| var arg_profileId = 'foo'; |
| var arg_creativeFieldId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeFieldValue.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeFieldValue(obj as api.CreativeFieldValue); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| index = path.indexOf('/creativeFieldValues', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_creativeFieldId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/creativeFieldValues"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldValue()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.update( |
| arg_request, arg_profileId, arg_creativeFieldId, |
| $fields: arg_$fields); |
| checkCreativeFieldValue(response as api.CreativeFieldValue); |
| }); |
| }); |
| |
| unittest.group('resource-CreativeFieldsResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeFields/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeField()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkCreativeField(response as api.CreativeField); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_request = buildCreativeField(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeField.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeField(obj as api.CreativeField); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeFields"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeField()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreativeField(response as api.CreativeField); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5568(); |
| var arg_ids = buildUnnamed5569(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeFields"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeFieldsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserIds: arg_advertiserIds, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkCreativeFieldsListResponse( |
| response as api.CreativeFieldsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_request = buildCreativeField(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeField.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeField(obj as api.CreativeField); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeFields"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeField()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkCreativeField(response as api.CreativeField); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeFields; |
| var arg_request = buildCreativeField(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeField.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeField(obj as api.CreativeField); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeFields', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeFields"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeField()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreativeField(response as api.CreativeField); |
| }); |
| }); |
| |
| unittest.group('resource-CreativeGroupsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/creativeGroups/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkCreativeGroup(response as api.CreativeGroup); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeGroups; |
| var arg_request = buildCreativeGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeGroup(obj as api.CreativeGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeGroups"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreativeGroup(response as api.CreativeGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeGroups; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5570(); |
| var arg_groupNumber = 42; |
| var arg_ids = buildUnnamed5571(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeGroups"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["groupNumber"]!.first), |
| unittest.equals(arg_groupNumber), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await 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_sortOrder, |
| $fields: arg_$fields); |
| checkCreativeGroupsListResponse( |
| response as api.CreativeGroupsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeGroups; |
| var arg_request = buildCreativeGroup(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeGroup(obj as api.CreativeGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeGroups"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkCreativeGroup(response as api.CreativeGroup); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creativeGroups; |
| var arg_request = buildCreativeGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CreativeGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCreativeGroup(obj as api.CreativeGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creativeGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/creativeGroups"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativeGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreativeGroup(response as api.CreativeGroup); |
| }); |
| }); |
| |
| unittest.group('resource-CreativesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creatives; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creatives/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/creatives/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkCreative(response as api.Creative); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creatives; |
| var arg_request = buildCreative(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Creative.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCreative(obj as api.Creative); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creatives', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/creatives"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreative(response as api.Creative); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creatives; |
| var arg_profileId = 'foo'; |
| var arg_active = true; |
| var arg_advertiserId = 'foo'; |
| var arg_archived = true; |
| var arg_campaignId = 'foo'; |
| var arg_companionCreativeIds = buildUnnamed5572(); |
| var arg_creativeFieldIds = buildUnnamed5573(); |
| var arg_ids = buildUnnamed5574(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_renderingIds = buildUnnamed5575(); |
| var arg_searchString = 'foo'; |
| var arg_sizeIds = buildUnnamed5576(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_studioCreativeId = 'foo'; |
| var arg_types = buildUnnamed5577(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creatives', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/creatives"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["campaignId"]!.first, |
| unittest.equals(arg_campaignId), |
| ); |
| unittest.expect( |
| queryMap["companionCreativeIds"]!, |
| unittest.equals(arg_companionCreativeIds), |
| ); |
| unittest.expect( |
| queryMap["creativeFieldIds"]!, |
| unittest.equals(arg_creativeFieldIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["renderingIds"]!, |
| unittest.equals(arg_renderingIds), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sizeIds"]!, |
| unittest.equals(arg_sizeIds), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["studioCreativeId"]!.first, |
| unittest.equals(arg_studioCreativeId), |
| ); |
| unittest.expect( |
| queryMap["types"]!, |
| unittest.equals(arg_types), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreativesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await 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, |
| maxResults: 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_types, |
| $fields: arg_$fields); |
| checkCreativesListResponse(response as api.CreativesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creatives; |
| var arg_request = buildCreative(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Creative.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCreative(obj as api.Creative); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creatives', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/creatives"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkCreative(response as api.Creative); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).creatives; |
| var arg_request = buildCreative(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Creative.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkCreative(obj as api.Creative); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/creatives', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/creatives"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCreative(response as api.Creative); |
| }); |
| }); |
| |
| unittest.group('resource-CustomEventsResource', () { |
| unittest.test('method--batchinsert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).customEvents; |
| var arg_request = buildCustomEventsBatchInsertRequest(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.CustomEventsBatchInsertRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkCustomEventsBatchInsertRequest( |
| obj as api.CustomEventsBatchInsertRequest); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/customEvents/batchinsert', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/customEvents/batchinsert"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCustomEventsBatchInsertResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.batchinsert(arg_request, arg_profileId, |
| $fields: arg_$fields); |
| checkCustomEventsBatchInsertResponse( |
| response as api.CustomEventsBatchInsertResponse); |
| }); |
| }); |
| |
| unittest.group('resource-DimensionValuesResource', () { |
| unittest.test('method--query', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).dimensionValues; |
| var arg_request = buildDimensionValueRequest(); |
| var arg_profileId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.DimensionValueRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkDimensionValueRequest(obj as api.DimensionValueRequest); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/dimensionvalues/query', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/dimensionvalues/query"), |
| ); |
| pathOffset += 22; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDimensionValueList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.query(arg_request, arg_profileId, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields); |
| checkDimensionValueList(response as api.DimensionValueList); |
| }); |
| }); |
| |
| unittest.group('resource-DirectorySitesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).directorySites; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/directorySites/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/directorySites/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDirectorySite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkDirectorySite(response as api.DirectorySite); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).directorySites; |
| var arg_request = buildDirectorySite(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.DirectorySite.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkDirectorySite(obj as api.DirectorySite); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/directorySites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/directorySites"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDirectorySite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkDirectorySite(response as api.DirectorySite); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).directorySites; |
| var arg_profileId = 'foo'; |
| var arg_acceptsInStreamVideoPlacements = true; |
| var arg_acceptsInterstitialPlacements = true; |
| var arg_acceptsPublisherPaidPlacements = true; |
| var arg_active = true; |
| var arg_dfpNetworkCode = 'foo'; |
| var arg_ids = buildUnnamed5578(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/directorySites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/directorySites"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["acceptsInStreamVideoPlacements"]!.first, |
| unittest.equals("$arg_acceptsInStreamVideoPlacements"), |
| ); |
| unittest.expect( |
| queryMap["acceptsInterstitialPlacements"]!.first, |
| unittest.equals("$arg_acceptsInterstitialPlacements"), |
| ); |
| unittest.expect( |
| queryMap["acceptsPublisherPaidPlacements"]!.first, |
| unittest.equals("$arg_acceptsPublisherPaidPlacements"), |
| ); |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["dfpNetworkCode"]!.first, |
| unittest.equals(arg_dfpNetworkCode), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDirectorySitesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| acceptsInStreamVideoPlacements: arg_acceptsInStreamVideoPlacements, |
| acceptsInterstitialPlacements: arg_acceptsInterstitialPlacements, |
| acceptsPublisherPaidPlacements: arg_acceptsPublisherPaidPlacements, |
| active: arg_active, |
| dfpNetworkCode: arg_dfpNetworkCode, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkDirectorySitesListResponse( |
| response as api.DirectorySitesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-DynamicTargetingKeysResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).dynamicTargetingKeys; |
| var arg_profileId = 'foo'; |
| var arg_objectId = 'foo'; |
| var arg_name = 'foo'; |
| var arg_objectType = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/dynamicTargetingKeys/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/dynamicTargetingKeys/"), |
| ); |
| pathOffset += 22; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_objectId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["name"]!.first, |
| unittest.equals(arg_name), |
| ); |
| unittest.expect( |
| queryMap["objectType"]!.first, |
| unittest.equals(arg_objectType), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_objectId, arg_name, arg_objectType, |
| $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).dynamicTargetingKeys; |
| var arg_request = buildDynamicTargetingKey(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.DynamicTargetingKey.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkDynamicTargetingKey(obj as api.DynamicTargetingKey); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/dynamicTargetingKeys', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/dynamicTargetingKeys"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDynamicTargetingKey()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkDynamicTargetingKey(response as api.DynamicTargetingKey); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).dynamicTargetingKeys; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_names = buildUnnamed5579(); |
| var arg_objectId = 'foo'; |
| var arg_objectType = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/dynamicTargetingKeys', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/dynamicTargetingKeys"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["names"]!, |
| unittest.equals(arg_names), |
| ); |
| unittest.expect( |
| queryMap["objectId"]!.first, |
| unittest.equals(arg_objectId), |
| ); |
| unittest.expect( |
| queryMap["objectType"]!.first, |
| unittest.equals(arg_objectType), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDynamicTargetingKeysListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserId: arg_advertiserId, |
| names: arg_names, |
| objectId: arg_objectId, |
| objectType: arg_objectType, |
| $fields: arg_$fields); |
| checkDynamicTargetingKeysListResponse( |
| response as api.DynamicTargetingKeysListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-EventTagsResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/eventTags/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/eventTags/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEventTag()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkEventTag(response as api.EventTag); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_request = buildEventTag(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.EventTag.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkEventTag(obj as api.EventTag); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/eventTags"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEventTag()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkEventTag(response as api.EventTag); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_profileId = 'foo'; |
| var arg_adId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_campaignId = 'foo'; |
| var arg_definitionsOnly = true; |
| var arg_enabled = true; |
| var arg_eventTagTypes = buildUnnamed5580(); |
| var arg_ids = buildUnnamed5581(); |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/eventTags"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["adId"]!.first, |
| unittest.equals(arg_adId), |
| ); |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["campaignId"]!.first, |
| unittest.equals(arg_campaignId), |
| ); |
| unittest.expect( |
| queryMap["definitionsOnly"]!.first, |
| unittest.equals("$arg_definitionsOnly"), |
| ); |
| unittest.expect( |
| queryMap["enabled"]!.first, |
| unittest.equals("$arg_enabled"), |
| ); |
| unittest.expect( |
| queryMap["eventTagTypes"]!, |
| unittest.equals(arg_eventTagTypes), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEventTagsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| adId: arg_adId, |
| advertiserId: arg_advertiserId, |
| campaignId: arg_campaignId, |
| definitionsOnly: arg_definitionsOnly, |
| enabled: arg_enabled, |
| eventTagTypes: arg_eventTagTypes, |
| ids: arg_ids, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkEventTagsListResponse(response as api.EventTagsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_request = buildEventTag(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.EventTag.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkEventTag(obj as api.EventTag); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/eventTags"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEventTag()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkEventTag(response as api.EventTag); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).eventTags; |
| var arg_request = buildEventTag(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.EventTag.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkEventTag(obj as api.EventTag); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/eventTags', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/eventTags"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEventTag()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkEventTag(response as api.EventTag); |
| }); |
| }); |
| |
| unittest.group('resource-FilesResource', () { |
| unittest.test('method--get', () async { |
| // TODO: Implement tests for media upload; |
| // TODO: Implement tests for media download; |
| |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).files; |
| var arg_reportId = 'foo'; |
| var arg_fileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals("reports/"), |
| ); |
| pathOffset += 8; |
| index = path.indexOf('/files/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/files/"), |
| ); |
| pathOffset += 7; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_fileId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_reportId, arg_fileId, $fields: arg_$fields); |
| checkFile(response as api.File); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).files; |
| var arg_profileId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_scope = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/files', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/files"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["scope"]!.first, |
| unittest.equals(arg_scope), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFileList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| scope: arg_scope, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkFileList(response as api.FileList); |
| }); |
| }); |
| |
| unittest.group('resource-FloodlightActivitiesResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/floodlightActivities/"), |
| ); |
| pathOffset += 22; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--generatetag', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_profileId = 'foo'; |
| var arg_floodlightActivityId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities/generatetag', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 33), |
| unittest.equals("/floodlightActivities/generatetag"), |
| ); |
| pathOffset += 33; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["floodlightActivityId"]!.first, |
| unittest.equals(arg_floodlightActivityId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildFloodlightActivitiesGenerateTagResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.generatetag(arg_profileId, |
| floodlightActivityId: arg_floodlightActivityId, $fields: arg_$fields); |
| checkFloodlightActivitiesGenerateTagResponse( |
| response as api.FloodlightActivitiesGenerateTagResponse); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/floodlightActivities/"), |
| ); |
| pathOffset += 22; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivity()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkFloodlightActivity(response as api.FloodlightActivity); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_request = buildFloodlightActivity(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivity.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivity(obj as api.FloodlightActivity); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/floodlightActivities"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivity()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkFloodlightActivity(response as api.FloodlightActivity); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_floodlightActivityGroupIds = buildUnnamed5582(); |
| var arg_floodlightActivityGroupName = 'foo'; |
| var arg_floodlightActivityGroupTagString = 'foo'; |
| var arg_floodlightActivityGroupType = 'foo'; |
| var arg_floodlightConfigurationId = 'foo'; |
| var arg_ids = buildUnnamed5583(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_tagString = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/floodlightActivities"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["floodlightActivityGroupIds"]!, |
| unittest.equals(arg_floodlightActivityGroupIds), |
| ); |
| unittest.expect( |
| queryMap["floodlightActivityGroupName"]!.first, |
| unittest.equals(arg_floodlightActivityGroupName), |
| ); |
| unittest.expect( |
| queryMap["floodlightActivityGroupTagString"]!.first, |
| unittest.equals(arg_floodlightActivityGroupTagString), |
| ); |
| unittest.expect( |
| queryMap["floodlightActivityGroupType"]!.first, |
| unittest.equals(arg_floodlightActivityGroupType), |
| ); |
| unittest.expect( |
| queryMap["floodlightConfigurationId"]!.first, |
| unittest.equals(arg_floodlightConfigurationId), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["tagString"]!.first, |
| unittest.equals(arg_tagString), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivitiesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserId: arg_advertiserId, |
| floodlightActivityGroupIds: arg_floodlightActivityGroupIds, |
| floodlightActivityGroupName: arg_floodlightActivityGroupName, |
| floodlightActivityGroupTagString: |
| arg_floodlightActivityGroupTagString, |
| floodlightActivityGroupType: arg_floodlightActivityGroupType, |
| floodlightConfigurationId: arg_floodlightConfigurationId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| tagString: arg_tagString, |
| $fields: arg_$fields); |
| checkFloodlightActivitiesListResponse( |
| response as api.FloodlightActivitiesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_request = buildFloodlightActivity(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivity.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivity(obj as api.FloodlightActivity); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/floodlightActivities"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivity()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkFloodlightActivity(response as api.FloodlightActivity); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivities; |
| var arg_request = buildFloodlightActivity(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivity.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivity(obj as api.FloodlightActivity); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivities', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/floodlightActivities"), |
| ); |
| pathOffset += 21; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivity()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkFloodlightActivity(response as api.FloodlightActivity); |
| }); |
| }); |
| |
| unittest.group('resource-FloodlightActivityGroupsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivityGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivityGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 26), |
| unittest.equals("/floodlightActivityGroups/"), |
| ); |
| pathOffset += 26; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivityGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkFloodlightActivityGroup(response as api.FloodlightActivityGroup); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivityGroups; |
| var arg_request = buildFloodlightActivityGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivityGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityGroup(obj as api.FloodlightActivityGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivityGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightActivityGroups"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivityGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkFloodlightActivityGroup(response as api.FloodlightActivityGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivityGroups; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_floodlightConfigurationId = 'foo'; |
| var arg_ids = buildUnnamed5584(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_type = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivityGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightActivityGroups"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["floodlightConfigurationId"]!.first, |
| unittest.equals(arg_floodlightConfigurationId), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["type"]!.first, |
| unittest.equals(arg_type), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildFloodlightActivityGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserId: arg_advertiserId, |
| floodlightConfigurationId: arg_floodlightConfigurationId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| type: arg_type, |
| $fields: arg_$fields); |
| checkFloodlightActivityGroupsListResponse( |
| response as api.FloodlightActivityGroupsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivityGroups; |
| var arg_request = buildFloodlightActivityGroup(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivityGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityGroup(obj as api.FloodlightActivityGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivityGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightActivityGroups"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivityGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkFloodlightActivityGroup(response as api.FloodlightActivityGroup); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightActivityGroups; |
| var arg_request = buildFloodlightActivityGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightActivityGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightActivityGroup(obj as api.FloodlightActivityGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightActivityGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightActivityGroups"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightActivityGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkFloodlightActivityGroup(response as api.FloodlightActivityGroup); |
| }); |
| }); |
| |
| unittest.group('resource-FloodlightConfigurationsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightConfigurations; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightConfigurations/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 26), |
| unittest.equals("/floodlightConfigurations/"), |
| ); |
| pathOffset += 26; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightConfiguration()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkFloodlightConfiguration(response as api.FloodlightConfiguration); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightConfigurations; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5585(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightConfigurations', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightConfigurations"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildFloodlightConfigurationsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.list(arg_profileId, ids: arg_ids, $fields: arg_$fields); |
| checkFloodlightConfigurationsListResponse( |
| response as api.FloodlightConfigurationsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightConfigurations; |
| var arg_request = buildFloodlightConfiguration(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightConfiguration.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightConfiguration(obj as api.FloodlightConfiguration); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightConfigurations', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightConfigurations"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightConfiguration()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkFloodlightConfiguration(response as api.FloodlightConfiguration); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).floodlightConfigurations; |
| var arg_request = buildFloodlightConfiguration(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.FloodlightConfiguration.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkFloodlightConfiguration(obj as api.FloodlightConfiguration); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/floodlightConfigurations', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/floodlightConfigurations"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFloodlightConfiguration()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkFloodlightConfiguration(response as api.FloodlightConfiguration); |
| }); |
| }); |
| |
| unittest.group('resource-InventoryItemsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).inventoryItems; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/inventoryItems/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/inventoryItems/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildInventoryItem()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_projectId, arg_id, |
| $fields: arg_$fields); |
| checkInventoryItem(response as api.InventoryItem); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).inventoryItems; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_ids = buildUnnamed5586(); |
| var arg_inPlan = true; |
| var arg_maxResults = 42; |
| var arg_orderId = buildUnnamed5587(); |
| var arg_pageToken = 'foo'; |
| var arg_siteId = buildUnnamed5588(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_type = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/inventoryItems', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/inventoryItems"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["inPlan"]!.first, |
| unittest.equals("$arg_inPlan"), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["orderId"]!, |
| unittest.equals(arg_orderId), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["siteId"]!, |
| unittest.equals(arg_siteId), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["type"]!.first, |
| unittest.equals(arg_type), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildInventoryItemsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_projectId, |
| ids: arg_ids, |
| inPlan: arg_inPlan, |
| maxResults: arg_maxResults, |
| orderId: arg_orderId, |
| pageToken: arg_pageToken, |
| siteId: arg_siteId, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| type: arg_type, |
| $fields: arg_$fields); |
| checkInventoryItemsListResponse( |
| response as api.InventoryItemsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-LanguagesResource', () { |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).languages; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/languages', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/languages"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildLanguagesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkLanguagesListResponse(response as api.LanguagesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-MetrosResource', () { |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).metros; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/metros', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/metros"), |
| ); |
| pathOffset += 7; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildMetrosListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkMetrosListResponse(response as api.MetrosListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-MobileAppsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).mobileApps; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/mobileApps/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/mobileApps/"), |
| ); |
| pathOffset += 12; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildMobileApp()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkMobileApp(response as api.MobileApp); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).mobileApps; |
| var arg_profileId = 'foo'; |
| var arg_directories = buildUnnamed5589(); |
| var arg_ids = buildUnnamed5590(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/mobileApps', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/mobileApps"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["directories"]!, |
| unittest.equals(arg_directories), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildMobileAppsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| directories: arg_directories, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| $fields: arg_$fields); |
| checkMobileAppsListResponse(response as api.MobileAppsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-MobileCarriersResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).mobileCarriers; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/mobileCarriers/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/mobileCarriers/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildMobileCarrier()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkMobileCarrier(response as api.MobileCarrier); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).mobileCarriers; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/mobileCarriers', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/mobileCarriers"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildMobileCarriersListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkMobileCarriersListResponse( |
| response as api.MobileCarriersListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-OperatingSystemVersionsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).operatingSystemVersions; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/operatingSystemVersions/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/operatingSystemVersions/"), |
| ); |
| pathOffset += 25; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOperatingSystemVersion()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkOperatingSystemVersion(response as api.OperatingSystemVersion); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).operatingSystemVersions; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/operatingSystemVersions', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/operatingSystemVersions"), |
| ); |
| pathOffset += 24; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildOperatingSystemVersionsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkOperatingSystemVersionsListResponse( |
| response as api.OperatingSystemVersionsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-OperatingSystemsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).operatingSystems; |
| var arg_profileId = 'foo'; |
| var arg_dartId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/operatingSystems/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/operatingSystems/"), |
| ); |
| pathOffset += 18; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_dartId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOperatingSystem()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_dartId, $fields: arg_$fields); |
| checkOperatingSystem(response as api.OperatingSystem); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).operatingSystems; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/operatingSystems', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/operatingSystems"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOperatingSystemsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkOperatingSystemsListResponse( |
| response as api.OperatingSystemsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-OrderDocumentsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).orderDocuments; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/orderDocuments/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/orderDocuments/"), |
| ); |
| pathOffset += 16; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOrderDocument()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_projectId, arg_id, |
| $fields: arg_$fields); |
| checkOrderDocument(response as api.OrderDocument); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).orderDocuments; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_approved = true; |
| var arg_ids = buildUnnamed5591(); |
| var arg_maxResults = 42; |
| var arg_orderId = buildUnnamed5592(); |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_siteId = buildUnnamed5593(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/orderDocuments', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/orderDocuments"), |
| ); |
| pathOffset += 15; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["approved"]!.first, |
| unittest.equals("$arg_approved"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["orderId"]!, |
| unittest.equals(arg_orderId), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["siteId"]!, |
| unittest.equals(arg_siteId), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOrderDocumentsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_projectId, |
| approved: arg_approved, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| orderId: arg_orderId, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| siteId: arg_siteId, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkOrderDocumentsListResponse( |
| response as api.OrderDocumentsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-OrdersResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).orders; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/orders/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals("/orders/"), |
| ); |
| pathOffset += 8; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOrder()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_projectId, arg_id, |
| $fields: arg_$fields); |
| checkOrder(response as api.Order); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).orders; |
| var arg_profileId = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_ids = buildUnnamed5594(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_siteId = buildUnnamed5595(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| index = path.indexOf('/orders', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_projectId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/orders"), |
| ); |
| pathOffset += 7; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["siteId"]!, |
| unittest.equals(arg_siteId), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOrdersListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_projectId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| siteId: arg_siteId, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkOrdersListResponse(response as api.OrdersListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-PlacementGroupsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/placementGroups/"), |
| ); |
| pathOffset += 17; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkPlacementGroup(response as api.PlacementGroup); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementGroups; |
| var arg_request = buildPlacementGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementGroup(obj as api.PlacementGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/placementGroups"), |
| ); |
| pathOffset += 16; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacementGroup(response as api.PlacementGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementGroups; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5596(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed5597(); |
| var arg_contentCategoryIds = buildUnnamed5598(); |
| var arg_directorySiteIds = buildUnnamed5599(); |
| var arg_ids = buildUnnamed5600(); |
| var arg_maxEndDate = 'foo'; |
| var arg_maxResults = 42; |
| var arg_maxStartDate = 'foo'; |
| var arg_minEndDate = 'foo'; |
| var arg_minStartDate = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_placementGroupType = 'foo'; |
| var arg_placementStrategyIds = buildUnnamed5601(); |
| var arg_pricingTypes = buildUnnamed5602(); |
| var arg_searchString = 'foo'; |
| var arg_siteIds = buildUnnamed5603(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/placementGroups"), |
| ); |
| pathOffset += 16; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["campaignIds"]!, |
| unittest.equals(arg_campaignIds), |
| ); |
| unittest.expect( |
| queryMap["contentCategoryIds"]!, |
| unittest.equals(arg_contentCategoryIds), |
| ); |
| unittest.expect( |
| queryMap["directorySiteIds"]!, |
| unittest.equals(arg_directorySiteIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["maxEndDate"]!.first, |
| unittest.equals(arg_maxEndDate), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["maxStartDate"]!.first, |
| unittest.equals(arg_maxStartDate), |
| ); |
| unittest.expect( |
| queryMap["minEndDate"]!.first, |
| unittest.equals(arg_minEndDate), |
| ); |
| unittest.expect( |
| queryMap["minStartDate"]!.first, |
| unittest.equals(arg_minStartDate), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["placementGroupType"]!.first, |
| unittest.equals(arg_placementGroupType), |
| ); |
| unittest.expect( |
| queryMap["placementStrategyIds"]!, |
| unittest.equals(arg_placementStrategyIds), |
| ); |
| unittest.expect( |
| queryMap["pricingTypes"]!, |
| unittest.equals(arg_pricingTypes), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["siteIds"]!, |
| unittest.equals(arg_siteIds), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserIds: arg_advertiserIds, |
| archived: arg_archived, |
| campaignIds: arg_campaignIds, |
| contentCategoryIds: arg_contentCategoryIds, |
| directorySiteIds: arg_directorySiteIds, |
| ids: arg_ids, |
| maxEndDate: arg_maxEndDate, |
| maxResults: arg_maxResults, |
| maxStartDate: arg_maxStartDate, |
| minEndDate: arg_minEndDate, |
| minStartDate: arg_minStartDate, |
| pageToken: arg_pageToken, |
| placementGroupType: arg_placementGroupType, |
| placementStrategyIds: arg_placementStrategyIds, |
| pricingTypes: arg_pricingTypes, |
| searchString: arg_searchString, |
| siteIds: arg_siteIds, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkPlacementGroupsListResponse( |
| response as api.PlacementGroupsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementGroups; |
| var arg_request = buildPlacementGroup(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementGroup(obj as api.PlacementGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/placementGroups"), |
| ); |
| pathOffset += 16; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkPlacementGroup(response as api.PlacementGroup); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementGroups; |
| var arg_request = buildPlacementGroup(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementGroup.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementGroup(obj as api.PlacementGroup); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 16), |
| unittest.equals("/placementGroups"), |
| ); |
| pathOffset += 16; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacementGroup(response as api.PlacementGroup); |
| }); |
| }); |
| |
| unittest.group('resource-PlacementStrategiesResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/placementStrategies/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/placementStrategies/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementStrategy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkPlacementStrategy(response as api.PlacementStrategy); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_request = buildPlacementStrategy(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementStrategy.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementStrategy(obj as api.PlacementStrategy); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/placementStrategies"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementStrategy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacementStrategy(response as api.PlacementStrategy); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5604(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/placementStrategies"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementStrategiesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkPlacementStrategiesListResponse( |
| response as api.PlacementStrategiesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_request = buildPlacementStrategy(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementStrategy.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementStrategy(obj as api.PlacementStrategy); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/placementStrategies"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementStrategy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkPlacementStrategy(response as api.PlacementStrategy); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placementStrategies; |
| var arg_request = buildPlacementStrategy(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.PlacementStrategy.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkPlacementStrategy(obj as api.PlacementStrategy); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placementStrategies', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/placementStrategies"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementStrategy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacementStrategy(response as api.PlacementStrategy); |
| }); |
| }); |
| |
| unittest.group('resource-PlacementsResource', () { |
| unittest.test('method--generatetags', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_profileId = 'foo'; |
| var arg_campaignId = 'foo'; |
| var arg_placementIds = buildUnnamed5605(); |
| var arg_tagFormats = buildUnnamed5606(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements/generatetags', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 24), |
| unittest.equals("/placements/generatetags"), |
| ); |
| pathOffset += 24; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["campaignId"]!.first, |
| unittest.equals(arg_campaignId), |
| ); |
| unittest.expect( |
| queryMap["placementIds"]!, |
| unittest.equals(arg_placementIds), |
| ); |
| unittest.expect( |
| queryMap["tagFormats"]!, |
| unittest.equals(arg_tagFormats), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementsGenerateTagsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.generatetags(arg_profileId, |
| campaignId: arg_campaignId, |
| placementIds: arg_placementIds, |
| tagFormats: arg_tagFormats, |
| $fields: arg_$fields); |
| checkPlacementsGenerateTagsResponse( |
| response as api.PlacementsGenerateTagsResponse); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/placements/"), |
| ); |
| pathOffset += 12; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacement()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkPlacement(response as api.Placement); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_request = buildPlacement(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Placement.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkPlacement(obj as api.Placement); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/placements"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacement()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacement(response as api.Placement); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5607(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed5608(); |
| var arg_compatibilities = buildUnnamed5609(); |
| var arg_contentCategoryIds = buildUnnamed5610(); |
| var arg_directorySiteIds = buildUnnamed5611(); |
| var arg_groupIds = buildUnnamed5612(); |
| var arg_ids = buildUnnamed5613(); |
| var arg_maxEndDate = 'foo'; |
| var arg_maxResults = 42; |
| var arg_maxStartDate = 'foo'; |
| var arg_minEndDate = 'foo'; |
| var arg_minStartDate = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_paymentSource = 'foo'; |
| var arg_placementStrategyIds = buildUnnamed5614(); |
| var arg_pricingTypes = buildUnnamed5615(); |
| var arg_searchString = 'foo'; |
| var arg_siteIds = buildUnnamed5616(); |
| var arg_sizeIds = buildUnnamed5617(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/placements"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["archived"]!.first, |
| unittest.equals("$arg_archived"), |
| ); |
| unittest.expect( |
| queryMap["campaignIds"]!, |
| unittest.equals(arg_campaignIds), |
| ); |
| unittest.expect( |
| queryMap["compatibilities"]!, |
| unittest.equals(arg_compatibilities), |
| ); |
| unittest.expect( |
| queryMap["contentCategoryIds"]!, |
| unittest.equals(arg_contentCategoryIds), |
| ); |
| unittest.expect( |
| queryMap["directorySiteIds"]!, |
| unittest.equals(arg_directorySiteIds), |
| ); |
| unittest.expect( |
| queryMap["groupIds"]!, |
| unittest.equals(arg_groupIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["maxEndDate"]!.first, |
| unittest.equals(arg_maxEndDate), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["maxStartDate"]!.first, |
| unittest.equals(arg_maxStartDate), |
| ); |
| unittest.expect( |
| queryMap["minEndDate"]!.first, |
| unittest.equals(arg_minEndDate), |
| ); |
| unittest.expect( |
| queryMap["minStartDate"]!.first, |
| unittest.equals(arg_minStartDate), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["paymentSource"]!.first, |
| unittest.equals(arg_paymentSource), |
| ); |
| unittest.expect( |
| queryMap["placementStrategyIds"]!, |
| unittest.equals(arg_placementStrategyIds), |
| ); |
| unittest.expect( |
| queryMap["pricingTypes"]!, |
| unittest.equals(arg_pricingTypes), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["siteIds"]!, |
| unittest.equals(arg_siteIds), |
| ); |
| unittest.expect( |
| queryMap["sizeIds"]!, |
| unittest.equals(arg_sizeIds), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacementsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserIds: arg_advertiserIds, |
| archived: arg_archived, |
| campaignIds: arg_campaignIds, |
| compatibilities: arg_compatibilities, |
| contentCategoryIds: arg_contentCategoryIds, |
| directorySiteIds: arg_directorySiteIds, |
| groupIds: arg_groupIds, |
| ids: arg_ids, |
| maxEndDate: arg_maxEndDate, |
| maxResults: arg_maxResults, |
| maxStartDate: arg_maxStartDate, |
| minEndDate: arg_minEndDate, |
| minStartDate: arg_minStartDate, |
| pageToken: arg_pageToken, |
| paymentSource: arg_paymentSource, |
| placementStrategyIds: arg_placementStrategyIds, |
| pricingTypes: arg_pricingTypes, |
| searchString: arg_searchString, |
| siteIds: arg_siteIds, |
| sizeIds: arg_sizeIds, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkPlacementsListResponse(response as api.PlacementsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_request = buildPlacement(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Placement.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkPlacement(obj as api.Placement); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/placements"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacement()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkPlacement(response as api.Placement); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).placements; |
| var arg_request = buildPlacement(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Placement.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkPlacement(obj as api.Placement); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/placements', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/placements"), |
| ); |
| pathOffset += 11; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlacement()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkPlacement(response as api.Placement); |
| }); |
| }); |
| |
| unittest.group('resource-PlatformTypesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).platformTypes; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/platformTypes/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 15), |
| unittest.equals("/platformTypes/"), |
| ); |
| pathOffset += 15; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlatformType()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkPlatformType(response as api.PlatformType); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).platformTypes; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/platformTypes', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 14), |
| unittest.equals("/platformTypes"), |
| ); |
| pathOffset += 14; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPlatformTypesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkPlatformTypesListResponse(response as api.PlatformTypesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-PostalCodesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).postalCodes; |
| var arg_profileId = 'foo'; |
| var arg_code = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/postalCodes/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("/postalCodes/"), |
| ); |
| pathOffset += 13; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_code'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPostalCode()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_code, $fields: arg_$fields); |
| checkPostalCode(response as api.PostalCode); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).postalCodes; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/postalCodes', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/postalCodes"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPostalCodesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkPostalCodesListResponse(response as api.PostalCodesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).projects; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/projects/"), |
| ); |
| pathOffset += 10; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildProject()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkProject(response as api.Project); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).projects; |
| var arg_profileId = 'foo'; |
| var arg_advertiserIds = buildUnnamed5618(); |
| var arg_ids = buildUnnamed5619(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/projects', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/projects"), |
| ); |
| pathOffset += 9; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserIds"]!, |
| unittest.equals(arg_advertiserIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildProjectsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserIds: arg_advertiserIds, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkProjectsListResponse(response as api.ProjectsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-RegionsResource', () { |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).regions; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/regions', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals("/regions"), |
| ); |
| pathOffset += 8; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRegionsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkRegionsListResponse(response as api.RegionsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-RemarketingListSharesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingListShares; |
| var arg_profileId = 'foo'; |
| var arg_remarketingListId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingListShares/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 23), |
| unittest.equals("/remarketingListShares/"), |
| ); |
| pathOffset += 23; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_remarketingListId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingListShare()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_remarketingListId, |
| $fields: arg_$fields); |
| checkRemarketingListShare(response as api.RemarketingListShare); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingListShares; |
| var arg_request = buildRemarketingListShare(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.RemarketingListShare.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkRemarketingListShare(obj as api.RemarketingListShare); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingListShares', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/remarketingListShares"), |
| ); |
| pathOffset += 22; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingListShare()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkRemarketingListShare(response as api.RemarketingListShare); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingListShares; |
| var arg_request = buildRemarketingListShare(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.RemarketingListShare.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkRemarketingListShare(obj as api.RemarketingListShare); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingListShares', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 22), |
| unittest.equals("/remarketingListShares"), |
| ); |
| pathOffset += 22; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingListShare()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkRemarketingListShare(response as api.RemarketingListShare); |
| }); |
| }); |
| |
| unittest.group('resource-RemarketingListsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingLists; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingLists/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("/remarketingLists/"), |
| ); |
| pathOffset += 18; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkRemarketingList(response as api.RemarketingList); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingLists; |
| var arg_request = buildRemarketingList(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.RemarketingList.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkRemarketingList(obj as api.RemarketingList); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingLists', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/remarketingLists"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkRemarketingList(response as api.RemarketingList); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingLists; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_active = true; |
| var arg_floodlightActivityId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_name = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingLists', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/remarketingLists"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| queryMap["floodlightActivityId"]!.first, |
| unittest.equals(arg_floodlightActivityId), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["name"]!.first, |
| unittest.equals(arg_name), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingListsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_advertiserId, |
| active: arg_active, |
| floodlightActivityId: arg_floodlightActivityId, |
| maxResults: arg_maxResults, |
| name: arg_name, |
| pageToken: arg_pageToken, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkRemarketingListsListResponse( |
| response as api.RemarketingListsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingLists; |
| var arg_request = buildRemarketingList(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.RemarketingList.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkRemarketingList(obj as api.RemarketingList); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingLists', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/remarketingLists"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkRemarketingList(response as api.RemarketingList); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).remarketingLists; |
| var arg_request = buildRemarketingList(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.RemarketingList.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkRemarketingList(obj as api.RemarketingList); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/remarketingLists', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 17), |
| unittest.equals("/remarketingLists"), |
| ); |
| pathOffset += 17; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildRemarketingList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkRemarketingList(response as api.RemarketingList); |
| }); |
| }); |
| |
| unittest.group('resource-ReportsResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_reportId, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildReport()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_reportId, $fields: arg_$fields); |
| checkReport(response as api.Report); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_request = buildReport(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Report.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkReport(obj as api.Report); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals("/reports"), |
| ); |
| pathOffset += 8; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildReport()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkReport(response as api.Report); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_profileId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_scope = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 8), |
| unittest.equals("/reports"), |
| ); |
| pathOffset += 8; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["scope"]!.first, |
| unittest.equals(arg_scope), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildReportList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| scope: arg_scope, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkReportList(response as api.ReportList); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_request = buildReport(); |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Report.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkReport(obj as api.Report); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildReport()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_reportId, |
| $fields: arg_$fields); |
| checkReport(response as api.Report); |
| }); |
| |
| unittest.test('method--run', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_synchronous = true; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| index = path.indexOf('/run', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 4), |
| unittest.equals("/run"), |
| ); |
| pathOffset += 4; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["synchronous"]!.first, |
| unittest.equals("$arg_synchronous"), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.run(arg_profileId, arg_reportId, |
| synchronous: arg_synchronous, $fields: arg_$fields); |
| checkFile(response as api.File); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports; |
| var arg_request = buildReport(); |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Report.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkReport(obj as api.Report); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildReport()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.update( |
| arg_request, arg_profileId, arg_reportId, |
| $fields: arg_$fields); |
| checkReport(response as api.Report); |
| }); |
| }); |
| |
| unittest.group('resource-ReportsCompatibleFieldsResource', () { |
| unittest.test('method--query', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports.compatibleFields; |
| var arg_request = buildReport(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Report.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkReport(obj as api.Report); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/compatiblefields/query', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 31), |
| unittest.equals("/reports/compatiblefields/query"), |
| ); |
| pathOffset += 31; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildCompatibleFields()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.query(arg_request, arg_profileId, $fields: arg_$fields); |
| checkCompatibleFields(response as api.CompatibleFields); |
| }); |
| }); |
| |
| unittest.group('resource-ReportsFilesResource', () { |
| unittest.test('method--get', () async { |
| // TODO: Implement tests for media upload; |
| // TODO: Implement tests for media download; |
| |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports.files; |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_fileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| index = path.indexOf('/files/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/files/"), |
| ); |
| pathOffset += 7; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_fileId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, arg_reportId, arg_fileId, |
| $fields: arg_$fields); |
| checkFile(response as api.File); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).reports.files; |
| var arg_profileId = 'foo'; |
| var arg_reportId = 'foo'; |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/reports/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 9), |
| unittest.equals("/reports/"), |
| ); |
| pathOffset += 9; |
| index = path.indexOf('/files', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_reportId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/files"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildFileList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_reportId, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkFileList(response as api.FileList); |
| }); |
| }); |
| |
| unittest.group('resource-SitesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sites; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sites/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/sites/"), |
| ); |
| pathOffset += 7; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkSite(response as api.Site); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sites; |
| var arg_request = buildSite(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Site.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkSite(obj as api.Site); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sites"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkSite(response as api.Site); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sites; |
| var arg_profileId = 'foo'; |
| var arg_acceptsInStreamVideoPlacements = true; |
| var arg_acceptsInterstitialPlacements = true; |
| var arg_acceptsPublisherPaidPlacements = true; |
| var arg_adWordsSite = true; |
| var arg_approved = true; |
| var arg_campaignIds = buildUnnamed5620(); |
| var arg_directorySiteIds = buildUnnamed5621(); |
| var arg_ids = buildUnnamed5622(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_unmappedSite = true; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sites"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["acceptsInStreamVideoPlacements"]!.first, |
| unittest.equals("$arg_acceptsInStreamVideoPlacements"), |
| ); |
| unittest.expect( |
| queryMap["acceptsInterstitialPlacements"]!.first, |
| unittest.equals("$arg_acceptsInterstitialPlacements"), |
| ); |
| unittest.expect( |
| queryMap["acceptsPublisherPaidPlacements"]!.first, |
| unittest.equals("$arg_acceptsPublisherPaidPlacements"), |
| ); |
| unittest.expect( |
| queryMap["adWordsSite"]!.first, |
| unittest.equals("$arg_adWordsSite"), |
| ); |
| unittest.expect( |
| queryMap["approved"]!.first, |
| unittest.equals("$arg_approved"), |
| ); |
| unittest.expect( |
| queryMap["campaignIds"]!, |
| unittest.equals(arg_campaignIds), |
| ); |
| unittest.expect( |
| queryMap["directorySiteIds"]!, |
| unittest.equals(arg_directorySiteIds), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["unmappedSite"]!.first, |
| unittest.equals("$arg_unmappedSite"), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSitesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| acceptsInStreamVideoPlacements: arg_acceptsInStreamVideoPlacements, |
| acceptsInterstitialPlacements: arg_acceptsInterstitialPlacements, |
| acceptsPublisherPaidPlacements: arg_acceptsPublisherPaidPlacements, |
| adWordsSite: arg_adWordsSite, |
| approved: arg_approved, |
| campaignIds: arg_campaignIds, |
| directorySiteIds: arg_directorySiteIds, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| subaccountId: arg_subaccountId, |
| unmappedSite: arg_unmappedSite, |
| $fields: arg_$fields); |
| checkSitesListResponse(response as api.SitesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sites; |
| var arg_request = buildSite(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Site.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkSite(obj as api.Site); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sites"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkSite(response as api.Site); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sites; |
| var arg_request = buildSite(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Site.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkSite(obj as api.Site); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sites', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sites"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSite()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkSite(response as api.Site); |
| }); |
| }); |
| |
| unittest.group('resource-SizesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sizes; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sizes/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 7), |
| unittest.equals("/sizes/"), |
| ); |
| pathOffset += 7; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSize()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkSize(response as api.Size); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sizes; |
| var arg_request = buildSize(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.Size.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkSize(obj as api.Size); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sizes', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sizes"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSize()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkSize(response as api.Size); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).sizes; |
| var arg_profileId = 'foo'; |
| var arg_height = 42; |
| var arg_iabStandard = true; |
| var arg_ids = buildUnnamed5623(); |
| var arg_width = 42; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/sizes', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 6), |
| unittest.equals("/sizes"), |
| ); |
| pathOffset += 6; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap["height"]!.first), |
| unittest.equals(arg_height), |
| ); |
| unittest.expect( |
| queryMap["iabStandard"]!.first, |
| unittest.equals("$arg_iabStandard"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["width"]!.first), |
| unittest.equals(arg_width), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSizesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| height: arg_height, |
| iabStandard: arg_iabStandard, |
| ids: arg_ids, |
| width: arg_width, |
| $fields: arg_$fields); |
| checkSizesListResponse(response as api.SizesListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-SubaccountsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).subaccounts; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/subaccounts/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("/subaccounts/"), |
| ); |
| pathOffset += 13; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSubaccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkSubaccount(response as api.Subaccount); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).subaccounts; |
| var arg_request = buildSubaccount(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Subaccount.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkSubaccount(obj as api.Subaccount); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/subaccounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/subaccounts"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSubaccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkSubaccount(response as api.Subaccount); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).subaccounts; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5624(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/subaccounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/subaccounts"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSubaccountsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkSubaccountsListResponse(response as api.SubaccountsListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).subaccounts; |
| var arg_request = buildSubaccount(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Subaccount.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkSubaccount(obj as api.Subaccount); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/subaccounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/subaccounts"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSubaccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkSubaccount(response as api.Subaccount); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).subaccounts; |
| var arg_request = buildSubaccount(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Subaccount.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkSubaccount(obj as api.Subaccount); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/subaccounts', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("/subaccounts"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSubaccount()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkSubaccount(response as api.Subaccount); |
| }); |
| }); |
| |
| unittest.group('resource-TargetableRemarketingListsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetableRemarketingLists; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetableRemarketingLists/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 28), |
| unittest.equals("/targetableRemarketingLists/"), |
| ); |
| pathOffset += 28; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetableRemarketingList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkTargetableRemarketingList(response as api.TargetableRemarketingList); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetableRemarketingLists; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_active = true; |
| var arg_maxResults = 42; |
| var arg_name = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetableRemarketingLists', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 27), |
| unittest.equals("/targetableRemarketingLists"), |
| ); |
| pathOffset += 27; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["active"]!.first, |
| unittest.equals("$arg_active"), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["name"]!.first, |
| unittest.equals(arg_name), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildTargetableRemarketingListsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, arg_advertiserId, |
| active: arg_active, |
| maxResults: arg_maxResults, |
| name: arg_name, |
| pageToken: arg_pageToken, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkTargetableRemarketingListsListResponse( |
| response as api.TargetableRemarketingListsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-TargetingTemplatesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetingTemplates; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetingTemplates/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/targetingTemplates/"), |
| ); |
| pathOffset += 20; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetingTemplate()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkTargetingTemplate(response as api.TargetingTemplate); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetingTemplates; |
| var arg_request = buildTargetingTemplate(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.TargetingTemplate.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkTargetingTemplate(obj as api.TargetingTemplate); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetingTemplates', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/targetingTemplates"), |
| ); |
| pathOffset += 19; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetingTemplate()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkTargetingTemplate(response as api.TargetingTemplate); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetingTemplates; |
| var arg_profileId = 'foo'; |
| var arg_advertiserId = 'foo'; |
| var arg_ids = buildUnnamed5625(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetingTemplates', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/targetingTemplates"), |
| ); |
| pathOffset += 19; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["advertiserId"]!.first, |
| unittest.equals(arg_advertiserId), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetingTemplatesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| advertiserId: arg_advertiserId, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| $fields: arg_$fields); |
| checkTargetingTemplatesListResponse( |
| response as api.TargetingTemplatesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetingTemplates; |
| var arg_request = buildTargetingTemplate(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.TargetingTemplate.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkTargetingTemplate(obj as api.TargetingTemplate); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetingTemplates', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/targetingTemplates"), |
| ); |
| pathOffset += 19; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetingTemplate()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkTargetingTemplate(response as api.TargetingTemplate); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).targetingTemplates; |
| var arg_request = buildTargetingTemplate(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.TargetingTemplate.fromJson( |
| json as core.Map<core.String, core.dynamic>); |
| checkTargetingTemplate(obj as api.TargetingTemplate); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/targetingTemplates', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 19), |
| unittest.equals("/targetingTemplates"), |
| ); |
| pathOffset += 19; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildTargetingTemplate()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkTargetingTemplate(response as api.TargetingTemplate); |
| }); |
| }); |
| |
| unittest.group('resource-UserProfilesResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userProfiles; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserProfile()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.get(arg_profileId, $fields: arg_$fields); |
| checkUserProfile(response as api.UserProfile); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userProfiles; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 12), |
| unittest.equals("userprofiles"), |
| ); |
| pathOffset += 12; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserProfileList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list($fields: arg_$fields); |
| checkUserProfileList(response as api.UserProfileList); |
| }); |
| }); |
| |
| unittest.group('resource-UserRolePermissionGroupsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRolePermissionGroups; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRolePermissionGroups/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 26), |
| unittest.equals("/userRolePermissionGroups/"), |
| ); |
| pathOffset += 26; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRolePermissionGroup()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkUserRolePermissionGroup(response as api.UserRolePermissionGroup); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRolePermissionGroups; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRolePermissionGroups', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 25), |
| unittest.equals("/userRolePermissionGroups"), |
| ); |
| pathOffset += 25; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = |
| convert.json.encode(buildUserRolePermissionGroupsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkUserRolePermissionGroupsListResponse( |
| response as api.UserRolePermissionGroupsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-UserRolePermissionsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRolePermissions; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRolePermissions/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 21), |
| unittest.equals("/userRolePermissions/"), |
| ); |
| pathOffset += 21; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRolePermission()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkUserRolePermission(response as api.UserRolePermission); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRolePermissions; |
| var arg_profileId = 'foo'; |
| var arg_ids = buildUnnamed5626(); |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRolePermissions', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 20), |
| unittest.equals("/userRolePermissions"), |
| ); |
| pathOffset += 20; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRolePermissionsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.list(arg_profileId, ids: arg_ids, $fields: arg_$fields); |
| checkUserRolePermissionsListResponse( |
| response as api.UserRolePermissionsListResponse); |
| }); |
| }); |
| |
| unittest.group('resource-UserRolesResource', () { |
| unittest.test('method--delete', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/userRoles/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = ''; |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| await res.delete(arg_profileId, arg_id, $fields: arg_$fields); |
| }); |
| |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 11), |
| unittest.equals("/userRoles/"), |
| ); |
| pathOffset += 11; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRole()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkUserRole(response as api.UserRole); |
| }); |
| |
| unittest.test('method--insert', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_request = buildUserRole(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.UserRole.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkUserRole(obj as api.UserRole); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/userRoles"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRole()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.insert(arg_request, arg_profileId, $fields: arg_$fields); |
| checkUserRole(response as api.UserRole); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_profileId = 'foo'; |
| var arg_accountUserRoleOnly = true; |
| var arg_ids = buildUnnamed5627(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_subaccountId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/userRoles"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["accountUserRoleOnly"]!.first, |
| unittest.equals("$arg_accountUserRoleOnly"), |
| ); |
| unittest.expect( |
| queryMap["ids"]!, |
| unittest.equals(arg_ids), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap["maxResults"]!.first), |
| unittest.equals(arg_maxResults), |
| ); |
| unittest.expect( |
| queryMap["pageToken"]!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap["searchString"]!.first, |
| unittest.equals(arg_searchString), |
| ); |
| unittest.expect( |
| queryMap["sortField"]!.first, |
| unittest.equals(arg_sortField), |
| ); |
| unittest.expect( |
| queryMap["sortOrder"]!.first, |
| unittest.equals(arg_sortOrder), |
| ); |
| unittest.expect( |
| queryMap["subaccountId"]!.first, |
| unittest.equals(arg_subaccountId), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRolesListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, |
| accountUserRoleOnly: arg_accountUserRoleOnly, |
| ids: arg_ids, |
| maxResults: arg_maxResults, |
| pageToken: arg_pageToken, |
| searchString: arg_searchString, |
| sortField: arg_sortField, |
| sortOrder: arg_sortOrder, |
| subaccountId: arg_subaccountId, |
| $fields: arg_$fields); |
| checkUserRolesListResponse(response as api.UserRolesListResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_request = buildUserRole(); |
| var arg_profileId = 'foo'; |
| var arg_id = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.UserRole.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkUserRole(obj as api.UserRole); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/userRoles"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["id"]!.first, |
| unittest.equals(arg_id), |
| ); |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRole()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.patch(arg_request, arg_profileId, arg_id, |
| $fields: arg_$fields); |
| checkUserRole(response as api.UserRole); |
| }); |
| |
| unittest.test('method--update', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).userRoles; |
| var arg_request = buildUserRole(); |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = |
| api.UserRole.fromJson(json as core.Map<core.String, core.dynamic>); |
| checkUserRole(obj as api.UserRole); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/userRoles', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 10), |
| unittest.equals("/userRoles"), |
| ); |
| pathOffset += 10; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildUserRole()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.update(arg_request, arg_profileId, $fields: arg_$fields); |
| checkUserRole(response as api.UserRole); |
| }); |
| }); |
| |
| unittest.group('resource-VideoFormatsResource', () { |
| unittest.test('method--get', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).videoFormats; |
| var arg_profileId = 'foo'; |
| var arg_id = 42; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/videoFormats/', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 14), |
| unittest.equals("/videoFormats/"), |
| ); |
| pathOffset += 14; |
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| pathOffset = path.length; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_id'), |
| ); |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildVideoFormat()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = |
| await res.get(arg_profileId, arg_id, $fields: arg_$fields); |
| checkVideoFormat(response as api.VideoFormat); |
| }); |
| |
| unittest.test('method--list', () async { |
| var mock = HttpServerMock(); |
| var res = api.DfareportingApi(mock).videoFormats; |
| var arg_profileId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals("/"), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 18), |
| unittest.equals("dfareporting/v3.4/"), |
| ); |
| pathOffset += 18; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("userprofiles/"), |
| ); |
| pathOffset += 13; |
| index = path.indexOf('/videoFormats', pathOffset); |
| unittest.expect(index >= 0, unittest.isTrue); |
| subPart = |
| core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| pathOffset = index; |
| unittest.expect( |
| subPart, |
| unittest.equals('$arg_profileId'), |
| ); |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("/videoFormats"), |
| ); |
| pathOffset += 13; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["fields"]!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildVideoFormatsListResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| final response = await res.list(arg_profileId, $fields: arg_$fields); |
| checkVideoFormatsListResponse(response as api.VideoFormatsListResponse); |
| }); |
| }); |
| } |