| // 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_5.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> buildUnnamed3735() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3735(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> buildUnnamed3736() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3736(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 = buildUnnamed3735(); |
| o.accountProfile = 'foo'; |
| o.active = true; |
| o.activeAdsLimitTier = 'foo'; |
| o.activeViewOptOut = true; |
| o.availablePermissionIds = buildUnnamed3736(); |
| 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) { |
| checkUnnamed3735(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); |
| checkUnnamed3736(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> buildUnnamed3737() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3737(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 = buildUnnamed3737(); |
| 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) { |
| checkUnnamed3737(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> buildUnnamed3738() { |
| var o = <api.AccountPermissionGroup>[]; |
| o.add(buildAccountPermissionGroup()); |
| o.add(buildAccountPermissionGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3738(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 = buildUnnamed3738(); |
| o.kind = 'foo'; |
| } |
| buildCounterAccountPermissionGroupsListResponse--; |
| return o; |
| } |
| |
| void checkAccountPermissionGroupsListResponse( |
| api.AccountPermissionGroupsListResponse o) { |
| buildCounterAccountPermissionGroupsListResponse++; |
| if (buildCounterAccountPermissionGroupsListResponse < 3) { |
| checkUnnamed3738(o.accountPermissionGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountPermissionGroupsListResponse--; |
| } |
| |
| core.List<api.AccountPermission> buildUnnamed3739() { |
| var o = <api.AccountPermission>[]; |
| o.add(buildAccountPermission()); |
| o.add(buildAccountPermission()); |
| return o; |
| } |
| |
| void checkUnnamed3739(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 = buildUnnamed3739(); |
| o.kind = 'foo'; |
| } |
| buildCounterAccountPermissionsListResponse--; |
| return o; |
| } |
| |
| void checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { |
| buildCounterAccountPermissionsListResponse++; |
| if (buildCounterAccountPermissionsListResponse < 3) { |
| checkUnnamed3739(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> buildUnnamed3740() { |
| var o = <api.AccountUserProfile>[]; |
| o.add(buildAccountUserProfile()); |
| o.add(buildAccountUserProfile()); |
| return o; |
| } |
| |
| void checkUnnamed3740(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 = buildUnnamed3740(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAccountUserProfilesListResponse--; |
| return o; |
| } |
| |
| void checkAccountUserProfilesListResponse( |
| api.AccountUserProfilesListResponse o) { |
| buildCounterAccountUserProfilesListResponse++; |
| if (buildCounterAccountUserProfilesListResponse < 3) { |
| checkUnnamed3740(o.accountUserProfiles!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountUserProfilesListResponse--; |
| } |
| |
| core.List<api.Account> buildUnnamed3741() { |
| var o = <api.Account>[]; |
| o.add(buildAccount()); |
| o.add(buildAccount()); |
| return o; |
| } |
| |
| void checkUnnamed3741(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 = buildUnnamed3741(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAccountsListResponse--; |
| return o; |
| } |
| |
| void checkAccountsListResponse(api.AccountsListResponse o) { |
| buildCounterAccountsListResponse++; |
| if (buildCounterAccountsListResponse < 3) { |
| checkUnnamed3741(o.accounts!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAccountsListResponse--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3742() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3742(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> buildUnnamed3743() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3743(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 = buildUnnamed3742(); |
| o.kind = 'foo'; |
| o.metricNames = buildUnnamed3743(); |
| } |
| buildCounterActivities--; |
| return o; |
| } |
| |
| void checkActivities(api.Activities o) { |
| buildCounterActivities++; |
| if (buildCounterActivities < 3) { |
| checkUnnamed3742(o.filters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3743(o.metricNames!); |
| } |
| buildCounterActivities--; |
| } |
| |
| core.List<api.CreativeGroupAssignment> buildUnnamed3744() { |
| var o = <api.CreativeGroupAssignment>[]; |
| o.add(buildCreativeGroupAssignment()); |
| o.add(buildCreativeGroupAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed3744(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> buildUnnamed3745() { |
| var o = <api.EventTagOverride>[]; |
| o.add(buildEventTagOverride()); |
| o.add(buildEventTagOverride()); |
| return o; |
| } |
| |
| void checkUnnamed3745(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> buildUnnamed3746() { |
| var o = <api.PlacementAssignment>[]; |
| o.add(buildPlacementAssignment()); |
| o.add(buildPlacementAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed3746(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 = buildUnnamed3744(); |
| 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 = buildUnnamed3745(); |
| 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 = buildUnnamed3746(); |
| 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); |
| checkUnnamed3744(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")), |
| ); |
| checkUnnamed3745(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'), |
| ); |
| checkUnnamed3746(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.enabled = true; |
| } |
| buildCounterAdBlockingConfiguration--; |
| return o; |
| } |
| |
| void checkAdBlockingConfiguration(api.AdBlockingConfiguration o) { |
| buildCounterAdBlockingConfiguration++; |
| if (buildCounterAdBlockingConfiguration < 3) { |
| unittest.expect(o.enabled!, 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> buildUnnamed3747() { |
| var o = <api.Ad>[]; |
| o.add(buildAd()); |
| o.add(buildAd()); |
| return o; |
| } |
| |
| void checkUnnamed3747(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 = buildUnnamed3747(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdsListResponse--; |
| return o; |
| } |
| |
| void checkAdsListResponse(api.AdsListResponse o) { |
| buildCounterAdsListResponse++; |
| if (buildCounterAdsListResponse < 3) { |
| checkUnnamed3747(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.measurementPartnerLink = buildMeasurementPartnerAdvertiserLink(); |
| 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'), |
| ); |
| checkMeasurementPartnerAdvertiserLink( |
| o.measurementPartnerLink! as api.MeasurementPartnerAdvertiserLink); |
| 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> buildUnnamed3748() { |
| var o = <api.AdvertiserGroup>[]; |
| o.add(buildAdvertiserGroup()); |
| o.add(buildAdvertiserGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3748(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 = buildUnnamed3748(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertiserGroupsListResponse--; |
| return o; |
| } |
| |
| void checkAdvertiserGroupsListResponse(api.AdvertiserGroupsListResponse o) { |
| buildCounterAdvertiserGroupsListResponse++; |
| if (buildCounterAdvertiserGroupsListResponse < 3) { |
| checkUnnamed3748(o.advertiserGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertiserGroupsListResponse--; |
| } |
| |
| core.List<api.LandingPage> buildUnnamed3749() { |
| var o = <api.LandingPage>[]; |
| o.add(buildLandingPage()); |
| o.add(buildLandingPage()); |
| return o; |
| } |
| |
| void checkUnnamed3749(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 = buildUnnamed3749(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertiserLandingPagesListResponse--; |
| return o; |
| } |
| |
| void checkAdvertiserLandingPagesListResponse( |
| api.AdvertiserLandingPagesListResponse o) { |
| buildCounterAdvertiserLandingPagesListResponse++; |
| if (buildCounterAdvertiserLandingPagesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3749(o.landingPages!); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterAdvertiserLandingPagesListResponse--; |
| } |
| |
| core.List<api.Advertiser> buildUnnamed3750() { |
| var o = <api.Advertiser>[]; |
| o.add(buildAdvertiser()); |
| o.add(buildAdvertiser()); |
| return o; |
| } |
| |
| void checkUnnamed3750(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 = buildUnnamed3750(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterAdvertisersListResponse--; |
| return o; |
| } |
| |
| void checkAdvertisersListResponse(api.AdvertisersListResponse o) { |
| buildCounterAdvertisersListResponse++; |
| if (buildCounterAdvertisersListResponse < 3) { |
| checkUnnamed3750(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> buildUnnamed3751() { |
| var o = <api.AudienceSegment>[]; |
| o.add(buildAudienceSegment()); |
| o.add(buildAudienceSegment()); |
| return o; |
| } |
| |
| void checkUnnamed3751(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 = buildUnnamed3751(); |
| o.id = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterAudienceSegmentGroup--; |
| return o; |
| } |
| |
| void checkAudienceSegmentGroup(api.AudienceSegmentGroup o) { |
| buildCounterAudienceSegmentGroup++; |
| if (buildCounterAudienceSegmentGroup < 3) { |
| checkUnnamed3751(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> buildUnnamed3752() { |
| var o = <api.Browser>[]; |
| o.add(buildBrowser()); |
| o.add(buildBrowser()); |
| return o; |
| } |
| |
| void checkUnnamed3752(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 = buildUnnamed3752(); |
| o.kind = 'foo'; |
| } |
| buildCounterBrowsersListResponse--; |
| return o; |
| } |
| |
| void checkBrowsersListResponse(api.BrowsersListResponse o) { |
| buildCounterBrowsersListResponse++; |
| if (buildCounterBrowsersListResponse < 3) { |
| checkUnnamed3752(o.browsers!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterBrowsersListResponse--; |
| } |
| |
| core.List<api.CreativeOptimizationConfiguration> buildUnnamed3753() { |
| var o = <api.CreativeOptimizationConfiguration>[]; |
| o.add(buildCreativeOptimizationConfiguration()); |
| o.add(buildCreativeOptimizationConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed3753(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> buildUnnamed3754() { |
| var o = <api.AudienceSegmentGroup>[]; |
| o.add(buildAudienceSegmentGroup()); |
| o.add(buildAudienceSegmentGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3754(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> buildUnnamed3755() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3755(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> buildUnnamed3756() { |
| var o = <api.EventTagOverride>[]; |
| o.add(buildEventTagOverride()); |
| o.add(buildEventTagOverride()); |
| return o; |
| } |
| |
| void checkUnnamed3756(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> buildUnnamed3757() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3757(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 = buildUnnamed3753(); |
| o.advertiserGroupId = 'foo'; |
| o.advertiserId = 'foo'; |
| o.advertiserIdDimensionValue = buildDimensionValue(); |
| o.archived = true; |
| o.audienceSegmentGroups = buildUnnamed3754(); |
| o.billingInvoiceCode = 'foo'; |
| o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); |
| o.comment = 'foo'; |
| o.createInfo = buildLastModifiedInfo(); |
| o.creativeGroupIds = buildUnnamed3755(); |
| o.creativeOptimizationConfiguration = |
| buildCreativeOptimizationConfiguration(); |
| o.defaultClickThroughEventTagProperties = |
| buildDefaultClickThroughEventTagProperties(); |
| o.defaultLandingPageId = 'foo'; |
| o.endDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.eventTagOverrides = buildUnnamed3756(); |
| o.externalId = 'foo'; |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.lastModifiedInfo = buildLastModifiedInfo(); |
| o.measurementPartnerLink = buildMeasurementPartnerCampaignLink(); |
| o.name = 'foo'; |
| o.nielsenOcrEnabled = true; |
| o.startDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.subaccountId = 'foo'; |
| o.traffickerEmails = buildUnnamed3757(); |
| } |
| 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); |
| checkUnnamed3753(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); |
| checkUnnamed3754(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); |
| checkUnnamed3755(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")), |
| ); |
| checkUnnamed3756(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); |
| checkMeasurementPartnerCampaignLink( |
| o.measurementPartnerLink! as api.MeasurementPartnerCampaignLink); |
| 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'), |
| ); |
| checkUnnamed3757(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> buildUnnamed3758() { |
| var o = <api.CampaignCreativeAssociation>[]; |
| o.add(buildCampaignCreativeAssociation()); |
| o.add(buildCampaignCreativeAssociation()); |
| return o; |
| } |
| |
| void checkUnnamed3758(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 = buildUnnamed3758(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCampaignCreativeAssociationsListResponse--; |
| return o; |
| } |
| |
| void checkCampaignCreativeAssociationsListResponse( |
| api.CampaignCreativeAssociationsListResponse o) { |
| buildCounterCampaignCreativeAssociationsListResponse++; |
| if (buildCounterCampaignCreativeAssociationsListResponse < 3) { |
| checkUnnamed3758(o.campaignCreativeAssociations!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCampaignCreativeAssociationsListResponse--; |
| } |
| |
| core.List<api.Campaign> buildUnnamed3759() { |
| var o = <api.Campaign>[]; |
| o.add(buildCampaign()); |
| o.add(buildCampaign()); |
| return o; |
| } |
| |
| void checkUnnamed3759(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 = buildUnnamed3759(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCampaignsListResponse--; |
| return o; |
| } |
| |
| void checkCampaignsListResponse(api.CampaignsListResponse o) { |
| buildCounterCampaignsListResponse++; |
| if (buildCounterCampaignsListResponse < 3) { |
| checkUnnamed3759(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> buildUnnamed3760() { |
| var o = <api.ChangeLog>[]; |
| o.add(buildChangeLog()); |
| o.add(buildChangeLog()); |
| return o; |
| } |
| |
| void checkUnnamed3760(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 = buildUnnamed3760(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterChangeLogsListResponse--; |
| return o; |
| } |
| |
| void checkChangeLogsListResponse(api.ChangeLogsListResponse o) { |
| buildCounterChangeLogsListResponse++; |
| if (buildCounterChangeLogsListResponse < 3) { |
| checkUnnamed3760(o.changeLogs!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterChangeLogsListResponse--; |
| } |
| |
| core.List<api.ChannelGroupingRule> buildUnnamed3761() { |
| var o = <api.ChannelGroupingRule>[]; |
| o.add(buildChannelGroupingRule()); |
| o.add(buildChannelGroupingRule()); |
| return o; |
| } |
| |
| void checkUnnamed3761(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 = buildUnnamed3761(); |
| } |
| 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'), |
| ); |
| checkUnnamed3761(o.rules!); |
| } |
| buildCounterChannelGrouping--; |
| } |
| |
| core.List<api.DisjunctiveMatchStatement> buildUnnamed3762() { |
| var o = <api.DisjunctiveMatchStatement>[]; |
| o.add(buildDisjunctiveMatchStatement()); |
| o.add(buildDisjunctiveMatchStatement()); |
| return o; |
| } |
| |
| void checkUnnamed3762(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 = buildUnnamed3762(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterChannelGroupingRule--; |
| return o; |
| } |
| |
| void checkChannelGroupingRule(api.ChannelGroupingRule o) { |
| buildCounterChannelGroupingRule++; |
| if (buildCounterChannelGroupingRule < 3) { |
| checkUnnamed3762(o.disjunctiveMatchStatements!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.name!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterChannelGroupingRule--; |
| } |
| |
| core.List<api.City> buildUnnamed3763() { |
| var o = <api.City>[]; |
| o.add(buildCity()); |
| o.add(buildCity()); |
| return o; |
| } |
| |
| void checkUnnamed3763(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 = buildUnnamed3763(); |
| o.kind = 'foo'; |
| } |
| buildCounterCitiesListResponse--; |
| return o; |
| } |
| |
| void checkCitiesListResponse(api.CitiesListResponse o) { |
| buildCounterCitiesListResponse++; |
| if (buildCounterCitiesListResponse < 3) { |
| checkUnnamed3763(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> buildUnnamed3764() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3764(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 = buildUnnamed3764(); |
| o.imageOnly = true; |
| o.kind = 'foo'; |
| } |
| buildCounterCompanionSetting--; |
| return o; |
| } |
| |
| void checkCompanionSetting(api.CompanionSetting o) { |
| buildCounterCompanionSetting++; |
| if (buildCounterCompanionSetting < 3) { |
| unittest.expect(o.companionsDisabled!, unittest.isTrue); |
| checkUnnamed3764(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> buildUnnamed3765() { |
| var o = <api.ConnectionType>[]; |
| o.add(buildConnectionType()); |
| o.add(buildConnectionType()); |
| return o; |
| } |
| |
| void checkUnnamed3765(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 = buildUnnamed3765(); |
| o.kind = 'foo'; |
| } |
| buildCounterConnectionTypesListResponse--; |
| return o; |
| } |
| |
| void checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { |
| buildCounterConnectionTypesListResponse++; |
| if (buildCounterConnectionTypesListResponse < 3) { |
| checkUnnamed3765(o.connectionTypes!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConnectionTypesListResponse--; |
| } |
| |
| core.List<api.ContentCategory> buildUnnamed3766() { |
| var o = <api.ContentCategory>[]; |
| o.add(buildContentCategory()); |
| o.add(buildContentCategory()); |
| return o; |
| } |
| |
| void checkUnnamed3766(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 = buildUnnamed3766(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterContentCategoriesListResponse--; |
| return o; |
| } |
| |
| void checkContentCategoriesListResponse(api.ContentCategoriesListResponse o) { |
| buildCounterContentCategoriesListResponse++; |
| if (buildCounterContentCategoriesListResponse < 3) { |
| checkUnnamed3766(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> buildUnnamed3767() { |
| var o = <api.CustomFloodlightVariable>[]; |
| o.add(buildCustomFloodlightVariable()); |
| o.add(buildCustomFloodlightVariable()); |
| return o; |
| } |
| |
| void checkUnnamed3767(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> buildUnnamed3768() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3768(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 = buildUnnamed3767(); |
| o.dclid = 'foo'; |
| o.encryptedUserId = 'foo'; |
| o.encryptedUserIdCandidates = buildUnnamed3768(); |
| 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); |
| checkUnnamed3767(o.customVariables!); |
| unittest.expect( |
| o.dclid!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.encryptedUserId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3768(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> buildUnnamed3769() { |
| var o = <api.ConversionError>[]; |
| o.add(buildConversionError()); |
| o.add(buildConversionError()); |
| return o; |
| } |
| |
| void checkUnnamed3769(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 = buildUnnamed3769(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionStatus--; |
| return o; |
| } |
| |
| void checkConversionStatus(api.ConversionStatus o) { |
| buildCounterConversionStatus++; |
| if (buildCounterConversionStatus < 3) { |
| checkConversion(o.conversion! as api.Conversion); |
| checkUnnamed3769(o.errors!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionStatus--; |
| } |
| |
| core.List<api.Conversion> buildUnnamed3770() { |
| var o = <api.Conversion>[]; |
| o.add(buildConversion()); |
| o.add(buildConversion()); |
| return o; |
| } |
| |
| void checkUnnamed3770(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 = buildUnnamed3770(); |
| o.encryptionInfo = buildEncryptionInfo(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionsBatchInsertRequest--; |
| return o; |
| } |
| |
| void checkConversionsBatchInsertRequest(api.ConversionsBatchInsertRequest o) { |
| buildCounterConversionsBatchInsertRequest++; |
| if (buildCounterConversionsBatchInsertRequest < 3) { |
| checkUnnamed3770(o.conversions!); |
| checkEncryptionInfo(o.encryptionInfo! as api.EncryptionInfo); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionsBatchInsertRequest--; |
| } |
| |
| core.List<api.ConversionStatus> buildUnnamed3771() { |
| var o = <api.ConversionStatus>[]; |
| o.add(buildConversionStatus()); |
| o.add(buildConversionStatus()); |
| return o; |
| } |
| |
| void checkUnnamed3771(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 = buildUnnamed3771(); |
| } |
| 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'), |
| ); |
| checkUnnamed3771(o.status!); |
| } |
| buildCounterConversionsBatchInsertResponse--; |
| } |
| |
| core.List<api.Conversion> buildUnnamed3772() { |
| var o = <api.Conversion>[]; |
| o.add(buildConversion()); |
| o.add(buildConversion()); |
| return o; |
| } |
| |
| void checkUnnamed3772(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 = buildUnnamed3772(); |
| o.encryptionInfo = buildEncryptionInfo(); |
| o.kind = 'foo'; |
| } |
| buildCounterConversionsBatchUpdateRequest--; |
| return o; |
| } |
| |
| void checkConversionsBatchUpdateRequest(api.ConversionsBatchUpdateRequest o) { |
| buildCounterConversionsBatchUpdateRequest++; |
| if (buildCounterConversionsBatchUpdateRequest < 3) { |
| checkUnnamed3772(o.conversions!); |
| checkEncryptionInfo(o.encryptionInfo! as api.EncryptionInfo); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterConversionsBatchUpdateRequest--; |
| } |
| |
| core.List<api.ConversionStatus> buildUnnamed3773() { |
| var o = <api.ConversionStatus>[]; |
| o.add(buildConversionStatus()); |
| o.add(buildConversionStatus()); |
| return o; |
| } |
| |
| void checkUnnamed3773(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 = buildUnnamed3773(); |
| } |
| 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'), |
| ); |
| checkUnnamed3773(o.status!); |
| } |
| buildCounterConversionsBatchUpdateResponse--; |
| } |
| |
| core.List<api.Country> buildUnnamed3774() { |
| var o = <api.Country>[]; |
| o.add(buildCountry()); |
| o.add(buildCountry()); |
| return o; |
| } |
| |
| void checkUnnamed3774(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 = buildUnnamed3774(); |
| o.kind = 'foo'; |
| } |
| buildCounterCountriesListResponse--; |
| return o; |
| } |
| |
| void checkCountriesListResponse(api.CountriesListResponse o) { |
| buildCounterCountriesListResponse++; |
| if (buildCounterCountriesListResponse < 3) { |
| checkUnnamed3774(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> buildUnnamed3775() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3775(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> buildUnnamed3776() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3776(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> buildUnnamed3777() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3777(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> buildUnnamed3778() { |
| var o = <api.ClickTag>[]; |
| o.add(buildClickTag()); |
| o.add(buildClickTag()); |
| return o; |
| } |
| |
| void checkUnnamed3778(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> buildUnnamed3779() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3779(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> buildUnnamed3780() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3780(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> buildUnnamed3781() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3781(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> buildUnnamed3782() { |
| var o = <api.CreativeAsset>[]; |
| o.add(buildCreativeAsset()); |
| o.add(buildCreativeAsset()); |
| return o; |
| } |
| |
| void checkUnnamed3782(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> buildUnnamed3783() { |
| var o = <api.CreativeFieldAssignment>[]; |
| o.add(buildCreativeFieldAssignment()); |
| o.add(buildCreativeFieldAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed3783(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> buildUnnamed3784() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3784(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> buildUnnamed3785() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3785(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> buildUnnamed3786() { |
| var o = <api.ThirdPartyTrackingUrl>[]; |
| o.add(buildThirdPartyTrackingUrl()); |
| o.add(buildThirdPartyTrackingUrl()); |
| return o; |
| } |
| |
| void checkUnnamed3786(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> buildUnnamed3787() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3787(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 = buildUnnamed3775(); |
| o.additionalSizes = buildUnnamed3776(); |
| 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 = buildUnnamed3777(); |
| o.backupImageReportingLabel = 'foo'; |
| o.backupImageTargetWindow = buildTargetWindow(); |
| o.clickTags = buildUnnamed3778(); |
| o.commercialId = 'foo'; |
| o.companionCreatives = buildUnnamed3779(); |
| o.compatibility = buildUnnamed3780(); |
| o.convertFlashToHtml5 = true; |
| o.counterCustomEvents = buildUnnamed3781(); |
| o.creativeAssetSelection = buildCreativeAssetSelection(); |
| o.creativeAssets = buildUnnamed3782(); |
| o.creativeFieldAssignments = buildUnnamed3783(); |
| o.customKeyValues = buildUnnamed3784(); |
| o.dynamicAssetSelection = true; |
| o.exitCustomEvents = buildUnnamed3785(); |
| 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 = buildUnnamed3786(); |
| o.timerCustomEvents = buildUnnamed3787(); |
| 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'), |
| ); |
| checkUnnamed3775(o.adTagKeys!); |
| checkUnnamed3776(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); |
| checkUnnamed3777(o.backupImageFeatures!); |
| unittest.expect( |
| o.backupImageReportingLabel!, |
| unittest.equals('foo'), |
| ); |
| checkTargetWindow(o.backupImageTargetWindow! as api.TargetWindow); |
| checkUnnamed3778(o.clickTags!); |
| unittest.expect( |
| o.commercialId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3779(o.companionCreatives!); |
| checkUnnamed3780(o.compatibility!); |
| unittest.expect(o.convertFlashToHtml5!, unittest.isTrue); |
| checkUnnamed3781(o.counterCustomEvents!); |
| checkCreativeAssetSelection( |
| o.creativeAssetSelection! as api.CreativeAssetSelection); |
| checkUnnamed3782(o.creativeAssets!); |
| checkUnnamed3783(o.creativeFieldAssignments!); |
| checkUnnamed3784(o.customKeyValues!); |
| unittest.expect(o.dynamicAssetSelection!, unittest.isTrue); |
| checkUnnamed3785(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'), |
| ); |
| checkUnnamed3786(o.thirdPartyUrls!); |
| checkUnnamed3787(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> buildUnnamed3788() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3788(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> buildUnnamed3789() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3789(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> buildUnnamed3790() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3790(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 = buildUnnamed3788(); |
| 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 = buildUnnamed3789(); |
| o.customStartTimeValue = 42; |
| o.detectedFeatures = buildUnnamed3790(); |
| 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); |
| checkUnnamed3788(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); |
| checkUnnamed3789(o.companionCreativeIds!); |
| unittest.expect( |
| o.customStartTimeValue!, |
| unittest.equals(42), |
| ); |
| checkUnnamed3790(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> buildUnnamed3791() { |
| var o = <api.ClickTag>[]; |
| o.add(buildClickTag()); |
| o.add(buildClickTag()); |
| return o; |
| } |
| |
| void checkUnnamed3791(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> buildUnnamed3792() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3792(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> buildUnnamed3793() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3793(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> buildUnnamed3794() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3794(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> buildUnnamed3795() { |
| var o = <api.CreativeCustomEvent>[]; |
| o.add(buildCreativeCustomEvent()); |
| o.add(buildCreativeCustomEvent()); |
| return o; |
| } |
| |
| void checkUnnamed3795(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> buildUnnamed3796() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3796(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 = buildUnnamed3791(); |
| o.counterCustomEvents = buildUnnamed3792(); |
| o.detectedFeatures = buildUnnamed3793(); |
| o.exitCustomEvents = buildUnnamed3794(); |
| o.id = 'foo'; |
| o.idDimensionValue = buildDimensionValue(); |
| o.kind = 'foo'; |
| o.richMedia = true; |
| o.timerCustomEvents = buildUnnamed3795(); |
| o.warnedValidationRules = buildUnnamed3796(); |
| } |
| buildCounterCreativeAssetMetadata--; |
| return o; |
| } |
| |
| void checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { |
| buildCounterCreativeAssetMetadata++; |
| if (buildCounterCreativeAssetMetadata < 3) { |
| checkCreativeAssetId(o.assetIdentifier! as api.CreativeAssetId); |
| checkUnnamed3791(o.clickTags!); |
| checkUnnamed3792(o.counterCustomEvents!); |
| checkUnnamed3793(o.detectedFeatures!); |
| checkUnnamed3794(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); |
| checkUnnamed3795(o.timerCustomEvents!); |
| checkUnnamed3796(o.warnedValidationRules!); |
| } |
| buildCounterCreativeAssetMetadata--; |
| } |
| |
| core.List<api.Rule> buildUnnamed3797() { |
| var o = <api.Rule>[]; |
| o.add(buildRule()); |
| o.add(buildRule()); |
| return o; |
| } |
| |
| void checkUnnamed3797(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 = buildUnnamed3797(); |
| } |
| buildCounterCreativeAssetSelection--; |
| return o; |
| } |
| |
| void checkCreativeAssetSelection(api.CreativeAssetSelection o) { |
| buildCounterCreativeAssetSelection++; |
| if (buildCounterCreativeAssetSelection < 3) { |
| unittest.expect( |
| o.defaultAssetId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3797(o.rules!); |
| } |
| buildCounterCreativeAssetSelection--; |
| } |
| |
| core.List<api.CompanionClickThroughOverride> buildUnnamed3798() { |
| var o = <api.CompanionClickThroughOverride>[]; |
| o.add(buildCompanionClickThroughOverride()); |
| o.add(buildCompanionClickThroughOverride()); |
| return o; |
| } |
| |
| void checkUnnamed3798(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> buildUnnamed3799() { |
| var o = <api.CreativeGroupAssignment>[]; |
| o.add(buildCreativeGroupAssignment()); |
| o.add(buildCreativeGroupAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed3799(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> buildUnnamed3800() { |
| var o = <api.RichMediaExitOverride>[]; |
| o.add(buildRichMediaExitOverride()); |
| o.add(buildRichMediaExitOverride()); |
| return o; |
| } |
| |
| void checkUnnamed3800(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 = buildUnnamed3798(); |
| o.creativeGroupAssignments = buildUnnamed3799(); |
| o.creativeId = 'foo'; |
| o.creativeIdDimensionValue = buildDimensionValue(); |
| o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| o.richMediaExitOverrides = buildUnnamed3800(); |
| 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); |
| checkUnnamed3798(o.companionCreativeOverrides!); |
| checkUnnamed3799(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")), |
| ); |
| checkUnnamed3800(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> buildUnnamed3801() { |
| var o = <api.CreativeFieldValue>[]; |
| o.add(buildCreativeFieldValue()); |
| o.add(buildCreativeFieldValue()); |
| return o; |
| } |
| |
| void checkUnnamed3801(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 = buildUnnamed3801(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeFieldValuesListResponse--; |
| return o; |
| } |
| |
| void checkCreativeFieldValuesListResponse( |
| api.CreativeFieldValuesListResponse o) { |
| buildCounterCreativeFieldValuesListResponse++; |
| if (buildCounterCreativeFieldValuesListResponse < 3) { |
| checkUnnamed3801(o.creativeFieldValues!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeFieldValuesListResponse--; |
| } |
| |
| core.List<api.CreativeField> buildUnnamed3802() { |
| var o = <api.CreativeField>[]; |
| o.add(buildCreativeField()); |
| o.add(buildCreativeField()); |
| return o; |
| } |
| |
| void checkUnnamed3802(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 = buildUnnamed3802(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeFieldsListResponse--; |
| return o; |
| } |
| |
| void checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { |
| buildCounterCreativeFieldsListResponse++; |
| if (buildCounterCreativeFieldsListResponse < 3) { |
| checkUnnamed3802(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> buildUnnamed3803() { |
| var o = <api.CreativeGroup>[]; |
| o.add(buildCreativeGroup()); |
| o.add(buildCreativeGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3803(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 = buildUnnamed3803(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativeGroupsListResponse--; |
| return o; |
| } |
| |
| void checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { |
| buildCounterCreativeGroupsListResponse++; |
| if (buildCounterCreativeGroupsListResponse < 3) { |
| checkUnnamed3803(o.creativeGroups!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeGroupsListResponse--; |
| } |
| |
| core.List<api.OptimizationActivity> buildUnnamed3804() { |
| var o = <api.OptimizationActivity>[]; |
| o.add(buildOptimizationActivity()); |
| o.add(buildOptimizationActivity()); |
| return o; |
| } |
| |
| void checkUnnamed3804(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 = buildUnnamed3804(); |
| 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'), |
| ); |
| checkUnnamed3804(o.optimizationActivitys!); |
| unittest.expect( |
| o.optimizationModel!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativeOptimizationConfiguration--; |
| } |
| |
| core.List<api.CreativeAssignment> buildUnnamed3805() { |
| var o = <api.CreativeAssignment>[]; |
| o.add(buildCreativeAssignment()); |
| o.add(buildCreativeAssignment()); |
| return o; |
| } |
| |
| void checkUnnamed3805(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 = buildUnnamed3805(); |
| o.creativeOptimizationConfigurationId = 'foo'; |
| o.type = 'foo'; |
| o.weightCalculationStrategy = 'foo'; |
| } |
| buildCounterCreativeRotation--; |
| return o; |
| } |
| |
| void checkCreativeRotation(api.CreativeRotation o) { |
| buildCounterCreativeRotation++; |
| if (buildCounterCreativeRotation < 3) { |
| checkUnnamed3805(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> buildUnnamed3806() { |
| var o = <api.Creative>[]; |
| o.add(buildCreative()); |
| o.add(buildCreative()); |
| return o; |
| } |
| |
| void checkUnnamed3806(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 = buildUnnamed3806(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterCreativesListResponse--; |
| return o; |
| } |
| |
| void checkCreativesListResponse(api.CreativesListResponse o) { |
| buildCounterCreativesListResponse++; |
| if (buildCounterCreativesListResponse < 3) { |
| checkUnnamed3806(o.creatives!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCreativesListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed3807() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3807(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> buildUnnamed3808() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3808(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> buildUnnamed3809() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3809(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> buildUnnamed3810() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3810(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 = buildUnnamed3807(); |
| o.dimensionFilters = buildUnnamed3808(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3809(); |
| o.overlapMetrics = buildUnnamed3810(); |
| } |
| buildCounterCrossDimensionReachReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkCrossDimensionReachReportCompatibleFields( |
| api.CrossDimensionReachReportCompatibleFields o) { |
| buildCounterCrossDimensionReachReportCompatibleFields++; |
| if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { |
| checkUnnamed3807(o.breakdown!); |
| checkUnnamed3808(o.dimensionFilters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3809(o.metrics!); |
| checkUnnamed3810(o.overlapMetrics!); |
| } |
| buildCounterCrossDimensionReachReportCompatibleFields--; |
| } |
| |
| 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> buildUnnamed3811() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3811(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 = buildUnnamed3811(); |
| o.kind = 'foo'; |
| } |
| buildCounterCustomRichMediaEvents--; |
| return o; |
| } |
| |
| void checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { |
| buildCounterCustomRichMediaEvents++; |
| if (buildCounterCustomRichMediaEvents < 3) { |
| checkUnnamed3811(o.filteredEventIds!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterCustomRichMediaEvents--; |
| } |
| |
| 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 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> buildUnnamed3812() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3812(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> buildUnnamed3813() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed3813(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 = buildUnnamed3812(); |
| o.hoursOfDay = buildUnnamed3813(); |
| o.userLocalTime = true; |
| } |
| buildCounterDayPartTargeting--; |
| return o; |
| } |
| |
| void checkDayPartTargeting(api.DayPartTargeting o) { |
| buildCounterDayPartTargeting++; |
| if (buildCounterDayPartTargeting < 3) { |
| checkUnnamed3812(o.daysOfWeek!); |
| checkUnnamed3813(o.hoursOfDay!); |
| unittest.expect(o.userLocalTime!, unittest.isTrue); |
| } |
| buildCounterDayPartTargeting--; |
| } |
| |
| core.List<core.String> buildUnnamed3814() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3814(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 = buildUnnamed3814(); |
| } |
| 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); |
| checkUnnamed3814(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> buildUnnamed3815() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3815(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 = buildUnnamed3815(); |
| 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'), |
| ); |
| checkUnnamed3815(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDimensionValueList--; |
| } |
| |
| core.List<api.DimensionFilter> buildUnnamed3816() { |
| var o = <api.DimensionFilter>[]; |
| o.add(buildDimensionFilter()); |
| o.add(buildDimensionFilter()); |
| return o; |
| } |
| |
| void checkUnnamed3816(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 = buildUnnamed3816(); |
| 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")), |
| ); |
| checkUnnamed3816(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> buildUnnamed3817() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3817(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> buildUnnamed3818() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3818(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 = buildUnnamed3817(); |
| o.interstitialTagFormats = buildUnnamed3818(); |
| 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); |
| checkUnnamed3817(o.inpageTagFormats!); |
| checkUnnamed3818(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> buildUnnamed3819() { |
| var o = <api.DirectorySite>[]; |
| o.add(buildDirectorySite()); |
| o.add(buildDirectorySite()); |
| return o; |
| } |
| |
| void checkUnnamed3819(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 = buildUnnamed3819(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterDirectorySitesListResponse--; |
| return o; |
| } |
| |
| void checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { |
| buildCounterDirectorySitesListResponse++; |
| if (buildCounterDirectorySitesListResponse < 3) { |
| checkUnnamed3819(o.directorySites!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterDirectorySitesListResponse--; |
| } |
| |
| core.List<api.EventFilter> buildUnnamed3820() { |
| var o = <api.EventFilter>[]; |
| o.add(buildEventFilter()); |
| o.add(buildEventFilter()); |
| return o; |
| } |
| |
| void checkUnnamed3820(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 = buildUnnamed3820(); |
| o.kind = 'foo'; |
| } |
| buildCounterDisjunctiveMatchStatement--; |
| return o; |
| } |
| |
| void checkDisjunctiveMatchStatement(api.DisjunctiveMatchStatement o) { |
| buildCounterDisjunctiveMatchStatement++; |
| if (buildCounterDisjunctiveMatchStatement < 3) { |
| checkUnnamed3820(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> buildUnnamed3821() { |
| var o = <api.DynamicTargetingKey>[]; |
| o.add(buildDynamicTargetingKey()); |
| o.add(buildDynamicTargetingKey()); |
| return o; |
| } |
| |
| void checkUnnamed3821(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 = buildUnnamed3821(); |
| o.kind = 'foo'; |
| } |
| buildCounterDynamicTargetingKeysListResponse--; |
| return o; |
| } |
| |
| void checkDynamicTargetingKeysListResponse( |
| api.DynamicTargetingKeysListResponse o) { |
| buildCounterDynamicTargetingKeysListResponse++; |
| if (buildCounterDynamicTargetingKeysListResponse < 3) { |
| checkUnnamed3821(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> buildUnnamed3822() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3822(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 = buildUnnamed3822(); |
| 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'), |
| ); |
| checkUnnamed3822(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> buildUnnamed3823() { |
| var o = <api.EventTag>[]; |
| o.add(buildEventTag()); |
| o.add(buildEventTag()); |
| return o; |
| } |
| |
| void checkUnnamed3823(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 = buildUnnamed3823(); |
| o.kind = 'foo'; |
| } |
| buildCounterEventTagsListResponse--; |
| return o; |
| } |
| |
| void checkEventTagsListResponse(api.EventTagsListResponse o) { |
| buildCounterEventTagsListResponse++; |
| if (buildCounterEventTagsListResponse < 3) { |
| checkUnnamed3823(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> buildUnnamed3824() { |
| var o = <api.File>[]; |
| o.add(buildFile()); |
| o.add(buildFile()); |
| return o; |
| } |
| |
| void checkUnnamed3824(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 = buildUnnamed3824(); |
| 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'), |
| ); |
| checkUnnamed3824(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> buildUnnamed3825() { |
| var o = <api.FloodlightActivity>[]; |
| o.add(buildFloodlightActivity()); |
| o.add(buildFloodlightActivity()); |
| return o; |
| } |
| |
| void checkUnnamed3825(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 = buildUnnamed3825(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterFloodlightActivitiesListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightActivitiesListResponse( |
| api.FloodlightActivitiesListResponse o) { |
| buildCounterFloodlightActivitiesListResponse++; |
| if (buildCounterFloodlightActivitiesListResponse < 3) { |
| checkUnnamed3825(o.floodlightActivities!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.nextPageToken!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightActivitiesListResponse--; |
| } |
| |
| core.List<api.FloodlightActivityDynamicTag> buildUnnamed3826() { |
| var o = <api.FloodlightActivityDynamicTag>[]; |
| o.add(buildFloodlightActivityDynamicTag()); |
| o.add(buildFloodlightActivityDynamicTag()); |
| return o; |
| } |
| |
| void checkUnnamed3826(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> buildUnnamed3827() { |
| var o = <api.FloodlightActivityPublisherDynamicTag>[]; |
| o.add(buildFloodlightActivityPublisherDynamicTag()); |
| o.add(buildFloodlightActivityPublisherDynamicTag()); |
| return o; |
| } |
| |
| void checkUnnamed3827(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> buildUnnamed3828() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3828(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 = buildUnnamed3826(); |
| 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 = buildUnnamed3827(); |
| o.secure = true; |
| o.sslCompliant = true; |
| o.sslRequired = true; |
| o.status = 'foo'; |
| o.subaccountId = 'foo'; |
| o.tagFormat = 'foo'; |
| o.tagString = 'foo'; |
| o.userDefinedVariableTypes = buildUnnamed3828(); |
| } |
| 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'), |
| ); |
| checkUnnamed3826(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'), |
| ); |
| checkUnnamed3827(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'), |
| ); |
| checkUnnamed3828(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> buildUnnamed3829() { |
| var o = <api.FloodlightActivityGroup>[]; |
| o.add(buildFloodlightActivityGroup()); |
| o.add(buildFloodlightActivityGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3829(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 = buildUnnamed3829(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterFloodlightActivityGroupsListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightActivityGroupsListResponse( |
| api.FloodlightActivityGroupsListResponse o) { |
| buildCounterFloodlightActivityGroupsListResponse++; |
| if (buildCounterFloodlightActivityGroupsListResponse < 3) { |
| checkUnnamed3829(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> buildUnnamed3830() { |
| var o = <api.ThirdPartyAuthenticationToken>[]; |
| o.add(buildThirdPartyAuthenticationToken()); |
| o.add(buildThirdPartyAuthenticationToken()); |
| return o; |
| } |
| |
| void checkUnnamed3830(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> buildUnnamed3831() { |
| var o = <api.UserDefinedVariableConfiguration>[]; |
| o.add(buildUserDefinedVariableConfiguration()); |
| o.add(buildUserDefinedVariableConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed3831(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 = buildUnnamed3830(); |
| o.userDefinedVariableConfigurations = buildUnnamed3831(); |
| } |
| 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); |
| checkUnnamed3830(o.thirdPartyAuthenticationTokens!); |
| checkUnnamed3831(o.userDefinedVariableConfigurations!); |
| } |
| buildCounterFloodlightConfiguration--; |
| } |
| |
| core.List<api.FloodlightConfiguration> buildUnnamed3832() { |
| var o = <api.FloodlightConfiguration>[]; |
| o.add(buildFloodlightConfiguration()); |
| o.add(buildFloodlightConfiguration()); |
| return o; |
| } |
| |
| void checkUnnamed3832(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 = buildUnnamed3832(); |
| o.kind = 'foo'; |
| } |
| buildCounterFloodlightConfigurationsListResponse--; |
| return o; |
| } |
| |
| void checkFloodlightConfigurationsListResponse( |
| api.FloodlightConfigurationsListResponse o) { |
| buildCounterFloodlightConfigurationsListResponse++; |
| if (buildCounterFloodlightConfigurationsListResponse < 3) { |
| checkUnnamed3832(o.floodlightConfigurations!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterFloodlightConfigurationsListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed3833() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3833(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> buildUnnamed3834() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3834(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> buildUnnamed3835() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3835(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 = buildUnnamed3833(); |
| o.dimensions = buildUnnamed3834(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3835(); |
| } |
| buildCounterFloodlightReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkFloodlightReportCompatibleFields( |
| api.FloodlightReportCompatibleFields o) { |
| buildCounterFloodlightReportCompatibleFields++; |
| if (buildCounterFloodlightReportCompatibleFields < 3) { |
| checkUnnamed3833(o.dimensionFilters!); |
| checkUnnamed3834(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3835(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> buildUnnamed3836() { |
| var o = <api.City>[]; |
| o.add(buildCity()); |
| o.add(buildCity()); |
| return o; |
| } |
| |
| void checkUnnamed3836(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> buildUnnamed3837() { |
| var o = <api.Country>[]; |
| o.add(buildCountry()); |
| o.add(buildCountry()); |
| return o; |
| } |
| |
| void checkUnnamed3837(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> buildUnnamed3838() { |
| var o = <api.Metro>[]; |
| o.add(buildMetro()); |
| o.add(buildMetro()); |
| return o; |
| } |
| |
| void checkUnnamed3838(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> buildUnnamed3839() { |
| var o = <api.PostalCode>[]; |
| o.add(buildPostalCode()); |
| o.add(buildPostalCode()); |
| return o; |
| } |
| |
| void checkUnnamed3839(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> buildUnnamed3840() { |
| var o = <api.Region>[]; |
| o.add(buildRegion()); |
| o.add(buildRegion()); |
| return o; |
| } |
| |
| void checkUnnamed3840(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 = buildUnnamed3836(); |
| o.countries = buildUnnamed3837(); |
| o.excludeCountries = true; |
| o.metros = buildUnnamed3838(); |
| o.postalCodes = buildUnnamed3839(); |
| o.regions = buildUnnamed3840(); |
| } |
| buildCounterGeoTargeting--; |
| return o; |
| } |
| |
| void checkGeoTargeting(api.GeoTargeting o) { |
| buildCounterGeoTargeting++; |
| if (buildCounterGeoTargeting < 3) { |
| checkUnnamed3836(o.cities!); |
| checkUnnamed3837(o.countries!); |
| unittest.expect(o.excludeCountries!, unittest.isTrue); |
| checkUnnamed3838(o.metros!); |
| checkUnnamed3839(o.postalCodes!); |
| checkUnnamed3840(o.regions!); |
| } |
| buildCounterGeoTargeting--; |
| } |
| |
| core.List<api.AdSlot> buildUnnamed3841() { |
| var o = <api.AdSlot>[]; |
| o.add(buildAdSlot()); |
| o.add(buildAdSlot()); |
| return o; |
| } |
| |
| void checkUnnamed3841(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 = buildUnnamed3841(); |
| 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'), |
| ); |
| checkUnnamed3841(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> buildUnnamed3842() { |
| var o = <api.InventoryItem>[]; |
| o.add(buildInventoryItem()); |
| o.add(buildInventoryItem()); |
| return o; |
| } |
| |
| void checkUnnamed3842(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 = buildUnnamed3842(); |
| o.kind = 'foo'; |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterInventoryItemsListResponse--; |
| return o; |
| } |
| |
| void checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { |
| buildCounterInventoryItemsListResponse++; |
| if (buildCounterInventoryItemsListResponse < 3) { |
| checkUnnamed3842(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> buildUnnamed3843() { |
| var o = <api.DeepLink>[]; |
| o.add(buildDeepLink()); |
| o.add(buildDeepLink()); |
| return o; |
| } |
| |
| void checkUnnamed3843(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 = buildUnnamed3843(); |
| 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); |
| checkUnnamed3843(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> buildUnnamed3844() { |
| var o = <api.Language>[]; |
| o.add(buildLanguage()); |
| o.add(buildLanguage()); |
| return o; |
| } |
| |
| void checkUnnamed3844(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 = buildUnnamed3844(); |
| } |
| buildCounterLanguageTargeting--; |
| return o; |
| } |
| |
| void checkLanguageTargeting(api.LanguageTargeting o) { |
| buildCounterLanguageTargeting++; |
| if (buildCounterLanguageTargeting < 3) { |
| checkUnnamed3844(o.languages!); |
| } |
| buildCounterLanguageTargeting--; |
| } |
| |
| core.List<api.Language> buildUnnamed3845() { |
| var o = <api.Language>[]; |
| o.add(buildLanguage()); |
| o.add(buildLanguage()); |
| return o; |
| } |
| |
| void checkUnnamed3845(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 = buildUnnamed3845(); |
| } |
| buildCounterLanguagesListResponse--; |
| return o; |
| } |
| |
| void checkLanguagesListResponse(api.LanguagesListResponse o) { |
| buildCounterLanguagesListResponse++; |
| if (buildCounterLanguagesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3845(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> buildUnnamed3846() { |
| var o = <api.ListPopulationTerm>[]; |
| o.add(buildListPopulationTerm()); |
| o.add(buildListPopulationTerm()); |
| return o; |
| } |
| |
| void checkUnnamed3846(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 = buildUnnamed3846(); |
| } |
| buildCounterListPopulationClause--; |
| return o; |
| } |
| |
| void checkListPopulationClause(api.ListPopulationClause o) { |
| buildCounterListPopulationClause++; |
| if (buildCounterListPopulationClause < 3) { |
| checkUnnamed3846(o.terms!); |
| } |
| buildCounterListPopulationClause--; |
| } |
| |
| core.List<api.ListPopulationClause> buildUnnamed3847() { |
| var o = <api.ListPopulationClause>[]; |
| o.add(buildListPopulationClause()); |
| o.add(buildListPopulationClause()); |
| return o; |
| } |
| |
| void checkUnnamed3847(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 = buildUnnamed3847(); |
| } |
| 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'), |
| ); |
| checkUnnamed3847(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 buildCounterMeasurementPartnerAdvertiserLink = 0; |
| api.MeasurementPartnerAdvertiserLink buildMeasurementPartnerAdvertiserLink() { |
| var o = api.MeasurementPartnerAdvertiserLink(); |
| buildCounterMeasurementPartnerAdvertiserLink++; |
| if (buildCounterMeasurementPartnerAdvertiserLink < 3) { |
| o.linkStatus = 'foo'; |
| o.measurementPartner = 'foo'; |
| o.partnerAdvertiserId = 'foo'; |
| } |
| buildCounterMeasurementPartnerAdvertiserLink--; |
| return o; |
| } |
| |
| void checkMeasurementPartnerAdvertiserLink( |
| api.MeasurementPartnerAdvertiserLink o) { |
| buildCounterMeasurementPartnerAdvertiserLink++; |
| if (buildCounterMeasurementPartnerAdvertiserLink < 3) { |
| unittest.expect( |
| o.linkStatus!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.measurementPartner!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.partnerAdvertiserId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMeasurementPartnerAdvertiserLink--; |
| } |
| |
| core.int buildCounterMeasurementPartnerCampaignLink = 0; |
| api.MeasurementPartnerCampaignLink buildMeasurementPartnerCampaignLink() { |
| var o = api.MeasurementPartnerCampaignLink(); |
| buildCounterMeasurementPartnerCampaignLink++; |
| if (buildCounterMeasurementPartnerCampaignLink < 3) { |
| o.linkStatus = 'foo'; |
| o.measurementPartner = 'foo'; |
| o.partnerCampaignId = 'foo'; |
| } |
| buildCounterMeasurementPartnerCampaignLink--; |
| return o; |
| } |
| |
| void checkMeasurementPartnerCampaignLink(api.MeasurementPartnerCampaignLink o) { |
| buildCounterMeasurementPartnerCampaignLink++; |
| if (buildCounterMeasurementPartnerCampaignLink < 3) { |
| unittest.expect( |
| o.linkStatus!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.measurementPartner!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.partnerCampaignId!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMeasurementPartnerCampaignLink--; |
| } |
| |
| core.int buildCounterMeasurementPartnerWrappingData = 0; |
| api.MeasurementPartnerWrappingData buildMeasurementPartnerWrappingData() { |
| var o = api.MeasurementPartnerWrappingData(); |
| buildCounterMeasurementPartnerWrappingData++; |
| if (buildCounterMeasurementPartnerWrappingData < 3) { |
| o.linkStatus = 'foo'; |
| o.measurementPartner = 'foo'; |
| o.tagWrappingMode = 'foo'; |
| o.wrappedTag = 'foo'; |
| } |
| buildCounterMeasurementPartnerWrappingData--; |
| return o; |
| } |
| |
| void checkMeasurementPartnerWrappingData(api.MeasurementPartnerWrappingData o) { |
| buildCounterMeasurementPartnerWrappingData++; |
| if (buildCounterMeasurementPartnerWrappingData < 3) { |
| unittest.expect( |
| o.linkStatus!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.measurementPartner!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.tagWrappingMode!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.wrappedTag!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterMeasurementPartnerWrappingData--; |
| } |
| |
| 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> buildUnnamed3848() { |
| var o = <api.Metro>[]; |
| o.add(buildMetro()); |
| o.add(buildMetro()); |
| return o; |
| } |
| |
| void checkUnnamed3848(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 = buildUnnamed3848(); |
| } |
| buildCounterMetrosListResponse--; |
| return o; |
| } |
| |
| void checkMetrosListResponse(api.MetrosListResponse o) { |
| buildCounterMetrosListResponse++; |
| if (buildCounterMetrosListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3848(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> buildUnnamed3849() { |
| var o = <api.MobileApp>[]; |
| o.add(buildMobileApp()); |
| o.add(buildMobileApp()); |
| return o; |
| } |
| |
| void checkUnnamed3849(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 = buildUnnamed3849(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterMobileAppsListResponse--; |
| return o; |
| } |
| |
| void checkMobileAppsListResponse(api.MobileAppsListResponse o) { |
| buildCounterMobileAppsListResponse++; |
| if (buildCounterMobileAppsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3849(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> buildUnnamed3850() { |
| var o = <api.MobileCarrier>[]; |
| o.add(buildMobileCarrier()); |
| o.add(buildMobileCarrier()); |
| return o; |
| } |
| |
| void checkUnnamed3850(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 = buildUnnamed3850(); |
| } |
| buildCounterMobileCarriersListResponse--; |
| return o; |
| } |
| |
| void checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { |
| buildCounterMobileCarriersListResponse++; |
| if (buildCounterMobileCarriersListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3850(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> buildUnnamed3851() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3851(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 = buildUnnamed3851(); |
| o.status = 'foo'; |
| } |
| buildCounterObjectFilter--; |
| return o; |
| } |
| |
| void checkObjectFilter(api.ObjectFilter o) { |
| buildCounterObjectFilter++; |
| if (buildCounterObjectFilter < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3851(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> buildUnnamed3852() { |
| var o = <api.OperatingSystemVersion>[]; |
| o.add(buildOperatingSystemVersion()); |
| o.add(buildOperatingSystemVersion()); |
| return o; |
| } |
| |
| void checkUnnamed3852(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 = buildUnnamed3852(); |
| } |
| buildCounterOperatingSystemVersionsListResponse--; |
| return o; |
| } |
| |
| void checkOperatingSystemVersionsListResponse( |
| api.OperatingSystemVersionsListResponse o) { |
| buildCounterOperatingSystemVersionsListResponse++; |
| if (buildCounterOperatingSystemVersionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3852(o.operatingSystemVersions!); |
| } |
| buildCounterOperatingSystemVersionsListResponse--; |
| } |
| |
| core.List<api.OperatingSystem> buildUnnamed3853() { |
| var o = <api.OperatingSystem>[]; |
| o.add(buildOperatingSystem()); |
| o.add(buildOperatingSystem()); |
| return o; |
| } |
| |
| void checkUnnamed3853(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 = buildUnnamed3853(); |
| } |
| buildCounterOperatingSystemsListResponse--; |
| return o; |
| } |
| |
| void checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { |
| buildCounterOperatingSystemsListResponse++; |
| if (buildCounterOperatingSystemsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3853(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> buildUnnamed3854() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3854(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> buildUnnamed3855() { |
| var o = <api.OrderContact>[]; |
| o.add(buildOrderContact()); |
| o.add(buildOrderContact()); |
| return o; |
| } |
| |
| void checkUnnamed3855(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> buildUnnamed3856() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3856(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> buildUnnamed3857() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3857(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 = buildUnnamed3854(); |
| o.buyerInvoiceId = 'foo'; |
| o.buyerOrganizationName = 'foo'; |
| o.comments = 'foo'; |
| o.contacts = buildUnnamed3855(); |
| 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 = buildUnnamed3856(); |
| o.siteNames = buildUnnamed3857(); |
| 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'), |
| ); |
| checkUnnamed3854(o.approverUserProfileIds!); |
| unittest.expect( |
| o.buyerInvoiceId!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.buyerOrganizationName!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.comments!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3855(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'), |
| ); |
| checkUnnamed3856(o.siteId!); |
| checkUnnamed3857(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> buildUnnamed3858() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3858(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> buildUnnamed3859() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3859(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 = buildUnnamed3858(); |
| o.cancelled = true; |
| o.createdInfo = buildLastModifiedInfo(); |
| o.effectiveDate = core.DateTime.parse('2002-02-27T14:01:02Z'); |
| o.id = 'foo'; |
| o.kind = 'foo'; |
| o.lastSentRecipients = buildUnnamed3859(); |
| 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'), |
| ); |
| checkUnnamed3858(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'), |
| ); |
| checkUnnamed3859(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> buildUnnamed3860() { |
| var o = <api.OrderDocument>[]; |
| o.add(buildOrderDocument()); |
| o.add(buildOrderDocument()); |
| return o; |
| } |
| |
| void checkUnnamed3860(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 = buildUnnamed3860(); |
| } |
| 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'), |
| ); |
| checkUnnamed3860(o.orderDocuments!); |
| } |
| buildCounterOrderDocumentsListResponse--; |
| } |
| |
| core.List<api.Order> buildUnnamed3861() { |
| var o = <api.Order>[]; |
| o.add(buildOrder()); |
| o.add(buildOrder()); |
| return o; |
| } |
| |
| void checkUnnamed3861(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 = buildUnnamed3861(); |
| } |
| 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'), |
| ); |
| checkUnnamed3861(o.orders!); |
| } |
| buildCounterOrdersListResponse--; |
| } |
| |
| core.List<api.EventFilter> buildUnnamed3862() { |
| var o = <api.EventFilter>[]; |
| o.add(buildEventFilter()); |
| o.add(buildEventFilter()); |
| return o; |
| } |
| |
| void checkUnnamed3862(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 = buildUnnamed3862(); |
| o.kind = 'foo'; |
| o.pathMatchPosition = 'foo'; |
| } |
| buildCounterPathFilter--; |
| return o; |
| } |
| |
| void checkPathFilter(api.PathFilter o) { |
| buildCounterPathFilter++; |
| if (buildCounterPathFilter < 3) { |
| checkUnnamed3862(o.eventFilters!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.pathMatchPosition!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterPathFilter--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed3863() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3863(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> buildUnnamed3864() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3864(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> buildUnnamed3865() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3865(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> buildUnnamed3866() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3866(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 = buildUnnamed3863(); |
| o.dimensions = buildUnnamed3864(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3865(); |
| o.pathFilters = buildUnnamed3866(); |
| } |
| buildCounterPathReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkPathReportCompatibleFields(api.PathReportCompatibleFields o) { |
| buildCounterPathReportCompatibleFields++; |
| if (buildCounterPathReportCompatibleFields < 3) { |
| checkUnnamed3863(o.channelGroupings!); |
| checkUnnamed3864(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3865(o.metrics!); |
| checkUnnamed3866(o.pathFilters!); |
| } |
| buildCounterPathReportCompatibleFields--; |
| } |
| |
| core.List<core.String> buildUnnamed3867() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3867(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> buildUnnamed3868() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3868(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 = buildUnnamed3867(); |
| o.kind = 'foo'; |
| o.matchType = 'foo'; |
| o.values = buildUnnamed3868(); |
| } |
| buildCounterPathReportDimensionValue--; |
| return o; |
| } |
| |
| void checkPathReportDimensionValue(api.PathReportDimensionValue o) { |
| buildCounterPathReportDimensionValue++; |
| if (buildCounterPathReportDimensionValue < 3) { |
| unittest.expect( |
| o.dimensionName!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3867(o.ids!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect( |
| o.matchType!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3868(o.values!); |
| } |
| buildCounterPathReportDimensionValue--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed3869() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3869(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> buildUnnamed3870() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3870(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> buildUnnamed3871() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3871(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> buildUnnamed3872() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3872(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 = buildUnnamed3869(); |
| o.customFloodlightVariables = buildUnnamed3870(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3871(); |
| o.perInteractionDimensions = buildUnnamed3872(); |
| } |
| buildCounterPathToConversionReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkPathToConversionReportCompatibleFields( |
| api.PathToConversionReportCompatibleFields o) { |
| buildCounterPathToConversionReportCompatibleFields++; |
| if (buildCounterPathToConversionReportCompatibleFields < 3) { |
| checkUnnamed3869(o.conversionDimensions!); |
| checkUnnamed3870(o.customFloodlightVariables!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3871(o.metrics!); |
| checkUnnamed3872(o.perInteractionDimensions!); |
| } |
| buildCounterPathToConversionReportCompatibleFields--; |
| } |
| |
| core.List<api.Size> buildUnnamed3873() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3873(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> buildUnnamed3874() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3874(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 = buildUnnamed3873(); |
| 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.partnerWrappingData = buildMeasurementPartnerWrappingData(); |
| 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 = buildUnnamed3874(); |
| o.tagSetting = buildTagSetting(); |
| o.videoActiveViewOptOut = true; |
| o.videoSettings = buildVideoSettings(); |
| o.vpaidAdapterChoice = 'foo'; |
| o.wrappingOptOut = true; |
| } |
| 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); |
| checkUnnamed3873(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'), |
| ); |
| checkMeasurementPartnerWrappingData( |
| o.partnerWrappingData! as api.MeasurementPartnerWrappingData); |
| 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'), |
| ); |
| checkUnnamed3874(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'), |
| ); |
| unittest.expect(o.wrappingOptOut!, unittest.isTrue); |
| } |
| 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> buildUnnamed3875() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3875(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 = buildUnnamed3875(); |
| 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); |
| checkUnnamed3875(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> buildUnnamed3876() { |
| var o = <api.PlacementGroup>[]; |
| o.add(buildPlacementGroup()); |
| o.add(buildPlacementGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3876(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 = buildUnnamed3876(); |
| } |
| 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'), |
| ); |
| checkUnnamed3876(o.placementGroups!); |
| } |
| buildCounterPlacementGroupsListResponse--; |
| } |
| |
| core.List<api.PlacementStrategy> buildUnnamed3877() { |
| var o = <api.PlacementStrategy>[]; |
| o.add(buildPlacementStrategy()); |
| o.add(buildPlacementStrategy()); |
| return o; |
| } |
| |
| void checkUnnamed3877(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 = buildUnnamed3877(); |
| } |
| 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'), |
| ); |
| checkUnnamed3877(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> buildUnnamed3878() { |
| var o = <api.TagData>[]; |
| o.add(buildTagData()); |
| o.add(buildTagData()); |
| return o; |
| } |
| |
| void checkUnnamed3878(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 = buildUnnamed3878(); |
| } |
| buildCounterPlacementTag--; |
| return o; |
| } |
| |
| void checkPlacementTag(api.PlacementTag o) { |
| buildCounterPlacementTag++; |
| if (buildCounterPlacementTag < 3) { |
| unittest.expect( |
| o.placementId!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3878(o.tagDatas!); |
| } |
| buildCounterPlacementTag--; |
| } |
| |
| core.List<api.PlacementTag> buildUnnamed3879() { |
| var o = <api.PlacementTag>[]; |
| o.add(buildPlacementTag()); |
| o.add(buildPlacementTag()); |
| return o; |
| } |
| |
| void checkUnnamed3879(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 = buildUnnamed3879(); |
| } |
| buildCounterPlacementsGenerateTagsResponse--; |
| return o; |
| } |
| |
| void checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { |
| buildCounterPlacementsGenerateTagsResponse++; |
| if (buildCounterPlacementsGenerateTagsResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3879(o.placementTags!); |
| } |
| buildCounterPlacementsGenerateTagsResponse--; |
| } |
| |
| core.List<api.Placement> buildUnnamed3880() { |
| var o = <api.Placement>[]; |
| o.add(buildPlacement()); |
| o.add(buildPlacement()); |
| return o; |
| } |
| |
| void checkUnnamed3880(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 = buildUnnamed3880(); |
| } |
| 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'), |
| ); |
| checkUnnamed3880(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> buildUnnamed3881() { |
| var o = <api.PlatformType>[]; |
| o.add(buildPlatformType()); |
| o.add(buildPlatformType()); |
| return o; |
| } |
| |
| void checkUnnamed3881(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 = buildUnnamed3881(); |
| } |
| buildCounterPlatformTypesListResponse--; |
| return o; |
| } |
| |
| void checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { |
| buildCounterPlatformTypesListResponse++; |
| if (buildCounterPlatformTypesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3881(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> buildUnnamed3882() { |
| var o = <api.PostalCode>[]; |
| o.add(buildPostalCode()); |
| o.add(buildPostalCode()); |
| return o; |
| } |
| |
| void checkUnnamed3882(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 = buildUnnamed3882(); |
| } |
| buildCounterPostalCodesListResponse--; |
| return o; |
| } |
| |
| void checkPostalCodesListResponse(api.PostalCodesListResponse o) { |
| buildCounterPostalCodesListResponse++; |
| if (buildCounterPostalCodesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3882(o.postalCodes!); |
| } |
| buildCounterPostalCodesListResponse--; |
| } |
| |
| core.List<api.Flight> buildUnnamed3883() { |
| var o = <api.Flight>[]; |
| o.add(buildFlight()); |
| o.add(buildFlight()); |
| return o; |
| } |
| |
| void checkUnnamed3883(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 = buildUnnamed3883(); |
| 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")), |
| ); |
| checkUnnamed3883(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> buildUnnamed3884() { |
| var o = <api.PricingSchedulePricingPeriod>[]; |
| o.add(buildPricingSchedulePricingPeriod()); |
| o.add(buildPricingSchedulePricingPeriod()); |
| return o; |
| } |
| |
| void checkUnnamed3884(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 = buildUnnamed3884(); |
| 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'), |
| ); |
| checkUnnamed3884(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> buildUnnamed3885() { |
| var o = <api.Project>[]; |
| o.add(buildProject()); |
| o.add(buildProject()); |
| return o; |
| } |
| |
| void checkUnnamed3885(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 = buildUnnamed3885(); |
| } |
| 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'), |
| ); |
| checkUnnamed3885(o.projects!); |
| } |
| buildCounterProjectsListResponse--; |
| } |
| |
| core.List<api.Dimension> buildUnnamed3886() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3886(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> buildUnnamed3887() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3887(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> buildUnnamed3888() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3888(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> buildUnnamed3889() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3889(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> buildUnnamed3890() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3890(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 = buildUnnamed3886(); |
| o.dimensions = buildUnnamed3887(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3888(); |
| o.pivotedActivityMetrics = buildUnnamed3889(); |
| o.reachByFrequencyMetrics = buildUnnamed3890(); |
| } |
| buildCounterReachReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { |
| buildCounterReachReportCompatibleFields++; |
| if (buildCounterReachReportCompatibleFields < 3) { |
| checkUnnamed3886(o.dimensionFilters!); |
| checkUnnamed3887(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3888(o.metrics!); |
| checkUnnamed3889(o.pivotedActivityMetrics!); |
| checkUnnamed3890(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> buildUnnamed3891() { |
| var o = <api.Region>[]; |
| o.add(buildRegion()); |
| o.add(buildRegion()); |
| return o; |
| } |
| |
| void checkUnnamed3891(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 = buildUnnamed3891(); |
| } |
| buildCounterRegionsListResponse--; |
| return o; |
| } |
| |
| void checkRegionsListResponse(api.RegionsListResponse o) { |
| buildCounterRegionsListResponse++; |
| if (buildCounterRegionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3891(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> buildUnnamed3892() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3892(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> buildUnnamed3893() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3893(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 = buildUnnamed3892(); |
| o.sharedAdvertiserIds = buildUnnamed3893(); |
| } |
| 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'), |
| ); |
| checkUnnamed3892(o.sharedAccountIds!); |
| checkUnnamed3893(o.sharedAdvertiserIds!); |
| } |
| buildCounterRemarketingListShare--; |
| } |
| |
| core.List<api.RemarketingList> buildUnnamed3894() { |
| var o = <api.RemarketingList>[]; |
| o.add(buildRemarketingList()); |
| o.add(buildRemarketingList()); |
| return o; |
| } |
| |
| void checkUnnamed3894(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 = buildUnnamed3894(); |
| } |
| 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'), |
| ); |
| checkUnnamed3894(o.remarketingLists!); |
| } |
| buildCounterRemarketingListsListResponse--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3895() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3895(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> buildUnnamed3896() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3896(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> buildUnnamed3897() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3897(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 = buildUnnamed3895(); |
| o.dimensions = buildUnnamed3896(); |
| o.metricNames = buildUnnamed3897(); |
| } |
| 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); |
| checkUnnamed3895(o.dimensionFilters!); |
| checkUnnamed3896(o.dimensions!); |
| checkUnnamed3897(o.metricNames!); |
| } |
| buildCounterReportCriteria--; |
| } |
| |
| core.List<api.SortedDimension> buildUnnamed3898() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3898(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> buildUnnamed3899() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3899(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> buildUnnamed3900() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3900(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> buildUnnamed3901() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3901(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 = buildUnnamed3898(); |
| o.dateRange = buildDateRange(); |
| o.dimension = 'foo'; |
| o.dimensionFilters = buildUnnamed3899(); |
| o.metricNames = buildUnnamed3900(); |
| o.overlapMetricNames = buildUnnamed3901(); |
| o.pivoted = true; |
| } |
| buildCounterReportCrossDimensionReachCriteria--; |
| return o; |
| } |
| |
| void checkReportCrossDimensionReachCriteria( |
| api.ReportCrossDimensionReachCriteria o) { |
| buildCounterReportCrossDimensionReachCriteria++; |
| if (buildCounterReportCrossDimensionReachCriteria < 3) { |
| checkUnnamed3898(o.breakdown!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| unittest.expect( |
| o.dimension!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3899(o.dimensionFilters!); |
| checkUnnamed3900(o.metricNames!); |
| checkUnnamed3901(o.overlapMetricNames!); |
| unittest.expect(o.pivoted!, unittest.isTrue); |
| } |
| buildCounterReportCrossDimensionReachCriteria--; |
| } |
| |
| core.List<api.Recipient> buildUnnamed3902() { |
| var o = <api.Recipient>[]; |
| o.add(buildRecipient()); |
| o.add(buildRecipient()); |
| return o; |
| } |
| |
| void checkUnnamed3902(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 = buildUnnamed3902(); |
| } |
| 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'), |
| ); |
| checkUnnamed3902(o.recipients!); |
| } |
| buildCounterReportDelivery--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3903() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3903(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> buildUnnamed3904() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3904(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> buildUnnamed3905() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3905(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> buildUnnamed3906() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3906(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 = buildUnnamed3903(); |
| o.dateRange = buildDateRange(); |
| o.dimensionFilters = buildUnnamed3904(); |
| o.dimensions = buildUnnamed3905(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed3906(); |
| o.reportProperties = buildReportFloodlightCriteriaReportProperties(); |
| } |
| buildCounterReportFloodlightCriteria--; |
| return o; |
| } |
| |
| void checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { |
| buildCounterReportFloodlightCriteria++; |
| if (buildCounterReportFloodlightCriteria < 3) { |
| checkUnnamed3903(o.customRichMediaEvents!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed3904(o.dimensionFilters!); |
| checkUnnamed3905(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed3906(o.metricNames!); |
| checkReportFloodlightCriteriaReportProperties( |
| o.reportProperties! as api.ReportFloodlightCriteriaReportProperties); |
| } |
| buildCounterReportFloodlightCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3907() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3907(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> buildUnnamed3908() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3908(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> buildUnnamed3909() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3909(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> buildUnnamed3910() { |
| var o = <api.PathFilter>[]; |
| o.add(buildPathFilter()); |
| o.add(buildPathFilter()); |
| return o; |
| } |
| |
| void checkUnnamed3910(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 = buildUnnamed3907(); |
| o.customChannelGrouping = buildChannelGrouping(); |
| o.dateRange = buildDateRange(); |
| o.dimensions = buildUnnamed3908(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed3909(); |
| o.pathFilters = buildUnnamed3910(); |
| } |
| buildCounterReportPathAttributionCriteria--; |
| return o; |
| } |
| |
| void checkReportPathAttributionCriteria(api.ReportPathAttributionCriteria o) { |
| buildCounterReportPathAttributionCriteria++; |
| if (buildCounterReportPathAttributionCriteria < 3) { |
| checkUnnamed3907(o.activityFilters!); |
| checkChannelGrouping(o.customChannelGrouping! as api.ChannelGrouping); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed3908(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed3909(o.metricNames!); |
| checkUnnamed3910(o.pathFilters!); |
| } |
| buildCounterReportPathAttributionCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3911() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3911(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> buildUnnamed3912() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3912(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> buildUnnamed3913() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3913(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> buildUnnamed3914() { |
| var o = <api.PathFilter>[]; |
| o.add(buildPathFilter()); |
| o.add(buildPathFilter()); |
| return o; |
| } |
| |
| void checkUnnamed3914(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 = buildUnnamed3911(); |
| o.customChannelGrouping = buildChannelGrouping(); |
| o.dateRange = buildDateRange(); |
| o.dimensions = buildUnnamed3912(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed3913(); |
| o.pathFilters = buildUnnamed3914(); |
| } |
| buildCounterReportPathCriteria--; |
| return o; |
| } |
| |
| void checkReportPathCriteria(api.ReportPathCriteria o) { |
| buildCounterReportPathCriteria++; |
| if (buildCounterReportPathCriteria < 3) { |
| checkUnnamed3911(o.activityFilters!); |
| checkChannelGrouping(o.customChannelGrouping! as api.ChannelGrouping); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkUnnamed3912(o.dimensions!); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed3913(o.metricNames!); |
| checkUnnamed3914(o.pathFilters!); |
| } |
| buildCounterReportPathCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3915() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3915(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> buildUnnamed3916() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3916(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> buildUnnamed3917() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3917(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> buildUnnamed3918() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3918(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> buildUnnamed3919() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3919(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> buildUnnamed3920() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3920(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 = buildUnnamed3915(); |
| o.conversionDimensions = buildUnnamed3916(); |
| o.customFloodlightVariables = buildUnnamed3917(); |
| o.customRichMediaEvents = buildUnnamed3918(); |
| o.dateRange = buildDateRange(); |
| o.floodlightConfigId = buildDimensionValue(); |
| o.metricNames = buildUnnamed3919(); |
| o.perInteractionDimensions = buildUnnamed3920(); |
| o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); |
| } |
| buildCounterReportPathToConversionCriteria--; |
| return o; |
| } |
| |
| void checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { |
| buildCounterReportPathToConversionCriteria++; |
| if (buildCounterReportPathToConversionCriteria < 3) { |
| checkUnnamed3915(o.activityFilters!); |
| checkUnnamed3916(o.conversionDimensions!); |
| checkUnnamed3917(o.customFloodlightVariables!); |
| checkUnnamed3918(o.customRichMediaEvents!); |
| checkDateRange(o.dateRange! as api.DateRange); |
| checkDimensionValue(o.floodlightConfigId! as api.DimensionValue); |
| checkUnnamed3919(o.metricNames!); |
| checkUnnamed3920(o.perInteractionDimensions!); |
| checkReportPathToConversionCriteriaReportProperties(o.reportProperties! |
| as api.ReportPathToConversionCriteriaReportProperties); |
| } |
| buildCounterReportPathToConversionCriteria--; |
| } |
| |
| core.List<api.DimensionValue> buildUnnamed3921() { |
| var o = <api.DimensionValue>[]; |
| o.add(buildDimensionValue()); |
| o.add(buildDimensionValue()); |
| return o; |
| } |
| |
| void checkUnnamed3921(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> buildUnnamed3922() { |
| var o = <api.SortedDimension>[]; |
| o.add(buildSortedDimension()); |
| o.add(buildSortedDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3922(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> buildUnnamed3923() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3923(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> buildUnnamed3924() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3924(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 = buildUnnamed3921(); |
| o.dimensions = buildUnnamed3922(); |
| o.enableAllDimensionCombinations = true; |
| o.metricNames = buildUnnamed3923(); |
| o.reachByFrequencyMetricNames = buildUnnamed3924(); |
| } |
| 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); |
| checkUnnamed3921(o.dimensionFilters!); |
| checkUnnamed3922(o.dimensions!); |
| unittest.expect(o.enableAllDimensionCombinations!, unittest.isTrue); |
| checkUnnamed3923(o.metricNames!); |
| checkUnnamed3924(o.reachByFrequencyMetricNames!); |
| } |
| buildCounterReportReachCriteria--; |
| } |
| |
| core.List<core.String> buildUnnamed3925() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3925(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 = buildUnnamed3925(); |
| 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'), |
| ); |
| checkUnnamed3925(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> buildUnnamed3926() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3926(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> buildUnnamed3927() { |
| var o = <api.Dimension>[]; |
| o.add(buildDimension()); |
| o.add(buildDimension()); |
| return o; |
| } |
| |
| void checkUnnamed3927(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> buildUnnamed3928() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3928(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> buildUnnamed3929() { |
| var o = <api.Metric>[]; |
| o.add(buildMetric()); |
| o.add(buildMetric()); |
| return o; |
| } |
| |
| void checkUnnamed3929(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 = buildUnnamed3926(); |
| o.dimensions = buildUnnamed3927(); |
| o.kind = 'foo'; |
| o.metrics = buildUnnamed3928(); |
| o.pivotedActivityMetrics = buildUnnamed3929(); |
| } |
| buildCounterReportCompatibleFields--; |
| return o; |
| } |
| |
| void checkReportCompatibleFields(api.ReportCompatibleFields o) { |
| buildCounterReportCompatibleFields++; |
| if (buildCounterReportCompatibleFields < 3) { |
| checkUnnamed3926(o.dimensionFilters!); |
| checkUnnamed3927(o.dimensions!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3928(o.metrics!); |
| checkUnnamed3929(o.pivotedActivityMetrics!); |
| } |
| buildCounterReportCompatibleFields--; |
| } |
| |
| core.List<api.Report> buildUnnamed3930() { |
| var o = <api.Report>[]; |
| o.add(buildReport()); |
| o.add(buildReport()); |
| return o; |
| } |
| |
| void checkUnnamed3930(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 = buildUnnamed3930(); |
| 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'), |
| ); |
| checkUnnamed3930(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> buildUnnamed3931() { |
| var o = <api.SiteContact>[]; |
| o.add(buildSiteContact()); |
| o.add(buildSiteContact()); |
| return o; |
| } |
| |
| void checkUnnamed3931(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 = buildUnnamed3931(); |
| 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'), |
| ); |
| checkUnnamed3931(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> buildUnnamed3932() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3932(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 = buildUnnamed3932(); |
| o.imageOnly = true; |
| o.kind = 'foo'; |
| } |
| buildCounterSiteCompanionSetting--; |
| return o; |
| } |
| |
| void checkSiteCompanionSetting(api.SiteCompanionSetting o) { |
| buildCounterSiteCompanionSetting++; |
| if (buildCounterSiteCompanionSetting < 3) { |
| unittest.expect(o.companionsDisabled!, unittest.isTrue); |
| checkUnnamed3932(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> buildUnnamed3933() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed3933(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 = buildUnnamed3933(); |
| o.kind = 'foo'; |
| } |
| buildCounterSiteTranscodeSetting--; |
| return o; |
| } |
| |
| void checkSiteTranscodeSetting(api.SiteTranscodeSetting o) { |
| buildCounterSiteTranscodeSetting++; |
| if (buildCounterSiteTranscodeSetting < 3) { |
| checkUnnamed3933(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> buildUnnamed3934() { |
| var o = <api.Site>[]; |
| o.add(buildSite()); |
| o.add(buildSite()); |
| return o; |
| } |
| |
| void checkUnnamed3934(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 = buildUnnamed3934(); |
| } |
| 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'), |
| ); |
| checkUnnamed3934(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> buildUnnamed3935() { |
| var o = <api.Size>[]; |
| o.add(buildSize()); |
| o.add(buildSize()); |
| return o; |
| } |
| |
| void checkUnnamed3935(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 = buildUnnamed3935(); |
| } |
| buildCounterSizesListResponse--; |
| return o; |
| } |
| |
| void checkSizesListResponse(api.SizesListResponse o) { |
| buildCounterSizesListResponse++; |
| if (buildCounterSizesListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3935(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> buildUnnamed3936() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3936(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 = buildUnnamed3936(); |
| 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'), |
| ); |
| checkUnnamed3936(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> buildUnnamed3937() { |
| var o = <api.Subaccount>[]; |
| o.add(buildSubaccount()); |
| o.add(buildSubaccount()); |
| return o; |
| } |
| |
| void checkUnnamed3937(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 = buildUnnamed3937(); |
| } |
| 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'), |
| ); |
| checkUnnamed3937(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> buildUnnamed3938() { |
| var o = <api.TargetableRemarketingList>[]; |
| o.add(buildTargetableRemarketingList()); |
| o.add(buildTargetableRemarketingList()); |
| return o; |
| } |
| |
| void checkUnnamed3938(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 = buildUnnamed3938(); |
| } |
| 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'), |
| ); |
| checkUnnamed3938(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> buildUnnamed3939() { |
| var o = <api.TargetingTemplate>[]; |
| o.add(buildTargetingTemplate()); |
| o.add(buildTargetingTemplate()); |
| return o; |
| } |
| |
| void checkUnnamed3939(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 = buildUnnamed3939(); |
| } |
| 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'), |
| ); |
| checkUnnamed3939(o.targetingTemplates!); |
| } |
| buildCounterTargetingTemplatesListResponse--; |
| } |
| |
| core.List<api.Browser> buildUnnamed3940() { |
| var o = <api.Browser>[]; |
| o.add(buildBrowser()); |
| o.add(buildBrowser()); |
| return o; |
| } |
| |
| void checkUnnamed3940(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> buildUnnamed3941() { |
| var o = <api.ConnectionType>[]; |
| o.add(buildConnectionType()); |
| o.add(buildConnectionType()); |
| return o; |
| } |
| |
| void checkUnnamed3941(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> buildUnnamed3942() { |
| var o = <api.MobileCarrier>[]; |
| o.add(buildMobileCarrier()); |
| o.add(buildMobileCarrier()); |
| return o; |
| } |
| |
| void checkUnnamed3942(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> buildUnnamed3943() { |
| var o = <api.OperatingSystemVersion>[]; |
| o.add(buildOperatingSystemVersion()); |
| o.add(buildOperatingSystemVersion()); |
| return o; |
| } |
| |
| void checkUnnamed3943(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> buildUnnamed3944() { |
| var o = <api.OperatingSystem>[]; |
| o.add(buildOperatingSystem()); |
| o.add(buildOperatingSystem()); |
| return o; |
| } |
| |
| void checkUnnamed3944(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> buildUnnamed3945() { |
| var o = <api.PlatformType>[]; |
| o.add(buildPlatformType()); |
| o.add(buildPlatformType()); |
| return o; |
| } |
| |
| void checkUnnamed3945(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 = buildUnnamed3940(); |
| o.connectionTypes = buildUnnamed3941(); |
| o.mobileCarriers = buildUnnamed3942(); |
| o.operatingSystemVersions = buildUnnamed3943(); |
| o.operatingSystems = buildUnnamed3944(); |
| o.platformTypes = buildUnnamed3945(); |
| } |
| buildCounterTechnologyTargeting--; |
| return o; |
| } |
| |
| void checkTechnologyTargeting(api.TechnologyTargeting o) { |
| buildCounterTechnologyTargeting++; |
| if (buildCounterTechnologyTargeting < 3) { |
| checkUnnamed3940(o.browsers!); |
| checkUnnamed3941(o.connectionTypes!); |
| checkUnnamed3942(o.mobileCarriers!); |
| checkUnnamed3943(o.operatingSystemVersions!); |
| checkUnnamed3944(o.operatingSystems!); |
| checkUnnamed3945(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> buildUnnamed3946() { |
| var o = <core.int>[]; |
| o.add(42); |
| o.add(42); |
| return o; |
| } |
| |
| void checkUnnamed3946(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 = buildUnnamed3946(); |
| o.kind = 'foo'; |
| } |
| buildCounterTranscodeSetting--; |
| return o; |
| } |
| |
| void checkTranscodeSetting(api.TranscodeSetting o) { |
| buildCounterTranscodeSetting++; |
| if (buildCounterTranscodeSetting < 3) { |
| checkUnnamed3946(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> buildUnnamed3947() { |
| var o = <api.UserProfile>[]; |
| o.add(buildUserProfile()); |
| o.add(buildUserProfile()); |
| return o; |
| } |
| |
| void checkUnnamed3947(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 = buildUnnamed3947(); |
| o.kind = 'foo'; |
| } |
| buildCounterUserProfileList--; |
| return o; |
| } |
| |
| void checkUserProfileList(api.UserProfileList o) { |
| buildCounterUserProfileList++; |
| if (buildCounterUserProfileList < 3) { |
| unittest.expect( |
| o.etag!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3947(o.items!); |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| } |
| buildCounterUserProfileList--; |
| } |
| |
| core.List<api.UserRolePermission> buildUnnamed3948() { |
| var o = <api.UserRolePermission>[]; |
| o.add(buildUserRolePermission()); |
| o.add(buildUserRolePermission()); |
| return o; |
| } |
| |
| void checkUnnamed3948(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 = buildUnnamed3948(); |
| 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'), |
| ); |
| checkUnnamed3948(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> buildUnnamed3949() { |
| var o = <api.UserRolePermissionGroup>[]; |
| o.add(buildUserRolePermissionGroup()); |
| o.add(buildUserRolePermissionGroup()); |
| return o; |
| } |
| |
| void checkUnnamed3949(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 = buildUnnamed3949(); |
| } |
| buildCounterUserRolePermissionGroupsListResponse--; |
| return o; |
| } |
| |
| void checkUserRolePermissionGroupsListResponse( |
| api.UserRolePermissionGroupsListResponse o) { |
| buildCounterUserRolePermissionGroupsListResponse++; |
| if (buildCounterUserRolePermissionGroupsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3949(o.userRolePermissionGroups!); |
| } |
| buildCounterUserRolePermissionGroupsListResponse--; |
| } |
| |
| core.List<api.UserRolePermission> buildUnnamed3950() { |
| var o = <api.UserRolePermission>[]; |
| o.add(buildUserRolePermission()); |
| o.add(buildUserRolePermission()); |
| return o; |
| } |
| |
| void checkUnnamed3950(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 = buildUnnamed3950(); |
| } |
| buildCounterUserRolePermissionsListResponse--; |
| return o; |
| } |
| |
| void checkUserRolePermissionsListResponse( |
| api.UserRolePermissionsListResponse o) { |
| buildCounterUserRolePermissionsListResponse++; |
| if (buildCounterUserRolePermissionsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3950(o.userRolePermissions!); |
| } |
| buildCounterUserRolePermissionsListResponse--; |
| } |
| |
| core.List<api.UserRole> buildUnnamed3951() { |
| var o = <api.UserRole>[]; |
| o.add(buildUserRole()); |
| o.add(buildUserRole()); |
| return o; |
| } |
| |
| void checkUnnamed3951(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 = buildUnnamed3951(); |
| } |
| 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'), |
| ); |
| checkUnnamed3951(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> buildUnnamed3952() { |
| var o = <api.VideoFormat>[]; |
| o.add(buildVideoFormat()); |
| o.add(buildVideoFormat()); |
| return o; |
| } |
| |
| void checkUnnamed3952(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 = buildUnnamed3952(); |
| } |
| buildCounterVideoFormatsListResponse--; |
| return o; |
| } |
| |
| void checkVideoFormatsListResponse(api.VideoFormatsListResponse o) { |
| buildCounterVideoFormatsListResponse++; |
| if (buildCounterVideoFormatsListResponse < 3) { |
| unittest.expect( |
| o.kind!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed3952(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.durationSeconds = 42; |
| 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.durationSeconds!, |
| unittest.equals(42), |
| ); |
| 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> buildUnnamed3953() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3953(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> buildUnnamed3954() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3954(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> buildUnnamed3955() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3955(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> buildUnnamed3956() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3956(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> buildUnnamed3957() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3957(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> buildUnnamed3958() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3958(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> buildUnnamed3959() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3959(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> buildUnnamed3960() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3960(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> buildUnnamed3961() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3961(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> buildUnnamed3962() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3962(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> buildUnnamed3963() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3963(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> buildUnnamed3964() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3964(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> buildUnnamed3965() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3965(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> buildUnnamed3966() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3966(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> buildUnnamed3967() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3967(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> buildUnnamed3968() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3968(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> buildUnnamed3969() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3969(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> buildUnnamed3970() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3970(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> buildUnnamed3971() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3971(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> buildUnnamed3972() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3972(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> buildUnnamed3973() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3973(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> buildUnnamed3974() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3974(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> buildUnnamed3975() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3975(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> buildUnnamed3976() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3976(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> buildUnnamed3977() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3977(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> buildUnnamed3978() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3978(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> buildUnnamed3979() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3979(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> buildUnnamed3980() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3980(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> buildUnnamed3981() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3981(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> buildUnnamed3982() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3982(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> buildUnnamed3983() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3983(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> buildUnnamed3984() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3984(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> buildUnnamed3985() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3985(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> buildUnnamed3986() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3986(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> buildUnnamed3987() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3987(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> buildUnnamed3988() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3988(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> buildUnnamed3989() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3989(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> buildUnnamed3990() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3990(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> buildUnnamed3991() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3991(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> buildUnnamed3992() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3992(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> buildUnnamed3993() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3993(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> buildUnnamed3994() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3994(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> buildUnnamed3995() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3995(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> buildUnnamed3996() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3996(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> buildUnnamed3997() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3997(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> buildUnnamed3998() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3998(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> buildUnnamed3999() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed3999(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> buildUnnamed4000() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4000(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> buildUnnamed4001() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4001(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> buildUnnamed4002() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4002(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> buildUnnamed4003() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4003(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> buildUnnamed4004() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4004(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> buildUnnamed4005() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4005(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> buildUnnamed4006() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4006(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> buildUnnamed4007() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4007(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> buildUnnamed4008() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4008(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> buildUnnamed4009() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4009(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> buildUnnamed4010() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4010(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> buildUnnamed4011() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4011(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> buildUnnamed4012() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4012(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> buildUnnamed4013() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4013(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> buildUnnamed4014() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4014(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> buildUnnamed4015() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4015(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> buildUnnamed4016() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4016(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> buildUnnamed4017() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4017(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> buildUnnamed4018() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4018(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> buildUnnamed4019() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4019(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> buildUnnamed4020() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4020(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> buildUnnamed4021() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4021(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> buildUnnamed4022() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4022(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> buildUnnamed4023() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4023(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> buildUnnamed4024() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4024(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> buildUnnamed4025() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4025(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> buildUnnamed4026() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4026(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> buildUnnamed4027() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4027(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> buildUnnamed4028() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4028(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> buildUnnamed4029() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4029(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> buildUnnamed4030() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4030(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> buildUnnamed4031() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4031(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> buildUnnamed4032() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4032(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> buildUnnamed4033() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4033(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> buildUnnamed4034() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4034(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> buildUnnamed4035() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4035(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> buildUnnamed4036() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4036(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> buildUnnamed4037() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4037(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> buildUnnamed4038() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4038(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> buildUnnamed4039() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4039(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> buildUnnamed4040() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4040(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> buildUnnamed4041() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4041(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> buildUnnamed4042() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4042(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> buildUnnamed4043() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed4043(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-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-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-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-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-MeasurementPartnerAdvertiserLink', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMeasurementPartnerAdvertiserLink(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MeasurementPartnerAdvertiserLink.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMeasurementPartnerAdvertiserLink( |
| od as api.MeasurementPartnerAdvertiserLink); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MeasurementPartnerCampaignLink', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMeasurementPartnerCampaignLink(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MeasurementPartnerCampaignLink.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMeasurementPartnerCampaignLink( |
| od as api.MeasurementPartnerCampaignLink); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MeasurementPartnerWrappingData', () { |
| unittest.test('to-json--from-json', () async { |
| var o = buildMeasurementPartnerWrappingData(); |
| var oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| var od = api.MeasurementPartnerWrappingData.fromJson( |
| oJson as core.Map<core.String, core.dynamic>); |
| checkMeasurementPartnerWrappingData( |
| od as api.MeasurementPartnerWrappingData); |
| }); |
| }); |
| |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3953(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3954(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3955(); |
| var arg_campaignIds = buildUnnamed3956(); |
| var arg_compatibility = 'foo'; |
| var arg_creativeIds = buildUnnamed3957(); |
| var arg_creativeOptimizationConfigurationIds = buildUnnamed3958(); |
| var arg_dynamicClickTracker = true; |
| var arg_ids = buildUnnamed3959(); |
| var arg_landingPageIds = buildUnnamed3960(); |
| var arg_maxResults = 42; |
| var arg_overriddenEventTagId = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_placementIds = buildUnnamed3961(); |
| var arg_remarketingListIds = buildUnnamed3962(); |
| var arg_searchString = 'foo'; |
| var arg_sizeIds = buildUnnamed3963(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_sslCompliant = true; |
| var arg_sslRequired = true; |
| var arg_type = buildUnnamed3964(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3965(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3966(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed3967(); |
| var arg_ids = buildUnnamed3968(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3969(); |
| var arg_floodlightConfigurationIds = buildUnnamed3970(); |
| var arg_ids = buildUnnamed3971(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3972(); |
| var arg_advertiserIds = buildUnnamed3973(); |
| var arg_archived = true; |
| var arg_atLeastOneOptimizationActivity = true; |
| var arg_excludedIds = buildUnnamed3974(); |
| var arg_ids = buildUnnamed3975(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3976(); |
| var arg_maxChangeTime = 'foo'; |
| var arg_maxResults = 42; |
| var arg_minChangeTime = 'foo'; |
| var arg_objectIds = buildUnnamed3977(); |
| var arg_objectType = 'foo'; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_userProfileIds = buildUnnamed3978(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3979(); |
| var arg_dartIds = buildUnnamed3980(); |
| var arg_namePrefix = 'foo'; |
| var arg_regionDartIds = buildUnnamed3981(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3982(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3983(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3984(); |
| var arg_ids = buildUnnamed3985(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3986(); |
| var arg_groupNumber = 42; |
| var arg_ids = buildUnnamed3987(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3988(); |
| var arg_creativeFieldIds = buildUnnamed3989(); |
| var arg_ids = buildUnnamed3990(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_renderingIds = buildUnnamed3991(); |
| var arg_searchString = 'foo'; |
| var arg_sizeIds = buildUnnamed3992(); |
| var arg_sortField = 'foo'; |
| var arg_sortOrder = 'foo'; |
| var arg_studioCreativeId = 'foo'; |
| var arg_types = buildUnnamed3993(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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-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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3994(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3995(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3996(); |
| var arg_ids = buildUnnamed3997(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 26), |
| unittest.equals("dfareporting/v3.5/reports/"), |
| ); |
| pathOffset += 26; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed3998(); |
| var arg_floodlightActivityGroupName = 'foo'; |
| var arg_floodlightActivityGroupTagString = 'foo'; |
| var arg_floodlightActivityGroupType = 'foo'; |
| var arg_floodlightConfigurationId = 'foo'; |
| var arg_ids = buildUnnamed3999(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4000(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4001(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4002(); |
| var arg_inPlan = true; |
| var arg_maxResults = 42; |
| var arg_orderId = buildUnnamed4003(); |
| var arg_pageToken = 'foo'; |
| var arg_siteId = buildUnnamed4004(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4005(); |
| var arg_ids = buildUnnamed4006(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4007(); |
| var arg_maxResults = 42; |
| var arg_orderId = buildUnnamed4008(); |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_siteId = buildUnnamed4009(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4010(); |
| var arg_maxResults = 42; |
| var arg_pageToken = 'foo'; |
| var arg_searchString = 'foo'; |
| var arg_siteId = buildUnnamed4011(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4012(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed4013(); |
| var arg_contentCategoryIds = buildUnnamed4014(); |
| var arg_directorySiteIds = buildUnnamed4015(); |
| var arg_ids = buildUnnamed4016(); |
| 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 = buildUnnamed4017(); |
| var arg_pricingTypes = buildUnnamed4018(); |
| var arg_searchString = 'foo'; |
| var arg_siteIds = buildUnnamed4019(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4020(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4021(); |
| var arg_tagFormats = buildUnnamed4022(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4023(); |
| var arg_archived = true; |
| var arg_campaignIds = buildUnnamed4024(); |
| var arg_compatibilities = buildUnnamed4025(); |
| var arg_contentCategoryIds = buildUnnamed4026(); |
| var arg_directorySiteIds = buildUnnamed4027(); |
| var arg_groupIds = buildUnnamed4028(); |
| var arg_ids = buildUnnamed4029(); |
| 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 = buildUnnamed4030(); |
| var arg_pricingTypes = buildUnnamed4031(); |
| var arg_searchString = 'foo'; |
| var arg_siteIds = buildUnnamed4032(); |
| var arg_sizeIds = buildUnnamed4033(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4034(); |
| var arg_ids = buildUnnamed4035(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4036(); |
| var arg_directorySiteIds = buildUnnamed4037(); |
| var arg_ids = buildUnnamed4038(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4039(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4040(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4041(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 30), |
| unittest.equals("dfareporting/v3.5/userprofiles"), |
| ); |
| pathOffset += 30; |
| |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4042(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 = buildUnnamed4043(); |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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 + 31), |
| unittest.equals("dfareporting/v3.5/userprofiles/"), |
| ); |
| pathOffset += 31; |
| 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); |
| }); |
| }); |
| } |