Index: generated/googleapis/test/content/v2.dart |
diff --git a/generated/googleapis/test/content/v2.dart b/generated/googleapis/test/content/v2.dart |
deleted file mode 100644 |
index 1a2447a4ac3c0f693b84f7f9172ad2603ce97e8e..0000000000000000000000000000000000000000 |
--- a/generated/googleapis/test/content/v2.dart |
+++ /dev/null |
@@ -1,4450 +0,0 @@ |
-library googleapis.content.v2.test; |
- |
-import "dart:core" as core; |
-import "dart:collection" as collection; |
-import "dart:async" as async; |
-import "dart:convert" as convert; |
- |
-import 'package:http/http.dart' as http; |
-import 'package:http/testing.dart' as http_testing; |
-import 'package:unittest/unittest.dart' as unittest; |
-import 'package:googleapis/common/common.dart' as common; |
-import 'package:googleapis/src/common_internal.dart' as common_internal; |
-import '../common/common_internal_test.dart' as common_test; |
- |
-import 'package:googleapis/content/v2.dart' as api; |
- |
- |
- |
-buildUnnamed299() { |
- var o = new core.List<api.AccountAdwordsLink>(); |
- o.add(buildAccountAdwordsLink()); |
- o.add(buildAccountAdwordsLink()); |
- return o; |
-} |
- |
-checkUnnamed299(core.List<api.AccountAdwordsLink> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountAdwordsLink(o[0]); |
- checkAccountAdwordsLink(o[1]); |
-} |
- |
-buildUnnamed300() { |
- var o = new core.List<api.AccountUser>(); |
- o.add(buildAccountUser()); |
- o.add(buildAccountUser()); |
- return o; |
-} |
- |
-checkUnnamed300(core.List<api.AccountUser> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountUser(o[0]); |
- checkAccountUser(o[1]); |
-} |
- |
-core.int buildCounterAccount = 0; |
-buildAccount() { |
- var o = new api.Account(); |
- buildCounterAccount++; |
- if (buildCounterAccount < 3) { |
- o.adultContent = true; |
- o.adwordsLinks = buildUnnamed299(); |
- o.id = "foo"; |
- o.kind = "foo"; |
- o.name = "foo"; |
- o.reviewsUrl = "foo"; |
- o.sellerId = "foo"; |
- o.users = buildUnnamed300(); |
- o.websiteUrl = "foo"; |
- } |
- buildCounterAccount--; |
- return o; |
-} |
- |
-checkAccount(api.Account o) { |
- buildCounterAccount++; |
- if (buildCounterAccount < 3) { |
- unittest.expect(o.adultContent, unittest.isTrue); |
- checkUnnamed299(o.adwordsLinks); |
- unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.reviewsUrl, unittest.equals('foo')); |
- unittest.expect(o.sellerId, unittest.equals('foo')); |
- checkUnnamed300(o.users); |
- unittest.expect(o.websiteUrl, unittest.equals('foo')); |
- } |
- buildCounterAccount--; |
-} |
- |
-core.int buildCounterAccountAdwordsLink = 0; |
-buildAccountAdwordsLink() { |
- var o = new api.AccountAdwordsLink(); |
- buildCounterAccountAdwordsLink++; |
- if (buildCounterAccountAdwordsLink < 3) { |
- o.adwordsId = "foo"; |
- o.status = "foo"; |
- } |
- buildCounterAccountAdwordsLink--; |
- return o; |
-} |
- |
-checkAccountAdwordsLink(api.AccountAdwordsLink o) { |
- buildCounterAccountAdwordsLink++; |
- if (buildCounterAccountAdwordsLink < 3) { |
- unittest.expect(o.adwordsId, unittest.equals('foo')); |
- unittest.expect(o.status, unittest.equals('foo')); |
- } |
- buildCounterAccountAdwordsLink--; |
-} |
- |
-buildUnnamed301() { |
- var o = new core.List<api.AccountStatusDataQualityIssue>(); |
- o.add(buildAccountStatusDataQualityIssue()); |
- o.add(buildAccountStatusDataQualityIssue()); |
- return o; |
-} |
- |
-checkUnnamed301(core.List<api.AccountStatusDataQualityIssue> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountStatusDataQualityIssue(o[0]); |
- checkAccountStatusDataQualityIssue(o[1]); |
-} |
- |
-core.int buildCounterAccountStatus = 0; |
-buildAccountStatus() { |
- var o = new api.AccountStatus(); |
- buildCounterAccountStatus++; |
- if (buildCounterAccountStatus < 3) { |
- o.accountId = "foo"; |
- o.dataQualityIssues = buildUnnamed301(); |
- o.kind = "foo"; |
- } |
- buildCounterAccountStatus--; |
- return o; |
-} |
- |
-checkAccountStatus(api.AccountStatus o) { |
- buildCounterAccountStatus++; |
- if (buildCounterAccountStatus < 3) { |
- unittest.expect(o.accountId, unittest.equals('foo')); |
- checkUnnamed301(o.dataQualityIssues); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterAccountStatus--; |
-} |
- |
-buildUnnamed302() { |
- var o = new core.List<api.AccountStatusExampleItem>(); |
- o.add(buildAccountStatusExampleItem()); |
- o.add(buildAccountStatusExampleItem()); |
- return o; |
-} |
- |
-checkUnnamed302(core.List<api.AccountStatusExampleItem> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountStatusExampleItem(o[0]); |
- checkAccountStatusExampleItem(o[1]); |
-} |
- |
-core.int buildCounterAccountStatusDataQualityIssue = 0; |
-buildAccountStatusDataQualityIssue() { |
- var o = new api.AccountStatusDataQualityIssue(); |
- buildCounterAccountStatusDataQualityIssue++; |
- if (buildCounterAccountStatusDataQualityIssue < 3) { |
- o.country = "foo"; |
- o.displayedValue = "foo"; |
- o.exampleItems = buildUnnamed302(); |
- o.id = "foo"; |
- o.lastChecked = "foo"; |
- o.numItems = 42; |
- o.severity = "foo"; |
- o.submittedValue = "foo"; |
- } |
- buildCounterAccountStatusDataQualityIssue--; |
- return o; |
-} |
- |
-checkAccountStatusDataQualityIssue(api.AccountStatusDataQualityIssue o) { |
- buildCounterAccountStatusDataQualityIssue++; |
- if (buildCounterAccountStatusDataQualityIssue < 3) { |
- unittest.expect(o.country, unittest.equals('foo')); |
- unittest.expect(o.displayedValue, unittest.equals('foo')); |
- checkUnnamed302(o.exampleItems); |
- unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.lastChecked, unittest.equals('foo')); |
- unittest.expect(o.numItems, unittest.equals(42)); |
- unittest.expect(o.severity, unittest.equals('foo')); |
- unittest.expect(o.submittedValue, unittest.equals('foo')); |
- } |
- buildCounterAccountStatusDataQualityIssue--; |
-} |
- |
-core.int buildCounterAccountStatusExampleItem = 0; |
-buildAccountStatusExampleItem() { |
- var o = new api.AccountStatusExampleItem(); |
- buildCounterAccountStatusExampleItem++; |
- if (buildCounterAccountStatusExampleItem < 3) { |
- o.itemId = "foo"; |
- o.link = "foo"; |
- o.submittedValue = "foo"; |
- o.title = "foo"; |
- o.valueOnLandingPage = "foo"; |
- } |
- buildCounterAccountStatusExampleItem--; |
- return o; |
-} |
- |
-checkAccountStatusExampleItem(api.AccountStatusExampleItem o) { |
- buildCounterAccountStatusExampleItem++; |
- if (buildCounterAccountStatusExampleItem < 3) { |
- unittest.expect(o.itemId, unittest.equals('foo')); |
- unittest.expect(o.link, unittest.equals('foo')); |
- unittest.expect(o.submittedValue, unittest.equals('foo')); |
- unittest.expect(o.title, unittest.equals('foo')); |
- unittest.expect(o.valueOnLandingPage, unittest.equals('foo')); |
- } |
- buildCounterAccountStatusExampleItem--; |
-} |
- |
-core.int buildCounterAccountUser = 0; |
-buildAccountUser() { |
- var o = new api.AccountUser(); |
- buildCounterAccountUser++; |
- if (buildCounterAccountUser < 3) { |
- o.admin = true; |
- o.emailAddress = "foo"; |
- } |
- buildCounterAccountUser--; |
- return o; |
-} |
- |
-checkAccountUser(api.AccountUser o) { |
- buildCounterAccountUser++; |
- if (buildCounterAccountUser < 3) { |
- unittest.expect(o.admin, unittest.isTrue); |
- unittest.expect(o.emailAddress, unittest.equals('foo')); |
- } |
- buildCounterAccountUser--; |
-} |
- |
-buildUnnamed303() { |
- var o = new core.List<api.AccountsCustomBatchRequestEntry>(); |
- o.add(buildAccountsCustomBatchRequestEntry()); |
- o.add(buildAccountsCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed303(core.List<api.AccountsCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountsCustomBatchRequestEntry(o[0]); |
- checkAccountsCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterAccountsCustomBatchRequest = 0; |
-buildAccountsCustomBatchRequest() { |
- var o = new api.AccountsCustomBatchRequest(); |
- buildCounterAccountsCustomBatchRequest++; |
- if (buildCounterAccountsCustomBatchRequest < 3) { |
- o.entries = buildUnnamed303(); |
- } |
- buildCounterAccountsCustomBatchRequest--; |
- return o; |
-} |
- |
-checkAccountsCustomBatchRequest(api.AccountsCustomBatchRequest o) { |
- buildCounterAccountsCustomBatchRequest++; |
- if (buildCounterAccountsCustomBatchRequest < 3) { |
- checkUnnamed303(o.entries); |
- } |
- buildCounterAccountsCustomBatchRequest--; |
-} |
- |
-core.int buildCounterAccountsCustomBatchRequestEntry = 0; |
-buildAccountsCustomBatchRequestEntry() { |
- var o = new api.AccountsCustomBatchRequestEntry(); |
- buildCounterAccountsCustomBatchRequestEntry++; |
- if (buildCounterAccountsCustomBatchRequestEntry < 3) { |
- o.account = buildAccount(); |
- o.accountId = "foo"; |
- o.batchId = 42; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- } |
- buildCounterAccountsCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkAccountsCustomBatchRequestEntry(api.AccountsCustomBatchRequestEntry o) { |
- buildCounterAccountsCustomBatchRequestEntry++; |
- if (buildCounterAccountsCustomBatchRequestEntry < 3) { |
- checkAccount(o.account); |
- unittest.expect(o.accountId, unittest.equals('foo')); |
- unittest.expect(o.batchId, unittest.equals(42)); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- } |
- buildCounterAccountsCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed304() { |
- var o = new core.List<api.AccountsCustomBatchResponseEntry>(); |
- o.add(buildAccountsCustomBatchResponseEntry()); |
- o.add(buildAccountsCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed304(core.List<api.AccountsCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountsCustomBatchResponseEntry(o[0]); |
- checkAccountsCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterAccountsCustomBatchResponse = 0; |
-buildAccountsCustomBatchResponse() { |
- var o = new api.AccountsCustomBatchResponse(); |
- buildCounterAccountsCustomBatchResponse++; |
- if (buildCounterAccountsCustomBatchResponse < 3) { |
- o.entries = buildUnnamed304(); |
- o.kind = "foo"; |
- } |
- buildCounterAccountsCustomBatchResponse--; |
- return o; |
-} |
- |
-checkAccountsCustomBatchResponse(api.AccountsCustomBatchResponse o) { |
- buildCounterAccountsCustomBatchResponse++; |
- if (buildCounterAccountsCustomBatchResponse < 3) { |
- checkUnnamed304(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterAccountsCustomBatchResponse--; |
-} |
- |
-core.int buildCounterAccountsCustomBatchResponseEntry = 0; |
-buildAccountsCustomBatchResponseEntry() { |
- var o = new api.AccountsCustomBatchResponseEntry(); |
- buildCounterAccountsCustomBatchResponseEntry++; |
- if (buildCounterAccountsCustomBatchResponseEntry < 3) { |
- o.account = buildAccount(); |
- o.batchId = 42; |
- o.errors = buildErrors(); |
- o.kind = "foo"; |
- } |
- buildCounterAccountsCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkAccountsCustomBatchResponseEntry(api.AccountsCustomBatchResponseEntry o) { |
- buildCounterAccountsCustomBatchResponseEntry++; |
- if (buildCounterAccountsCustomBatchResponseEntry < 3) { |
- checkAccount(o.account); |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkErrors(o.errors); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterAccountsCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed305() { |
- var o = new core.List<api.Account>(); |
- o.add(buildAccount()); |
- o.add(buildAccount()); |
- return o; |
-} |
- |
-checkUnnamed305(core.List<api.Account> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccount(o[0]); |
- checkAccount(o[1]); |
-} |
- |
-core.int buildCounterAccountsListResponse = 0; |
-buildAccountsListResponse() { |
- var o = new api.AccountsListResponse(); |
- buildCounterAccountsListResponse++; |
- if (buildCounterAccountsListResponse < 3) { |
- o.kind = "foo"; |
- o.nextPageToken = "foo"; |
- o.resources = buildUnnamed305(); |
- } |
- buildCounterAccountsListResponse--; |
- return o; |
-} |
- |
-checkAccountsListResponse(api.AccountsListResponse o) { |
- buildCounterAccountsListResponse++; |
- if (buildCounterAccountsListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed305(o.resources); |
- } |
- buildCounterAccountsListResponse--; |
-} |
- |
-buildUnnamed306() { |
- var o = new core.List<api.AccountstatusesCustomBatchRequestEntry>(); |
- o.add(buildAccountstatusesCustomBatchRequestEntry()); |
- o.add(buildAccountstatusesCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed306(core.List<api.AccountstatusesCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountstatusesCustomBatchRequestEntry(o[0]); |
- checkAccountstatusesCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterAccountstatusesCustomBatchRequest = 0; |
-buildAccountstatusesCustomBatchRequest() { |
- var o = new api.AccountstatusesCustomBatchRequest(); |
- buildCounterAccountstatusesCustomBatchRequest++; |
- if (buildCounterAccountstatusesCustomBatchRequest < 3) { |
- o.entries = buildUnnamed306(); |
- } |
- buildCounterAccountstatusesCustomBatchRequest--; |
- return o; |
-} |
- |
-checkAccountstatusesCustomBatchRequest(api.AccountstatusesCustomBatchRequest o) { |
- buildCounterAccountstatusesCustomBatchRequest++; |
- if (buildCounterAccountstatusesCustomBatchRequest < 3) { |
- checkUnnamed306(o.entries); |
- } |
- buildCounterAccountstatusesCustomBatchRequest--; |
-} |
- |
-core.int buildCounterAccountstatusesCustomBatchRequestEntry = 0; |
-buildAccountstatusesCustomBatchRequestEntry() { |
- var o = new api.AccountstatusesCustomBatchRequestEntry(); |
- buildCounterAccountstatusesCustomBatchRequestEntry++; |
- if (buildCounterAccountstatusesCustomBatchRequestEntry < 3) { |
- o.accountId = "foo"; |
- o.batchId = 42; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- } |
- buildCounterAccountstatusesCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkAccountstatusesCustomBatchRequestEntry(api.AccountstatusesCustomBatchRequestEntry o) { |
- buildCounterAccountstatusesCustomBatchRequestEntry++; |
- if (buildCounterAccountstatusesCustomBatchRequestEntry < 3) { |
- unittest.expect(o.accountId, unittest.equals('foo')); |
- unittest.expect(o.batchId, unittest.equals(42)); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- } |
- buildCounterAccountstatusesCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed307() { |
- var o = new core.List<api.AccountstatusesCustomBatchResponseEntry>(); |
- o.add(buildAccountstatusesCustomBatchResponseEntry()); |
- o.add(buildAccountstatusesCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed307(core.List<api.AccountstatusesCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountstatusesCustomBatchResponseEntry(o[0]); |
- checkAccountstatusesCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterAccountstatusesCustomBatchResponse = 0; |
-buildAccountstatusesCustomBatchResponse() { |
- var o = new api.AccountstatusesCustomBatchResponse(); |
- buildCounterAccountstatusesCustomBatchResponse++; |
- if (buildCounterAccountstatusesCustomBatchResponse < 3) { |
- o.entries = buildUnnamed307(); |
- o.kind = "foo"; |
- } |
- buildCounterAccountstatusesCustomBatchResponse--; |
- return o; |
-} |
- |
-checkAccountstatusesCustomBatchResponse(api.AccountstatusesCustomBatchResponse o) { |
- buildCounterAccountstatusesCustomBatchResponse++; |
- if (buildCounterAccountstatusesCustomBatchResponse < 3) { |
- checkUnnamed307(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterAccountstatusesCustomBatchResponse--; |
-} |
- |
-core.int buildCounterAccountstatusesCustomBatchResponseEntry = 0; |
-buildAccountstatusesCustomBatchResponseEntry() { |
- var o = new api.AccountstatusesCustomBatchResponseEntry(); |
- buildCounterAccountstatusesCustomBatchResponseEntry++; |
- if (buildCounterAccountstatusesCustomBatchResponseEntry < 3) { |
- o.accountStatus = buildAccountStatus(); |
- o.batchId = 42; |
- o.errors = buildErrors(); |
- } |
- buildCounterAccountstatusesCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkAccountstatusesCustomBatchResponseEntry(api.AccountstatusesCustomBatchResponseEntry o) { |
- buildCounterAccountstatusesCustomBatchResponseEntry++; |
- if (buildCounterAccountstatusesCustomBatchResponseEntry < 3) { |
- checkAccountStatus(o.accountStatus); |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkErrors(o.errors); |
- } |
- buildCounterAccountstatusesCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed308() { |
- var o = new core.List<api.AccountStatus>(); |
- o.add(buildAccountStatus()); |
- o.add(buildAccountStatus()); |
- return o; |
-} |
- |
-checkUnnamed308(core.List<api.AccountStatus> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkAccountStatus(o[0]); |
- checkAccountStatus(o[1]); |
-} |
- |
-core.int buildCounterAccountstatusesListResponse = 0; |
-buildAccountstatusesListResponse() { |
- var o = new api.AccountstatusesListResponse(); |
- buildCounterAccountstatusesListResponse++; |
- if (buildCounterAccountstatusesListResponse < 3) { |
- o.kind = "foo"; |
- o.nextPageToken = "foo"; |
- o.resources = buildUnnamed308(); |
- } |
- buildCounterAccountstatusesListResponse--; |
- return o; |
-} |
- |
-checkAccountstatusesListResponse(api.AccountstatusesListResponse o) { |
- buildCounterAccountstatusesListResponse++; |
- if (buildCounterAccountstatusesListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed308(o.resources); |
- } |
- buildCounterAccountstatusesListResponse--; |
-} |
- |
-buildUnnamed309() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed309(core.List<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 buildCounterDatafeed = 0; |
-buildDatafeed() { |
- var o = new api.Datafeed(); |
- buildCounterDatafeed++; |
- if (buildCounterDatafeed < 3) { |
- o.attributeLanguage = "foo"; |
- o.contentLanguage = "foo"; |
- o.contentType = "foo"; |
- o.fetchSchedule = buildDatafeedFetchSchedule(); |
- o.fileName = "foo"; |
- o.format = buildDatafeedFormat(); |
- o.id = "foo"; |
- o.intendedDestinations = buildUnnamed309(); |
- o.kind = "foo"; |
- o.name = "foo"; |
- o.targetCountry = "foo"; |
- } |
- buildCounterDatafeed--; |
- return o; |
-} |
- |
-checkDatafeed(api.Datafeed o) { |
- buildCounterDatafeed++; |
- if (buildCounterDatafeed < 3) { |
- unittest.expect(o.attributeLanguage, unittest.equals('foo')); |
- unittest.expect(o.contentLanguage, unittest.equals('foo')); |
- unittest.expect(o.contentType, unittest.equals('foo')); |
- checkDatafeedFetchSchedule(o.fetchSchedule); |
- unittest.expect(o.fileName, unittest.equals('foo')); |
- checkDatafeedFormat(o.format); |
- unittest.expect(o.id, unittest.equals('foo')); |
- checkUnnamed309(o.intendedDestinations); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.targetCountry, unittest.equals('foo')); |
- } |
- buildCounterDatafeed--; |
-} |
- |
-core.int buildCounterDatafeedFetchSchedule = 0; |
-buildDatafeedFetchSchedule() { |
- var o = new api.DatafeedFetchSchedule(); |
- buildCounterDatafeedFetchSchedule++; |
- if (buildCounterDatafeedFetchSchedule < 3) { |
- o.dayOfMonth = 42; |
- o.fetchUrl = "foo"; |
- o.hour = 42; |
- o.password = "foo"; |
- o.timeZone = "foo"; |
- o.username = "foo"; |
- o.weekday = "foo"; |
- } |
- buildCounterDatafeedFetchSchedule--; |
- return o; |
-} |
- |
-checkDatafeedFetchSchedule(api.DatafeedFetchSchedule o) { |
- buildCounterDatafeedFetchSchedule++; |
- if (buildCounterDatafeedFetchSchedule < 3) { |
- unittest.expect(o.dayOfMonth, unittest.equals(42)); |
- unittest.expect(o.fetchUrl, unittest.equals('foo')); |
- unittest.expect(o.hour, unittest.equals(42)); |
- unittest.expect(o.password, unittest.equals('foo')); |
- unittest.expect(o.timeZone, unittest.equals('foo')); |
- unittest.expect(o.username, unittest.equals('foo')); |
- unittest.expect(o.weekday, unittest.equals('foo')); |
- } |
- buildCounterDatafeedFetchSchedule--; |
-} |
- |
-core.int buildCounterDatafeedFormat = 0; |
-buildDatafeedFormat() { |
- var o = new api.DatafeedFormat(); |
- buildCounterDatafeedFormat++; |
- if (buildCounterDatafeedFormat < 3) { |
- o.columnDelimiter = "foo"; |
- o.fileEncoding = "foo"; |
- o.quotingMode = "foo"; |
- } |
- buildCounterDatafeedFormat--; |
- return o; |
-} |
- |
-checkDatafeedFormat(api.DatafeedFormat o) { |
- buildCounterDatafeedFormat++; |
- if (buildCounterDatafeedFormat < 3) { |
- unittest.expect(o.columnDelimiter, unittest.equals('foo')); |
- unittest.expect(o.fileEncoding, unittest.equals('foo')); |
- unittest.expect(o.quotingMode, unittest.equals('foo')); |
- } |
- buildCounterDatafeedFormat--; |
-} |
- |
-buildUnnamed310() { |
- var o = new core.List<api.DatafeedStatusError>(); |
- o.add(buildDatafeedStatusError()); |
- o.add(buildDatafeedStatusError()); |
- return o; |
-} |
- |
-checkUnnamed310(core.List<api.DatafeedStatusError> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedStatusError(o[0]); |
- checkDatafeedStatusError(o[1]); |
-} |
- |
-buildUnnamed311() { |
- var o = new core.List<api.DatafeedStatusError>(); |
- o.add(buildDatafeedStatusError()); |
- o.add(buildDatafeedStatusError()); |
- return o; |
-} |
- |
-checkUnnamed311(core.List<api.DatafeedStatusError> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedStatusError(o[0]); |
- checkDatafeedStatusError(o[1]); |
-} |
- |
-core.int buildCounterDatafeedStatus = 0; |
-buildDatafeedStatus() { |
- var o = new api.DatafeedStatus(); |
- buildCounterDatafeedStatus++; |
- if (buildCounterDatafeedStatus < 3) { |
- o.datafeedId = "foo"; |
- o.errors = buildUnnamed310(); |
- o.itemsTotal = "foo"; |
- o.itemsValid = "foo"; |
- o.kind = "foo"; |
- o.processingStatus = "foo"; |
- o.warnings = buildUnnamed311(); |
- } |
- buildCounterDatafeedStatus--; |
- return o; |
-} |
- |
-checkDatafeedStatus(api.DatafeedStatus o) { |
- buildCounterDatafeedStatus++; |
- if (buildCounterDatafeedStatus < 3) { |
- unittest.expect(o.datafeedId, unittest.equals('foo')); |
- checkUnnamed310(o.errors); |
- unittest.expect(o.itemsTotal, unittest.equals('foo')); |
- unittest.expect(o.itemsValid, unittest.equals('foo')); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.processingStatus, unittest.equals('foo')); |
- checkUnnamed311(o.warnings); |
- } |
- buildCounterDatafeedStatus--; |
-} |
- |
-buildUnnamed312() { |
- var o = new core.List<api.DatafeedStatusExample>(); |
- o.add(buildDatafeedStatusExample()); |
- o.add(buildDatafeedStatusExample()); |
- return o; |
-} |
- |
-checkUnnamed312(core.List<api.DatafeedStatusExample> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedStatusExample(o[0]); |
- checkDatafeedStatusExample(o[1]); |
-} |
- |
-core.int buildCounterDatafeedStatusError = 0; |
-buildDatafeedStatusError() { |
- var o = new api.DatafeedStatusError(); |
- buildCounterDatafeedStatusError++; |
- if (buildCounterDatafeedStatusError < 3) { |
- o.code = "foo"; |
- o.count = "foo"; |
- o.examples = buildUnnamed312(); |
- o.message = "foo"; |
- } |
- buildCounterDatafeedStatusError--; |
- return o; |
-} |
- |
-checkDatafeedStatusError(api.DatafeedStatusError o) { |
- buildCounterDatafeedStatusError++; |
- if (buildCounterDatafeedStatusError < 3) { |
- unittest.expect(o.code, unittest.equals('foo')); |
- unittest.expect(o.count, unittest.equals('foo')); |
- checkUnnamed312(o.examples); |
- unittest.expect(o.message, unittest.equals('foo')); |
- } |
- buildCounterDatafeedStatusError--; |
-} |
- |
-core.int buildCounterDatafeedStatusExample = 0; |
-buildDatafeedStatusExample() { |
- var o = new api.DatafeedStatusExample(); |
- buildCounterDatafeedStatusExample++; |
- if (buildCounterDatafeedStatusExample < 3) { |
- o.itemId = "foo"; |
- o.lineNumber = "foo"; |
- o.value = "foo"; |
- } |
- buildCounterDatafeedStatusExample--; |
- return o; |
-} |
- |
-checkDatafeedStatusExample(api.DatafeedStatusExample o) { |
- buildCounterDatafeedStatusExample++; |
- if (buildCounterDatafeedStatusExample < 3) { |
- unittest.expect(o.itemId, unittest.equals('foo')); |
- unittest.expect(o.lineNumber, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals('foo')); |
- } |
- buildCounterDatafeedStatusExample--; |
-} |
- |
-buildUnnamed313() { |
- var o = new core.List<api.DatafeedsCustomBatchRequestEntry>(); |
- o.add(buildDatafeedsCustomBatchRequestEntry()); |
- o.add(buildDatafeedsCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed313(core.List<api.DatafeedsCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedsCustomBatchRequestEntry(o[0]); |
- checkDatafeedsCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterDatafeedsCustomBatchRequest = 0; |
-buildDatafeedsCustomBatchRequest() { |
- var o = new api.DatafeedsCustomBatchRequest(); |
- buildCounterDatafeedsCustomBatchRequest++; |
- if (buildCounterDatafeedsCustomBatchRequest < 3) { |
- o.entries = buildUnnamed313(); |
- } |
- buildCounterDatafeedsCustomBatchRequest--; |
- return o; |
-} |
- |
-checkDatafeedsCustomBatchRequest(api.DatafeedsCustomBatchRequest o) { |
- buildCounterDatafeedsCustomBatchRequest++; |
- if (buildCounterDatafeedsCustomBatchRequest < 3) { |
- checkUnnamed313(o.entries); |
- } |
- buildCounterDatafeedsCustomBatchRequest--; |
-} |
- |
-core.int buildCounterDatafeedsCustomBatchRequestEntry = 0; |
-buildDatafeedsCustomBatchRequestEntry() { |
- var o = new api.DatafeedsCustomBatchRequestEntry(); |
- buildCounterDatafeedsCustomBatchRequestEntry++; |
- if (buildCounterDatafeedsCustomBatchRequestEntry < 3) { |
- o.batchId = 42; |
- o.datafeed = buildDatafeed(); |
- o.datafeedId = "foo"; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- } |
- buildCounterDatafeedsCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkDatafeedsCustomBatchRequestEntry(api.DatafeedsCustomBatchRequestEntry o) { |
- buildCounterDatafeedsCustomBatchRequestEntry++; |
- if (buildCounterDatafeedsCustomBatchRequestEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkDatafeed(o.datafeed); |
- unittest.expect(o.datafeedId, unittest.equals('foo')); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- } |
- buildCounterDatafeedsCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed314() { |
- var o = new core.List<api.DatafeedsCustomBatchResponseEntry>(); |
- o.add(buildDatafeedsCustomBatchResponseEntry()); |
- o.add(buildDatafeedsCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed314(core.List<api.DatafeedsCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedsCustomBatchResponseEntry(o[0]); |
- checkDatafeedsCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterDatafeedsCustomBatchResponse = 0; |
-buildDatafeedsCustomBatchResponse() { |
- var o = new api.DatafeedsCustomBatchResponse(); |
- buildCounterDatafeedsCustomBatchResponse++; |
- if (buildCounterDatafeedsCustomBatchResponse < 3) { |
- o.entries = buildUnnamed314(); |
- o.kind = "foo"; |
- } |
- buildCounterDatafeedsCustomBatchResponse--; |
- return o; |
-} |
- |
-checkDatafeedsCustomBatchResponse(api.DatafeedsCustomBatchResponse o) { |
- buildCounterDatafeedsCustomBatchResponse++; |
- if (buildCounterDatafeedsCustomBatchResponse < 3) { |
- checkUnnamed314(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterDatafeedsCustomBatchResponse--; |
-} |
- |
-core.int buildCounterDatafeedsCustomBatchResponseEntry = 0; |
-buildDatafeedsCustomBatchResponseEntry() { |
- var o = new api.DatafeedsCustomBatchResponseEntry(); |
- buildCounterDatafeedsCustomBatchResponseEntry++; |
- if (buildCounterDatafeedsCustomBatchResponseEntry < 3) { |
- o.batchId = 42; |
- o.datafeed = buildDatafeed(); |
- o.errors = buildErrors(); |
- } |
- buildCounterDatafeedsCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkDatafeedsCustomBatchResponseEntry(api.DatafeedsCustomBatchResponseEntry o) { |
- buildCounterDatafeedsCustomBatchResponseEntry++; |
- if (buildCounterDatafeedsCustomBatchResponseEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkDatafeed(o.datafeed); |
- checkErrors(o.errors); |
- } |
- buildCounterDatafeedsCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed315() { |
- var o = new core.List<api.Datafeed>(); |
- o.add(buildDatafeed()); |
- o.add(buildDatafeed()); |
- return o; |
-} |
- |
-checkUnnamed315(core.List<api.Datafeed> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeed(o[0]); |
- checkDatafeed(o[1]); |
-} |
- |
-core.int buildCounterDatafeedsListResponse = 0; |
-buildDatafeedsListResponse() { |
- var o = new api.DatafeedsListResponse(); |
- buildCounterDatafeedsListResponse++; |
- if (buildCounterDatafeedsListResponse < 3) { |
- o.kind = "foo"; |
- o.resources = buildUnnamed315(); |
- } |
- buildCounterDatafeedsListResponse--; |
- return o; |
-} |
- |
-checkDatafeedsListResponse(api.DatafeedsListResponse o) { |
- buildCounterDatafeedsListResponse++; |
- if (buildCounterDatafeedsListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed315(o.resources); |
- } |
- buildCounterDatafeedsListResponse--; |
-} |
- |
-buildUnnamed316() { |
- var o = new core.List<api.DatafeedstatusesCustomBatchRequestEntry>(); |
- o.add(buildDatafeedstatusesCustomBatchRequestEntry()); |
- o.add(buildDatafeedstatusesCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed316(core.List<api.DatafeedstatusesCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedstatusesCustomBatchRequestEntry(o[0]); |
- checkDatafeedstatusesCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterDatafeedstatusesCustomBatchRequest = 0; |
-buildDatafeedstatusesCustomBatchRequest() { |
- var o = new api.DatafeedstatusesCustomBatchRequest(); |
- buildCounterDatafeedstatusesCustomBatchRequest++; |
- if (buildCounterDatafeedstatusesCustomBatchRequest < 3) { |
- o.entries = buildUnnamed316(); |
- } |
- buildCounterDatafeedstatusesCustomBatchRequest--; |
- return o; |
-} |
- |
-checkDatafeedstatusesCustomBatchRequest(api.DatafeedstatusesCustomBatchRequest o) { |
- buildCounterDatafeedstatusesCustomBatchRequest++; |
- if (buildCounterDatafeedstatusesCustomBatchRequest < 3) { |
- checkUnnamed316(o.entries); |
- } |
- buildCounterDatafeedstatusesCustomBatchRequest--; |
-} |
- |
-core.int buildCounterDatafeedstatusesCustomBatchRequestEntry = 0; |
-buildDatafeedstatusesCustomBatchRequestEntry() { |
- var o = new api.DatafeedstatusesCustomBatchRequestEntry(); |
- buildCounterDatafeedstatusesCustomBatchRequestEntry++; |
- if (buildCounterDatafeedstatusesCustomBatchRequestEntry < 3) { |
- o.batchId = 42; |
- o.datafeedId = "foo"; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- } |
- buildCounterDatafeedstatusesCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkDatafeedstatusesCustomBatchRequestEntry(api.DatafeedstatusesCustomBatchRequestEntry o) { |
- buildCounterDatafeedstatusesCustomBatchRequestEntry++; |
- if (buildCounterDatafeedstatusesCustomBatchRequestEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- unittest.expect(o.datafeedId, unittest.equals('foo')); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- } |
- buildCounterDatafeedstatusesCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed317() { |
- var o = new core.List<api.DatafeedstatusesCustomBatchResponseEntry>(); |
- o.add(buildDatafeedstatusesCustomBatchResponseEntry()); |
- o.add(buildDatafeedstatusesCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed317(core.List<api.DatafeedstatusesCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedstatusesCustomBatchResponseEntry(o[0]); |
- checkDatafeedstatusesCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterDatafeedstatusesCustomBatchResponse = 0; |
-buildDatafeedstatusesCustomBatchResponse() { |
- var o = new api.DatafeedstatusesCustomBatchResponse(); |
- buildCounterDatafeedstatusesCustomBatchResponse++; |
- if (buildCounterDatafeedstatusesCustomBatchResponse < 3) { |
- o.entries = buildUnnamed317(); |
- o.kind = "foo"; |
- } |
- buildCounterDatafeedstatusesCustomBatchResponse--; |
- return o; |
-} |
- |
-checkDatafeedstatusesCustomBatchResponse(api.DatafeedstatusesCustomBatchResponse o) { |
- buildCounterDatafeedstatusesCustomBatchResponse++; |
- if (buildCounterDatafeedstatusesCustomBatchResponse < 3) { |
- checkUnnamed317(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterDatafeedstatusesCustomBatchResponse--; |
-} |
- |
-core.int buildCounterDatafeedstatusesCustomBatchResponseEntry = 0; |
-buildDatafeedstatusesCustomBatchResponseEntry() { |
- var o = new api.DatafeedstatusesCustomBatchResponseEntry(); |
- buildCounterDatafeedstatusesCustomBatchResponseEntry++; |
- if (buildCounterDatafeedstatusesCustomBatchResponseEntry < 3) { |
- o.batchId = 42; |
- o.datafeedStatus = buildDatafeedStatus(); |
- o.errors = buildErrors(); |
- } |
- buildCounterDatafeedstatusesCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkDatafeedstatusesCustomBatchResponseEntry(api.DatafeedstatusesCustomBatchResponseEntry o) { |
- buildCounterDatafeedstatusesCustomBatchResponseEntry++; |
- if (buildCounterDatafeedstatusesCustomBatchResponseEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkDatafeedStatus(o.datafeedStatus); |
- checkErrors(o.errors); |
- } |
- buildCounterDatafeedstatusesCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed318() { |
- var o = new core.List<api.DatafeedStatus>(); |
- o.add(buildDatafeedStatus()); |
- o.add(buildDatafeedStatus()); |
- return o; |
-} |
- |
-checkUnnamed318(core.List<api.DatafeedStatus> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkDatafeedStatus(o[0]); |
- checkDatafeedStatus(o[1]); |
-} |
- |
-core.int buildCounterDatafeedstatusesListResponse = 0; |
-buildDatafeedstatusesListResponse() { |
- var o = new api.DatafeedstatusesListResponse(); |
- buildCounterDatafeedstatusesListResponse++; |
- if (buildCounterDatafeedstatusesListResponse < 3) { |
- o.kind = "foo"; |
- o.resources = buildUnnamed318(); |
- } |
- buildCounterDatafeedstatusesListResponse--; |
- return o; |
-} |
- |
-checkDatafeedstatusesListResponse(api.DatafeedstatusesListResponse o) { |
- buildCounterDatafeedstatusesListResponse++; |
- if (buildCounterDatafeedstatusesListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed318(o.resources); |
- } |
- buildCounterDatafeedstatusesListResponse--; |
-} |
- |
-core.int buildCounterError = 0; |
-buildError() { |
- var o = new api.Error(); |
- buildCounterError++; |
- if (buildCounterError < 3) { |
- o.domain = "foo"; |
- o.message = "foo"; |
- o.reason = "foo"; |
- } |
- buildCounterError--; |
- return o; |
-} |
- |
-checkError(api.Error o) { |
- buildCounterError++; |
- if (buildCounterError < 3) { |
- unittest.expect(o.domain, unittest.equals('foo')); |
- unittest.expect(o.message, unittest.equals('foo')); |
- unittest.expect(o.reason, unittest.equals('foo')); |
- } |
- buildCounterError--; |
-} |
- |
-buildUnnamed319() { |
- var o = new core.List<api.Error>(); |
- o.add(buildError()); |
- o.add(buildError()); |
- return o; |
-} |
- |
-checkUnnamed319(core.List<api.Error> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkError(o[0]); |
- checkError(o[1]); |
-} |
- |
-core.int buildCounterErrors = 0; |
-buildErrors() { |
- var o = new api.Errors(); |
- buildCounterErrors++; |
- if (buildCounterErrors < 3) { |
- o.code = 42; |
- o.errors = buildUnnamed319(); |
- o.message = "foo"; |
- } |
- buildCounterErrors--; |
- return o; |
-} |
- |
-checkErrors(api.Errors o) { |
- buildCounterErrors++; |
- if (buildCounterErrors < 3) { |
- unittest.expect(o.code, unittest.equals(42)); |
- checkUnnamed319(o.errors); |
- unittest.expect(o.message, unittest.equals('foo')); |
- } |
- buildCounterErrors--; |
-} |
- |
-core.int buildCounterInventory = 0; |
-buildInventory() { |
- var o = new api.Inventory(); |
- buildCounterInventory++; |
- if (buildCounterInventory < 3) { |
- o.availability = "foo"; |
- o.kind = "foo"; |
- o.price = buildPrice(); |
- o.quantity = 42; |
- o.salePrice = buildPrice(); |
- o.salePriceEffectiveDate = "foo"; |
- } |
- buildCounterInventory--; |
- return o; |
-} |
- |
-checkInventory(api.Inventory o) { |
- buildCounterInventory++; |
- if (buildCounterInventory < 3) { |
- unittest.expect(o.availability, unittest.equals('foo')); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- checkPrice(o.price); |
- unittest.expect(o.quantity, unittest.equals(42)); |
- checkPrice(o.salePrice); |
- unittest.expect(o.salePriceEffectiveDate, unittest.equals('foo')); |
- } |
- buildCounterInventory--; |
-} |
- |
-buildUnnamed320() { |
- var o = new core.List<api.InventoryCustomBatchRequestEntry>(); |
- o.add(buildInventoryCustomBatchRequestEntry()); |
- o.add(buildInventoryCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed320(core.List<api.InventoryCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkInventoryCustomBatchRequestEntry(o[0]); |
- checkInventoryCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterInventoryCustomBatchRequest = 0; |
-buildInventoryCustomBatchRequest() { |
- var o = new api.InventoryCustomBatchRequest(); |
- buildCounterInventoryCustomBatchRequest++; |
- if (buildCounterInventoryCustomBatchRequest < 3) { |
- o.entries = buildUnnamed320(); |
- } |
- buildCounterInventoryCustomBatchRequest--; |
- return o; |
-} |
- |
-checkInventoryCustomBatchRequest(api.InventoryCustomBatchRequest o) { |
- buildCounterInventoryCustomBatchRequest++; |
- if (buildCounterInventoryCustomBatchRequest < 3) { |
- checkUnnamed320(o.entries); |
- } |
- buildCounterInventoryCustomBatchRequest--; |
-} |
- |
-core.int buildCounterInventoryCustomBatchRequestEntry = 0; |
-buildInventoryCustomBatchRequestEntry() { |
- var o = new api.InventoryCustomBatchRequestEntry(); |
- buildCounterInventoryCustomBatchRequestEntry++; |
- if (buildCounterInventoryCustomBatchRequestEntry < 3) { |
- o.batchId = 42; |
- o.inventory = buildInventory(); |
- o.merchantId = "foo"; |
- o.productId = "foo"; |
- o.storeCode = "foo"; |
- } |
- buildCounterInventoryCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkInventoryCustomBatchRequestEntry(api.InventoryCustomBatchRequestEntry o) { |
- buildCounterInventoryCustomBatchRequestEntry++; |
- if (buildCounterInventoryCustomBatchRequestEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkInventory(o.inventory); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.productId, unittest.equals('foo')); |
- unittest.expect(o.storeCode, unittest.equals('foo')); |
- } |
- buildCounterInventoryCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed321() { |
- var o = new core.List<api.InventoryCustomBatchResponseEntry>(); |
- o.add(buildInventoryCustomBatchResponseEntry()); |
- o.add(buildInventoryCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed321(core.List<api.InventoryCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkInventoryCustomBatchResponseEntry(o[0]); |
- checkInventoryCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterInventoryCustomBatchResponse = 0; |
-buildInventoryCustomBatchResponse() { |
- var o = new api.InventoryCustomBatchResponse(); |
- buildCounterInventoryCustomBatchResponse++; |
- if (buildCounterInventoryCustomBatchResponse < 3) { |
- o.entries = buildUnnamed321(); |
- o.kind = "foo"; |
- } |
- buildCounterInventoryCustomBatchResponse--; |
- return o; |
-} |
- |
-checkInventoryCustomBatchResponse(api.InventoryCustomBatchResponse o) { |
- buildCounterInventoryCustomBatchResponse++; |
- if (buildCounterInventoryCustomBatchResponse < 3) { |
- checkUnnamed321(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterInventoryCustomBatchResponse--; |
-} |
- |
-core.int buildCounterInventoryCustomBatchResponseEntry = 0; |
-buildInventoryCustomBatchResponseEntry() { |
- var o = new api.InventoryCustomBatchResponseEntry(); |
- buildCounterInventoryCustomBatchResponseEntry++; |
- if (buildCounterInventoryCustomBatchResponseEntry < 3) { |
- o.batchId = 42; |
- o.errors = buildErrors(); |
- o.kind = "foo"; |
- } |
- buildCounterInventoryCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkInventoryCustomBatchResponseEntry(api.InventoryCustomBatchResponseEntry o) { |
- buildCounterInventoryCustomBatchResponseEntry++; |
- if (buildCounterInventoryCustomBatchResponseEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkErrors(o.errors); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterInventoryCustomBatchResponseEntry--; |
-} |
- |
-core.int buildCounterInventorySetRequest = 0; |
-buildInventorySetRequest() { |
- var o = new api.InventorySetRequest(); |
- buildCounterInventorySetRequest++; |
- if (buildCounterInventorySetRequest < 3) { |
- o.availability = "foo"; |
- o.price = buildPrice(); |
- o.quantity = 42; |
- o.salePrice = buildPrice(); |
- o.salePriceEffectiveDate = "foo"; |
- } |
- buildCounterInventorySetRequest--; |
- return o; |
-} |
- |
-checkInventorySetRequest(api.InventorySetRequest o) { |
- buildCounterInventorySetRequest++; |
- if (buildCounterInventorySetRequest < 3) { |
- unittest.expect(o.availability, unittest.equals('foo')); |
- checkPrice(o.price); |
- unittest.expect(o.quantity, unittest.equals(42)); |
- checkPrice(o.salePrice); |
- unittest.expect(o.salePriceEffectiveDate, unittest.equals('foo')); |
- } |
- buildCounterInventorySetRequest--; |
-} |
- |
-core.int buildCounterInventorySetResponse = 0; |
-buildInventorySetResponse() { |
- var o = new api.InventorySetResponse(); |
- buildCounterInventorySetResponse++; |
- if (buildCounterInventorySetResponse < 3) { |
- o.kind = "foo"; |
- } |
- buildCounterInventorySetResponse--; |
- return o; |
-} |
- |
-checkInventorySetResponse(api.InventorySetResponse o) { |
- buildCounterInventorySetResponse++; |
- if (buildCounterInventorySetResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterInventorySetResponse--; |
-} |
- |
-core.int buildCounterLoyaltyPoints = 0; |
-buildLoyaltyPoints() { |
- var o = new api.LoyaltyPoints(); |
- buildCounterLoyaltyPoints++; |
- if (buildCounterLoyaltyPoints < 3) { |
- o.name = "foo"; |
- o.pointsValue = "foo"; |
- o.ratio = 42.0; |
- } |
- buildCounterLoyaltyPoints--; |
- return o; |
-} |
- |
-checkLoyaltyPoints(api.LoyaltyPoints o) { |
- buildCounterLoyaltyPoints++; |
- if (buildCounterLoyaltyPoints < 3) { |
- unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.pointsValue, unittest.equals('foo')); |
- unittest.expect(o.ratio, unittest.equals(42.0)); |
- } |
- buildCounterLoyaltyPoints--; |
-} |
- |
-core.int buildCounterPrice = 0; |
-buildPrice() { |
- var o = new api.Price(); |
- buildCounterPrice++; |
- if (buildCounterPrice < 3) { |
- o.currency = "foo"; |
- o.value = "foo"; |
- } |
- buildCounterPrice--; |
- return o; |
-} |
- |
-checkPrice(api.Price o) { |
- buildCounterPrice++; |
- if (buildCounterPrice < 3) { |
- unittest.expect(o.currency, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals('foo')); |
- } |
- buildCounterPrice--; |
-} |
- |
-buildUnnamed322() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed322(core.List<core.String> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- unittest.expect(o[0], unittest.equals('foo')); |
- unittest.expect(o[1], unittest.equals('foo')); |
-} |
- |
-buildUnnamed323() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed323(core.List<core.String> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- unittest.expect(o[0], unittest.equals('foo')); |
- unittest.expect(o[1], unittest.equals('foo')); |
-} |
- |
-buildUnnamed324() { |
- var o = new core.List<api.ProductCustomAttribute>(); |
- o.add(buildProductCustomAttribute()); |
- o.add(buildProductCustomAttribute()); |
- return o; |
-} |
- |
-checkUnnamed324(core.List<api.ProductCustomAttribute> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductCustomAttribute(o[0]); |
- checkProductCustomAttribute(o[1]); |
-} |
- |
-buildUnnamed325() { |
- var o = new core.List<api.ProductCustomGroup>(); |
- o.add(buildProductCustomGroup()); |
- o.add(buildProductCustomGroup()); |
- return o; |
-} |
- |
-checkUnnamed325(core.List<api.ProductCustomGroup> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductCustomGroup(o[0]); |
- checkProductCustomGroup(o[1]); |
-} |
- |
-buildUnnamed326() { |
- var o = new core.List<api.ProductDestination>(); |
- o.add(buildProductDestination()); |
- o.add(buildProductDestination()); |
- return o; |
-} |
- |
-checkUnnamed326(core.List<api.ProductDestination> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductDestination(o[0]); |
- checkProductDestination(o[1]); |
-} |
- |
-buildUnnamed327() { |
- var o = new core.List<api.ProductShipping>(); |
- o.add(buildProductShipping()); |
- o.add(buildProductShipping()); |
- return o; |
-} |
- |
-checkUnnamed327(core.List<api.ProductShipping> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductShipping(o[0]); |
- checkProductShipping(o[1]); |
-} |
- |
-buildUnnamed328() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed328(core.List<core.String> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- unittest.expect(o[0], unittest.equals('foo')); |
- unittest.expect(o[1], unittest.equals('foo')); |
-} |
- |
-buildUnnamed329() { |
- var o = new core.List<api.ProductTax>(); |
- o.add(buildProductTax()); |
- o.add(buildProductTax()); |
- return o; |
-} |
- |
-checkUnnamed329(core.List<api.ProductTax> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductTax(o[0]); |
- checkProductTax(o[1]); |
-} |
- |
-buildUnnamed330() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed330(core.List<core.String> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- unittest.expect(o[0], unittest.equals('foo')); |
- unittest.expect(o[1], unittest.equals('foo')); |
-} |
- |
-buildUnnamed331() { |
- var o = new core.List<api.Error>(); |
- o.add(buildError()); |
- o.add(buildError()); |
- return o; |
-} |
- |
-checkUnnamed331(core.List<api.Error> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkError(o[0]); |
- checkError(o[1]); |
-} |
- |
-core.int buildCounterProduct = 0; |
-buildProduct() { |
- var o = new api.Product(); |
- buildCounterProduct++; |
- if (buildCounterProduct < 3) { |
- o.additionalImageLinks = buildUnnamed322(); |
- o.adult = true; |
- o.adwordsGrouping = "foo"; |
- o.adwordsLabels = buildUnnamed323(); |
- o.adwordsRedirect = "foo"; |
- o.ageGroup = "foo"; |
- o.availability = "foo"; |
- o.availabilityDate = "foo"; |
- o.brand = "foo"; |
- o.channel = "foo"; |
- o.color = "foo"; |
- o.condition = "foo"; |
- o.contentLanguage = "foo"; |
- o.customAttributes = buildUnnamed324(); |
- o.customGroups = buildUnnamed325(); |
- o.customLabel0 = "foo"; |
- o.customLabel1 = "foo"; |
- o.customLabel2 = "foo"; |
- o.customLabel3 = "foo"; |
- o.customLabel4 = "foo"; |
- o.description = "foo"; |
- o.destinations = buildUnnamed326(); |
- o.energyEfficiencyClass = "foo"; |
- o.expirationDate = "foo"; |
- o.gender = "foo"; |
- o.googleProductCategory = "foo"; |
- o.gtin = "foo"; |
- o.id = "foo"; |
- o.identifierExists = true; |
- o.imageLink = "foo"; |
- o.installment = buildProductInstallment(); |
- o.isBundle = true; |
- o.itemGroupId = "foo"; |
- o.kind = "foo"; |
- o.link = "foo"; |
- o.loyaltyPoints = buildLoyaltyPoints(); |
- o.material = "foo"; |
- o.mobileLink = "foo"; |
- o.mpn = "foo"; |
- o.multipack = "foo"; |
- o.offerId = "foo"; |
- o.onlineOnly = true; |
- o.pattern = "foo"; |
- o.price = buildPrice(); |
- o.productType = "foo"; |
- o.salePrice = buildPrice(); |
- o.salePriceEffectiveDate = "foo"; |
- o.shipping = buildUnnamed327(); |
- o.shippingLabel = "foo"; |
- o.shippingWeight = buildProductShippingWeight(); |
- o.sizeSystem = "foo"; |
- o.sizeType = "foo"; |
- o.sizes = buildUnnamed328(); |
- o.targetCountry = "foo"; |
- o.taxes = buildUnnamed329(); |
- o.title = "foo"; |
- o.unitPricingBaseMeasure = buildProductUnitPricingBaseMeasure(); |
- o.unitPricingMeasure = buildProductUnitPricingMeasure(); |
- o.validatedDestinations = buildUnnamed330(); |
- o.warnings = buildUnnamed331(); |
- } |
- buildCounterProduct--; |
- return o; |
-} |
- |
-checkProduct(api.Product o) { |
- buildCounterProduct++; |
- if (buildCounterProduct < 3) { |
- checkUnnamed322(o.additionalImageLinks); |
- unittest.expect(o.adult, unittest.isTrue); |
- unittest.expect(o.adwordsGrouping, unittest.equals('foo')); |
- checkUnnamed323(o.adwordsLabels); |
- unittest.expect(o.adwordsRedirect, unittest.equals('foo')); |
- unittest.expect(o.ageGroup, unittest.equals('foo')); |
- unittest.expect(o.availability, unittest.equals('foo')); |
- unittest.expect(o.availabilityDate, unittest.equals('foo')); |
- unittest.expect(o.brand, unittest.equals('foo')); |
- unittest.expect(o.channel, unittest.equals('foo')); |
- unittest.expect(o.color, unittest.equals('foo')); |
- unittest.expect(o.condition, unittest.equals('foo')); |
- unittest.expect(o.contentLanguage, unittest.equals('foo')); |
- checkUnnamed324(o.customAttributes); |
- checkUnnamed325(o.customGroups); |
- unittest.expect(o.customLabel0, unittest.equals('foo')); |
- unittest.expect(o.customLabel1, unittest.equals('foo')); |
- unittest.expect(o.customLabel2, unittest.equals('foo')); |
- unittest.expect(o.customLabel3, unittest.equals('foo')); |
- unittest.expect(o.customLabel4, unittest.equals('foo')); |
- unittest.expect(o.description, unittest.equals('foo')); |
- checkUnnamed326(o.destinations); |
- unittest.expect(o.energyEfficiencyClass, unittest.equals('foo')); |
- unittest.expect(o.expirationDate, unittest.equals('foo')); |
- unittest.expect(o.gender, unittest.equals('foo')); |
- unittest.expect(o.googleProductCategory, unittest.equals('foo')); |
- unittest.expect(o.gtin, unittest.equals('foo')); |
- unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.identifierExists, unittest.isTrue); |
- unittest.expect(o.imageLink, unittest.equals('foo')); |
- checkProductInstallment(o.installment); |
- unittest.expect(o.isBundle, unittest.isTrue); |
- unittest.expect(o.itemGroupId, unittest.equals('foo')); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.link, unittest.equals('foo')); |
- checkLoyaltyPoints(o.loyaltyPoints); |
- unittest.expect(o.material, unittest.equals('foo')); |
- unittest.expect(o.mobileLink, unittest.equals('foo')); |
- unittest.expect(o.mpn, unittest.equals('foo')); |
- unittest.expect(o.multipack, unittest.equals('foo')); |
- unittest.expect(o.offerId, unittest.equals('foo')); |
- unittest.expect(o.onlineOnly, unittest.isTrue); |
- unittest.expect(o.pattern, unittest.equals('foo')); |
- checkPrice(o.price); |
- unittest.expect(o.productType, unittest.equals('foo')); |
- checkPrice(o.salePrice); |
- unittest.expect(o.salePriceEffectiveDate, unittest.equals('foo')); |
- checkUnnamed327(o.shipping); |
- unittest.expect(o.shippingLabel, unittest.equals('foo')); |
- checkProductShippingWeight(o.shippingWeight); |
- unittest.expect(o.sizeSystem, unittest.equals('foo')); |
- unittest.expect(o.sizeType, unittest.equals('foo')); |
- checkUnnamed328(o.sizes); |
- unittest.expect(o.targetCountry, unittest.equals('foo')); |
- checkUnnamed329(o.taxes); |
- unittest.expect(o.title, unittest.equals('foo')); |
- checkProductUnitPricingBaseMeasure(o.unitPricingBaseMeasure); |
- checkProductUnitPricingMeasure(o.unitPricingMeasure); |
- checkUnnamed330(o.validatedDestinations); |
- checkUnnamed331(o.warnings); |
- } |
- buildCounterProduct--; |
-} |
- |
-core.int buildCounterProductCustomAttribute = 0; |
-buildProductCustomAttribute() { |
- var o = new api.ProductCustomAttribute(); |
- buildCounterProductCustomAttribute++; |
- if (buildCounterProductCustomAttribute < 3) { |
- o.name = "foo"; |
- o.type = "foo"; |
- o.unit = "foo"; |
- o.value = "foo"; |
- } |
- buildCounterProductCustomAttribute--; |
- return o; |
-} |
- |
-checkProductCustomAttribute(api.ProductCustomAttribute o) { |
- buildCounterProductCustomAttribute++; |
- if (buildCounterProductCustomAttribute < 3) { |
- unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.type, unittest.equals('foo')); |
- unittest.expect(o.unit, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals('foo')); |
- } |
- buildCounterProductCustomAttribute--; |
-} |
- |
-buildUnnamed332() { |
- var o = new core.List<api.ProductCustomAttribute>(); |
- o.add(buildProductCustomAttribute()); |
- o.add(buildProductCustomAttribute()); |
- return o; |
-} |
- |
-checkUnnamed332(core.List<api.ProductCustomAttribute> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductCustomAttribute(o[0]); |
- checkProductCustomAttribute(o[1]); |
-} |
- |
-core.int buildCounterProductCustomGroup = 0; |
-buildProductCustomGroup() { |
- var o = new api.ProductCustomGroup(); |
- buildCounterProductCustomGroup++; |
- if (buildCounterProductCustomGroup < 3) { |
- o.attributes = buildUnnamed332(); |
- o.name = "foo"; |
- } |
- buildCounterProductCustomGroup--; |
- return o; |
-} |
- |
-checkProductCustomGroup(api.ProductCustomGroup o) { |
- buildCounterProductCustomGroup++; |
- if (buildCounterProductCustomGroup < 3) { |
- checkUnnamed332(o.attributes); |
- unittest.expect(o.name, unittest.equals('foo')); |
- } |
- buildCounterProductCustomGroup--; |
-} |
- |
-core.int buildCounterProductDestination = 0; |
-buildProductDestination() { |
- var o = new api.ProductDestination(); |
- buildCounterProductDestination++; |
- if (buildCounterProductDestination < 3) { |
- o.destinationName = "foo"; |
- o.intention = "foo"; |
- } |
- buildCounterProductDestination--; |
- return o; |
-} |
- |
-checkProductDestination(api.ProductDestination o) { |
- buildCounterProductDestination++; |
- if (buildCounterProductDestination < 3) { |
- unittest.expect(o.destinationName, unittest.equals('foo')); |
- unittest.expect(o.intention, unittest.equals('foo')); |
- } |
- buildCounterProductDestination--; |
-} |
- |
-core.int buildCounterProductInstallment = 0; |
-buildProductInstallment() { |
- var o = new api.ProductInstallment(); |
- buildCounterProductInstallment++; |
- if (buildCounterProductInstallment < 3) { |
- o.amount = buildPrice(); |
- o.months = "foo"; |
- } |
- buildCounterProductInstallment--; |
- return o; |
-} |
- |
-checkProductInstallment(api.ProductInstallment o) { |
- buildCounterProductInstallment++; |
- if (buildCounterProductInstallment < 3) { |
- checkPrice(o.amount); |
- unittest.expect(o.months, unittest.equals('foo')); |
- } |
- buildCounterProductInstallment--; |
-} |
- |
-core.int buildCounterProductShipping = 0; |
-buildProductShipping() { |
- var o = new api.ProductShipping(); |
- buildCounterProductShipping++; |
- if (buildCounterProductShipping < 3) { |
- o.country = "foo"; |
- o.locationGroupName = "foo"; |
- o.locationId = "foo"; |
- o.postalCode = "foo"; |
- o.price = buildPrice(); |
- o.region = "foo"; |
- o.service = "foo"; |
- } |
- buildCounterProductShipping--; |
- return o; |
-} |
- |
-checkProductShipping(api.ProductShipping o) { |
- buildCounterProductShipping++; |
- if (buildCounterProductShipping < 3) { |
- unittest.expect(o.country, unittest.equals('foo')); |
- unittest.expect(o.locationGroupName, unittest.equals('foo')); |
- unittest.expect(o.locationId, unittest.equals('foo')); |
- unittest.expect(o.postalCode, unittest.equals('foo')); |
- checkPrice(o.price); |
- unittest.expect(o.region, unittest.equals('foo')); |
- unittest.expect(o.service, unittest.equals('foo')); |
- } |
- buildCounterProductShipping--; |
-} |
- |
-core.int buildCounterProductShippingWeight = 0; |
-buildProductShippingWeight() { |
- var o = new api.ProductShippingWeight(); |
- buildCounterProductShippingWeight++; |
- if (buildCounterProductShippingWeight < 3) { |
- o.unit = "foo"; |
- o.value = 42.0; |
- } |
- buildCounterProductShippingWeight--; |
- return o; |
-} |
- |
-checkProductShippingWeight(api.ProductShippingWeight o) { |
- buildCounterProductShippingWeight++; |
- if (buildCounterProductShippingWeight < 3) { |
- unittest.expect(o.unit, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals(42.0)); |
- } |
- buildCounterProductShippingWeight--; |
-} |
- |
-buildUnnamed333() { |
- var o = new core.List<api.ProductStatusDataQualityIssue>(); |
- o.add(buildProductStatusDataQualityIssue()); |
- o.add(buildProductStatusDataQualityIssue()); |
- return o; |
-} |
- |
-checkUnnamed333(core.List<api.ProductStatusDataQualityIssue> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductStatusDataQualityIssue(o[0]); |
- checkProductStatusDataQualityIssue(o[1]); |
-} |
- |
-buildUnnamed334() { |
- var o = new core.List<api.ProductStatusDestinationStatus>(); |
- o.add(buildProductStatusDestinationStatus()); |
- o.add(buildProductStatusDestinationStatus()); |
- return o; |
-} |
- |
-checkUnnamed334(core.List<api.ProductStatusDestinationStatus> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductStatusDestinationStatus(o[0]); |
- checkProductStatusDestinationStatus(o[1]); |
-} |
- |
-core.int buildCounterProductStatus = 0; |
-buildProductStatus() { |
- var o = new api.ProductStatus(); |
- buildCounterProductStatus++; |
- if (buildCounterProductStatus < 3) { |
- o.dataQualityIssues = buildUnnamed333(); |
- o.destinationStatuses = buildUnnamed334(); |
- o.kind = "foo"; |
- o.link = "foo"; |
- o.productId = "foo"; |
- o.title = "foo"; |
- } |
- buildCounterProductStatus--; |
- return o; |
-} |
- |
-checkProductStatus(api.ProductStatus o) { |
- buildCounterProductStatus++; |
- if (buildCounterProductStatus < 3) { |
- checkUnnamed333(o.dataQualityIssues); |
- checkUnnamed334(o.destinationStatuses); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.link, unittest.equals('foo')); |
- unittest.expect(o.productId, unittest.equals('foo')); |
- unittest.expect(o.title, unittest.equals('foo')); |
- } |
- buildCounterProductStatus--; |
-} |
- |
-core.int buildCounterProductStatusDataQualityIssue = 0; |
-buildProductStatusDataQualityIssue() { |
- var o = new api.ProductStatusDataQualityIssue(); |
- buildCounterProductStatusDataQualityIssue++; |
- if (buildCounterProductStatusDataQualityIssue < 3) { |
- o.detail = "foo"; |
- o.fetchStatus = "foo"; |
- o.id = "foo"; |
- o.location = "foo"; |
- o.timestamp = "foo"; |
- o.valueOnLandingPage = "foo"; |
- o.valueProvided = "foo"; |
- } |
- buildCounterProductStatusDataQualityIssue--; |
- return o; |
-} |
- |
-checkProductStatusDataQualityIssue(api.ProductStatusDataQualityIssue o) { |
- buildCounterProductStatusDataQualityIssue++; |
- if (buildCounterProductStatusDataQualityIssue < 3) { |
- unittest.expect(o.detail, unittest.equals('foo')); |
- unittest.expect(o.fetchStatus, unittest.equals('foo')); |
- unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.location, unittest.equals('foo')); |
- unittest.expect(o.timestamp, unittest.equals('foo')); |
- unittest.expect(o.valueOnLandingPage, unittest.equals('foo')); |
- unittest.expect(o.valueProvided, unittest.equals('foo')); |
- } |
- buildCounterProductStatusDataQualityIssue--; |
-} |
- |
-core.int buildCounterProductStatusDestinationStatus = 0; |
-buildProductStatusDestinationStatus() { |
- var o = new api.ProductStatusDestinationStatus(); |
- buildCounterProductStatusDestinationStatus++; |
- if (buildCounterProductStatusDestinationStatus < 3) { |
- o.approvalStatus = "foo"; |
- o.destination = "foo"; |
- o.intention = "foo"; |
- } |
- buildCounterProductStatusDestinationStatus--; |
- return o; |
-} |
- |
-checkProductStatusDestinationStatus(api.ProductStatusDestinationStatus o) { |
- buildCounterProductStatusDestinationStatus++; |
- if (buildCounterProductStatusDestinationStatus < 3) { |
- unittest.expect(o.approvalStatus, unittest.equals('foo')); |
- unittest.expect(o.destination, unittest.equals('foo')); |
- unittest.expect(o.intention, unittest.equals('foo')); |
- } |
- buildCounterProductStatusDestinationStatus--; |
-} |
- |
-core.int buildCounterProductTax = 0; |
-buildProductTax() { |
- var o = new api.ProductTax(); |
- buildCounterProductTax++; |
- if (buildCounterProductTax < 3) { |
- o.country = "foo"; |
- o.locationId = "foo"; |
- o.postalCode = "foo"; |
- o.rate = 42.0; |
- o.region = "foo"; |
- o.taxShip = true; |
- } |
- buildCounterProductTax--; |
- return o; |
-} |
- |
-checkProductTax(api.ProductTax o) { |
- buildCounterProductTax++; |
- if (buildCounterProductTax < 3) { |
- unittest.expect(o.country, unittest.equals('foo')); |
- unittest.expect(o.locationId, unittest.equals('foo')); |
- unittest.expect(o.postalCode, unittest.equals('foo')); |
- unittest.expect(o.rate, unittest.equals(42.0)); |
- unittest.expect(o.region, unittest.equals('foo')); |
- unittest.expect(o.taxShip, unittest.isTrue); |
- } |
- buildCounterProductTax--; |
-} |
- |
-core.int buildCounterProductUnitPricingBaseMeasure = 0; |
-buildProductUnitPricingBaseMeasure() { |
- var o = new api.ProductUnitPricingBaseMeasure(); |
- buildCounterProductUnitPricingBaseMeasure++; |
- if (buildCounterProductUnitPricingBaseMeasure < 3) { |
- o.unit = "foo"; |
- o.value = "foo"; |
- } |
- buildCounterProductUnitPricingBaseMeasure--; |
- return o; |
-} |
- |
-checkProductUnitPricingBaseMeasure(api.ProductUnitPricingBaseMeasure o) { |
- buildCounterProductUnitPricingBaseMeasure++; |
- if (buildCounterProductUnitPricingBaseMeasure < 3) { |
- unittest.expect(o.unit, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals('foo')); |
- } |
- buildCounterProductUnitPricingBaseMeasure--; |
-} |
- |
-core.int buildCounterProductUnitPricingMeasure = 0; |
-buildProductUnitPricingMeasure() { |
- var o = new api.ProductUnitPricingMeasure(); |
- buildCounterProductUnitPricingMeasure++; |
- if (buildCounterProductUnitPricingMeasure < 3) { |
- o.unit = "foo"; |
- o.value = 42.0; |
- } |
- buildCounterProductUnitPricingMeasure--; |
- return o; |
-} |
- |
-checkProductUnitPricingMeasure(api.ProductUnitPricingMeasure o) { |
- buildCounterProductUnitPricingMeasure++; |
- if (buildCounterProductUnitPricingMeasure < 3) { |
- unittest.expect(o.unit, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals(42.0)); |
- } |
- buildCounterProductUnitPricingMeasure--; |
-} |
- |
-buildUnnamed335() { |
- var o = new core.List<api.ProductsCustomBatchRequestEntry>(); |
- o.add(buildProductsCustomBatchRequestEntry()); |
- o.add(buildProductsCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed335(core.List<api.ProductsCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductsCustomBatchRequestEntry(o[0]); |
- checkProductsCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterProductsCustomBatchRequest = 0; |
-buildProductsCustomBatchRequest() { |
- var o = new api.ProductsCustomBatchRequest(); |
- buildCounterProductsCustomBatchRequest++; |
- if (buildCounterProductsCustomBatchRequest < 3) { |
- o.entries = buildUnnamed335(); |
- } |
- buildCounterProductsCustomBatchRequest--; |
- return o; |
-} |
- |
-checkProductsCustomBatchRequest(api.ProductsCustomBatchRequest o) { |
- buildCounterProductsCustomBatchRequest++; |
- if (buildCounterProductsCustomBatchRequest < 3) { |
- checkUnnamed335(o.entries); |
- } |
- buildCounterProductsCustomBatchRequest--; |
-} |
- |
-core.int buildCounterProductsCustomBatchRequestEntry = 0; |
-buildProductsCustomBatchRequestEntry() { |
- var o = new api.ProductsCustomBatchRequestEntry(); |
- buildCounterProductsCustomBatchRequestEntry++; |
- if (buildCounterProductsCustomBatchRequestEntry < 3) { |
- o.batchId = 42; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- o.product = buildProduct(); |
- o.productId = "foo"; |
- } |
- buildCounterProductsCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkProductsCustomBatchRequestEntry(api.ProductsCustomBatchRequestEntry o) { |
- buildCounterProductsCustomBatchRequestEntry++; |
- if (buildCounterProductsCustomBatchRequestEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- checkProduct(o.product); |
- unittest.expect(o.productId, unittest.equals('foo')); |
- } |
- buildCounterProductsCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed336() { |
- var o = new core.List<api.ProductsCustomBatchResponseEntry>(); |
- o.add(buildProductsCustomBatchResponseEntry()); |
- o.add(buildProductsCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed336(core.List<api.ProductsCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductsCustomBatchResponseEntry(o[0]); |
- checkProductsCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterProductsCustomBatchResponse = 0; |
-buildProductsCustomBatchResponse() { |
- var o = new api.ProductsCustomBatchResponse(); |
- buildCounterProductsCustomBatchResponse++; |
- if (buildCounterProductsCustomBatchResponse < 3) { |
- o.entries = buildUnnamed336(); |
- o.kind = "foo"; |
- } |
- buildCounterProductsCustomBatchResponse--; |
- return o; |
-} |
- |
-checkProductsCustomBatchResponse(api.ProductsCustomBatchResponse o) { |
- buildCounterProductsCustomBatchResponse++; |
- if (buildCounterProductsCustomBatchResponse < 3) { |
- checkUnnamed336(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterProductsCustomBatchResponse--; |
-} |
- |
-core.int buildCounterProductsCustomBatchResponseEntry = 0; |
-buildProductsCustomBatchResponseEntry() { |
- var o = new api.ProductsCustomBatchResponseEntry(); |
- buildCounterProductsCustomBatchResponseEntry++; |
- if (buildCounterProductsCustomBatchResponseEntry < 3) { |
- o.batchId = 42; |
- o.errors = buildErrors(); |
- o.kind = "foo"; |
- o.product = buildProduct(); |
- } |
- buildCounterProductsCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkProductsCustomBatchResponseEntry(api.ProductsCustomBatchResponseEntry o) { |
- buildCounterProductsCustomBatchResponseEntry++; |
- if (buildCounterProductsCustomBatchResponseEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkErrors(o.errors); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- checkProduct(o.product); |
- } |
- buildCounterProductsCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed337() { |
- var o = new core.List<api.Product>(); |
- o.add(buildProduct()); |
- o.add(buildProduct()); |
- return o; |
-} |
- |
-checkUnnamed337(core.List<api.Product> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProduct(o[0]); |
- checkProduct(o[1]); |
-} |
- |
-core.int buildCounterProductsListResponse = 0; |
-buildProductsListResponse() { |
- var o = new api.ProductsListResponse(); |
- buildCounterProductsListResponse++; |
- if (buildCounterProductsListResponse < 3) { |
- o.kind = "foo"; |
- o.nextPageToken = "foo"; |
- o.resources = buildUnnamed337(); |
- } |
- buildCounterProductsListResponse--; |
- return o; |
-} |
- |
-checkProductsListResponse(api.ProductsListResponse o) { |
- buildCounterProductsListResponse++; |
- if (buildCounterProductsListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed337(o.resources); |
- } |
- buildCounterProductsListResponse--; |
-} |
- |
-buildUnnamed338() { |
- var o = new core.List<api.ProductstatusesCustomBatchRequestEntry>(); |
- o.add(buildProductstatusesCustomBatchRequestEntry()); |
- o.add(buildProductstatusesCustomBatchRequestEntry()); |
- return o; |
-} |
- |
-checkUnnamed338(core.List<api.ProductstatusesCustomBatchRequestEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductstatusesCustomBatchRequestEntry(o[0]); |
- checkProductstatusesCustomBatchRequestEntry(o[1]); |
-} |
- |
-core.int buildCounterProductstatusesCustomBatchRequest = 0; |
-buildProductstatusesCustomBatchRequest() { |
- var o = new api.ProductstatusesCustomBatchRequest(); |
- buildCounterProductstatusesCustomBatchRequest++; |
- if (buildCounterProductstatusesCustomBatchRequest < 3) { |
- o.entries = buildUnnamed338(); |
- } |
- buildCounterProductstatusesCustomBatchRequest--; |
- return o; |
-} |
- |
-checkProductstatusesCustomBatchRequest(api.ProductstatusesCustomBatchRequest o) { |
- buildCounterProductstatusesCustomBatchRequest++; |
- if (buildCounterProductstatusesCustomBatchRequest < 3) { |
- checkUnnamed338(o.entries); |
- } |
- buildCounterProductstatusesCustomBatchRequest--; |
-} |
- |
-core.int buildCounterProductstatusesCustomBatchRequestEntry = 0; |
-buildProductstatusesCustomBatchRequestEntry() { |
- var o = new api.ProductstatusesCustomBatchRequestEntry(); |
- buildCounterProductstatusesCustomBatchRequestEntry++; |
- if (buildCounterProductstatusesCustomBatchRequestEntry < 3) { |
- o.batchId = 42; |
- o.merchantId = "foo"; |
- o.method = "foo"; |
- o.productId = "foo"; |
- } |
- buildCounterProductstatusesCustomBatchRequestEntry--; |
- return o; |
-} |
- |
-checkProductstatusesCustomBatchRequestEntry(api.ProductstatusesCustomBatchRequestEntry o) { |
- buildCounterProductstatusesCustomBatchRequestEntry++; |
- if (buildCounterProductstatusesCustomBatchRequestEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- unittest.expect(o.merchantId, unittest.equals('foo')); |
- unittest.expect(o.method, unittest.equals('foo')); |
- unittest.expect(o.productId, unittest.equals('foo')); |
- } |
- buildCounterProductstatusesCustomBatchRequestEntry--; |
-} |
- |
-buildUnnamed339() { |
- var o = new core.List<api.ProductstatusesCustomBatchResponseEntry>(); |
- o.add(buildProductstatusesCustomBatchResponseEntry()); |
- o.add(buildProductstatusesCustomBatchResponseEntry()); |
- return o; |
-} |
- |
-checkUnnamed339(core.List<api.ProductstatusesCustomBatchResponseEntry> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductstatusesCustomBatchResponseEntry(o[0]); |
- checkProductstatusesCustomBatchResponseEntry(o[1]); |
-} |
- |
-core.int buildCounterProductstatusesCustomBatchResponse = 0; |
-buildProductstatusesCustomBatchResponse() { |
- var o = new api.ProductstatusesCustomBatchResponse(); |
- buildCounterProductstatusesCustomBatchResponse++; |
- if (buildCounterProductstatusesCustomBatchResponse < 3) { |
- o.entries = buildUnnamed339(); |
- o.kind = "foo"; |
- } |
- buildCounterProductstatusesCustomBatchResponse--; |
- return o; |
-} |
- |
-checkProductstatusesCustomBatchResponse(api.ProductstatusesCustomBatchResponse o) { |
- buildCounterProductstatusesCustomBatchResponse++; |
- if (buildCounterProductstatusesCustomBatchResponse < 3) { |
- checkUnnamed339(o.entries); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- } |
- buildCounterProductstatusesCustomBatchResponse--; |
-} |
- |
-core.int buildCounterProductstatusesCustomBatchResponseEntry = 0; |
-buildProductstatusesCustomBatchResponseEntry() { |
- var o = new api.ProductstatusesCustomBatchResponseEntry(); |
- buildCounterProductstatusesCustomBatchResponseEntry++; |
- if (buildCounterProductstatusesCustomBatchResponseEntry < 3) { |
- o.batchId = 42; |
- o.errors = buildErrors(); |
- o.kind = "foo"; |
- o.productStatus = buildProductStatus(); |
- } |
- buildCounterProductstatusesCustomBatchResponseEntry--; |
- return o; |
-} |
- |
-checkProductstatusesCustomBatchResponseEntry(api.ProductstatusesCustomBatchResponseEntry o) { |
- buildCounterProductstatusesCustomBatchResponseEntry++; |
- if (buildCounterProductstatusesCustomBatchResponseEntry < 3) { |
- unittest.expect(o.batchId, unittest.equals(42)); |
- checkErrors(o.errors); |
- unittest.expect(o.kind, unittest.equals('foo')); |
- checkProductStatus(o.productStatus); |
- } |
- buildCounterProductstatusesCustomBatchResponseEntry--; |
-} |
- |
-buildUnnamed340() { |
- var o = new core.List<api.ProductStatus>(); |
- o.add(buildProductStatus()); |
- o.add(buildProductStatus()); |
- return o; |
-} |
- |
-checkUnnamed340(core.List<api.ProductStatus> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkProductStatus(o[0]); |
- checkProductStatus(o[1]); |
-} |
- |
-core.int buildCounterProductstatusesListResponse = 0; |
-buildProductstatusesListResponse() { |
- var o = new api.ProductstatusesListResponse(); |
- buildCounterProductstatusesListResponse++; |
- if (buildCounterProductstatusesListResponse < 3) { |
- o.kind = "foo"; |
- o.nextPageToken = "foo"; |
- o.resources = buildUnnamed340(); |
- } |
- buildCounterProductstatusesListResponse--; |
- return o; |
-} |
- |
-checkProductstatusesListResponse(api.ProductstatusesListResponse o) { |
- buildCounterProductstatusesListResponse++; |
- if (buildCounterProductstatusesListResponse < 3) { |
- unittest.expect(o.kind, unittest.equals('foo')); |
- unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed340(o.resources); |
- } |
- buildCounterProductstatusesListResponse--; |
-} |
- |
- |
-main() { |
- unittest.group("obj-schema-Account", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccount(); |
- var od = new api.Account.fromJson(o.toJson()); |
- checkAccount(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountAdwordsLink", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountAdwordsLink(); |
- var od = new api.AccountAdwordsLink.fromJson(o.toJson()); |
- checkAccountAdwordsLink(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountStatus", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountStatus(); |
- var od = new api.AccountStatus.fromJson(o.toJson()); |
- checkAccountStatus(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountStatusDataQualityIssue", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountStatusDataQualityIssue(); |
- var od = new api.AccountStatusDataQualityIssue.fromJson(o.toJson()); |
- checkAccountStatusDataQualityIssue(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountStatusExampleItem", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountStatusExampleItem(); |
- var od = new api.AccountStatusExampleItem.fromJson(o.toJson()); |
- checkAccountStatusExampleItem(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountUser", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountUser(); |
- var od = new api.AccountUser.fromJson(o.toJson()); |
- checkAccountUser(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountsCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountsCustomBatchRequest(); |
- var od = new api.AccountsCustomBatchRequest.fromJson(o.toJson()); |
- checkAccountsCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountsCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountsCustomBatchRequestEntry(); |
- var od = new api.AccountsCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkAccountsCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountsCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountsCustomBatchResponse(); |
- var od = new api.AccountsCustomBatchResponse.fromJson(o.toJson()); |
- checkAccountsCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountsCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountsCustomBatchResponseEntry(); |
- var od = new api.AccountsCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkAccountsCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountsListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountsListResponse(); |
- var od = new api.AccountsListResponse.fromJson(o.toJson()); |
- checkAccountsListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountstatusesCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountstatusesCustomBatchRequest(); |
- var od = new api.AccountstatusesCustomBatchRequest.fromJson(o.toJson()); |
- checkAccountstatusesCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountstatusesCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountstatusesCustomBatchRequestEntry(); |
- var od = new api.AccountstatusesCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkAccountstatusesCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountstatusesCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountstatusesCustomBatchResponse(); |
- var od = new api.AccountstatusesCustomBatchResponse.fromJson(o.toJson()); |
- checkAccountstatusesCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountstatusesCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountstatusesCustomBatchResponseEntry(); |
- var od = new api.AccountstatusesCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkAccountstatusesCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-AccountstatusesListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildAccountstatusesListResponse(); |
- var od = new api.AccountstatusesListResponse.fromJson(o.toJson()); |
- checkAccountstatusesListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Datafeed", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeed(); |
- var od = new api.Datafeed.fromJson(o.toJson()); |
- checkDatafeed(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedFetchSchedule", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedFetchSchedule(); |
- var od = new api.DatafeedFetchSchedule.fromJson(o.toJson()); |
- checkDatafeedFetchSchedule(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedFormat", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedFormat(); |
- var od = new api.DatafeedFormat.fromJson(o.toJson()); |
- checkDatafeedFormat(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedStatus", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedStatus(); |
- var od = new api.DatafeedStatus.fromJson(o.toJson()); |
- checkDatafeedStatus(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedStatusError", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedStatusError(); |
- var od = new api.DatafeedStatusError.fromJson(o.toJson()); |
- checkDatafeedStatusError(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedStatusExample", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedStatusExample(); |
- var od = new api.DatafeedStatusExample.fromJson(o.toJson()); |
- checkDatafeedStatusExample(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedsCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedsCustomBatchRequest(); |
- var od = new api.DatafeedsCustomBatchRequest.fromJson(o.toJson()); |
- checkDatafeedsCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedsCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedsCustomBatchRequestEntry(); |
- var od = new api.DatafeedsCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkDatafeedsCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedsCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedsCustomBatchResponse(); |
- var od = new api.DatafeedsCustomBatchResponse.fromJson(o.toJson()); |
- checkDatafeedsCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedsCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedsCustomBatchResponseEntry(); |
- var od = new api.DatafeedsCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkDatafeedsCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedsListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedsListResponse(); |
- var od = new api.DatafeedsListResponse.fromJson(o.toJson()); |
- checkDatafeedsListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedstatusesCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedstatusesCustomBatchRequest(); |
- var od = new api.DatafeedstatusesCustomBatchRequest.fromJson(o.toJson()); |
- checkDatafeedstatusesCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedstatusesCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedstatusesCustomBatchRequestEntry(); |
- var od = new api.DatafeedstatusesCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkDatafeedstatusesCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedstatusesCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedstatusesCustomBatchResponse(); |
- var od = new api.DatafeedstatusesCustomBatchResponse.fromJson(o.toJson()); |
- checkDatafeedstatusesCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedstatusesCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedstatusesCustomBatchResponseEntry(); |
- var od = new api.DatafeedstatusesCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkDatafeedstatusesCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-DatafeedstatusesListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDatafeedstatusesListResponse(); |
- var od = new api.DatafeedstatusesListResponse.fromJson(o.toJson()); |
- checkDatafeedstatusesListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Error", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildError(); |
- var od = new api.Error.fromJson(o.toJson()); |
- checkError(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Errors", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildErrors(); |
- var od = new api.Errors.fromJson(o.toJson()); |
- checkErrors(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Inventory", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventory(); |
- var od = new api.Inventory.fromJson(o.toJson()); |
- checkInventory(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventoryCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventoryCustomBatchRequest(); |
- var od = new api.InventoryCustomBatchRequest.fromJson(o.toJson()); |
- checkInventoryCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventoryCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventoryCustomBatchRequestEntry(); |
- var od = new api.InventoryCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkInventoryCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventoryCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventoryCustomBatchResponse(); |
- var od = new api.InventoryCustomBatchResponse.fromJson(o.toJson()); |
- checkInventoryCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventoryCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventoryCustomBatchResponseEntry(); |
- var od = new api.InventoryCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkInventoryCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventorySetRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventorySetRequest(); |
- var od = new api.InventorySetRequest.fromJson(o.toJson()); |
- checkInventorySetRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-InventorySetResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildInventorySetResponse(); |
- var od = new api.InventorySetResponse.fromJson(o.toJson()); |
- checkInventorySetResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-LoyaltyPoints", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildLoyaltyPoints(); |
- var od = new api.LoyaltyPoints.fromJson(o.toJson()); |
- checkLoyaltyPoints(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Price", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildPrice(); |
- var od = new api.Price.fromJson(o.toJson()); |
- checkPrice(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Product", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProduct(); |
- var od = new api.Product.fromJson(o.toJson()); |
- checkProduct(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductCustomAttribute", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductCustomAttribute(); |
- var od = new api.ProductCustomAttribute.fromJson(o.toJson()); |
- checkProductCustomAttribute(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductCustomGroup", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductCustomGroup(); |
- var od = new api.ProductCustomGroup.fromJson(o.toJson()); |
- checkProductCustomGroup(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductDestination", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductDestination(); |
- var od = new api.ProductDestination.fromJson(o.toJson()); |
- checkProductDestination(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductInstallment", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductInstallment(); |
- var od = new api.ProductInstallment.fromJson(o.toJson()); |
- checkProductInstallment(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductShipping", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductShipping(); |
- var od = new api.ProductShipping.fromJson(o.toJson()); |
- checkProductShipping(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductShippingWeight", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductShippingWeight(); |
- var od = new api.ProductShippingWeight.fromJson(o.toJson()); |
- checkProductShippingWeight(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductStatus", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductStatus(); |
- var od = new api.ProductStatus.fromJson(o.toJson()); |
- checkProductStatus(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductStatusDataQualityIssue", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductStatusDataQualityIssue(); |
- var od = new api.ProductStatusDataQualityIssue.fromJson(o.toJson()); |
- checkProductStatusDataQualityIssue(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductStatusDestinationStatus", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductStatusDestinationStatus(); |
- var od = new api.ProductStatusDestinationStatus.fromJson(o.toJson()); |
- checkProductStatusDestinationStatus(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductTax", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductTax(); |
- var od = new api.ProductTax.fromJson(o.toJson()); |
- checkProductTax(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductUnitPricingBaseMeasure", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductUnitPricingBaseMeasure(); |
- var od = new api.ProductUnitPricingBaseMeasure.fromJson(o.toJson()); |
- checkProductUnitPricingBaseMeasure(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductUnitPricingMeasure", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductUnitPricingMeasure(); |
- var od = new api.ProductUnitPricingMeasure.fromJson(o.toJson()); |
- checkProductUnitPricingMeasure(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductsCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductsCustomBatchRequest(); |
- var od = new api.ProductsCustomBatchRequest.fromJson(o.toJson()); |
- checkProductsCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductsCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductsCustomBatchRequestEntry(); |
- var od = new api.ProductsCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkProductsCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductsCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductsCustomBatchResponse(); |
- var od = new api.ProductsCustomBatchResponse.fromJson(o.toJson()); |
- checkProductsCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductsCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductsCustomBatchResponseEntry(); |
- var od = new api.ProductsCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkProductsCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductsListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductsListResponse(); |
- var od = new api.ProductsListResponse.fromJson(o.toJson()); |
- checkProductsListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductstatusesCustomBatchRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductstatusesCustomBatchRequest(); |
- var od = new api.ProductstatusesCustomBatchRequest.fromJson(o.toJson()); |
- checkProductstatusesCustomBatchRequest(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductstatusesCustomBatchRequestEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductstatusesCustomBatchRequestEntry(); |
- var od = new api.ProductstatusesCustomBatchRequestEntry.fromJson(o.toJson()); |
- checkProductstatusesCustomBatchRequestEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductstatusesCustomBatchResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductstatusesCustomBatchResponse(); |
- var od = new api.ProductstatusesCustomBatchResponse.fromJson(o.toJson()); |
- checkProductstatusesCustomBatchResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductstatusesCustomBatchResponseEntry", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductstatusesCustomBatchResponseEntry(); |
- var od = new api.ProductstatusesCustomBatchResponseEntry.fromJson(o.toJson()); |
- checkProductstatusesCustomBatchResponseEntry(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-ProductstatusesListResponse", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildProductstatusesListResponse(); |
- var od = new api.ProductstatusesListResponse.fromJson(o.toJson()); |
- checkProductstatusesListResponse(od); |
- }); |
- }); |
- |
- |
- unittest.group("resource-AccountsResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_request = buildAccountsCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.AccountsCustomBatchRequest.fromJson(json); |
- checkAccountsCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.equals("accounts/batch")); |
- pathOffset += 14; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccountsCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.AccountsCustomBatchResponse response) { |
- checkAccountsCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--delete", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_merchantId = "foo"; |
- var arg_accountId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- 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_accountId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.delete(arg_merchantId, arg_accountId).then(unittest.expectAsync((_) {})); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_merchantId = "foo"; |
- var arg_accountId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- 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_accountId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccount()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_accountId).then(unittest.expectAsync(((api.Account response) { |
- checkAccount(response); |
- }))); |
- }); |
- |
- unittest.test("method--insert", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_request = buildAccount(); |
- var arg_merchantId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Account.fromJson(json); |
- checkAccount(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/accounts")); |
- pathOffset += 9; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccount()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.insert(arg_request, arg_merchantId).then(unittest.expectAsync(((api.Account response) { |
- checkAccount(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_merchantId = "foo"; |
- var arg_maxResults = 42; |
- var arg_pageToken = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/accounts")); |
- pathOffset += 9; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- 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)); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccountsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AccountsListResponse response) { |
- checkAccountsListResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--patch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_request = buildAccount(); |
- var arg_merchantId = "foo"; |
- var arg_accountId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Account.fromJson(json); |
- checkAccount(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- 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_accountId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccount()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.patch(arg_request, arg_merchantId, arg_accountId).then(unittest.expectAsync(((api.Account response) { |
- checkAccount(response); |
- }))); |
- }); |
- |
- unittest.test("method--update", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountsResourceApi res = new api.ContentApi(mock).accounts; |
- var arg_request = buildAccount(); |
- var arg_merchantId = "foo"; |
- var arg_accountId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Account.fromJson(json); |
- checkAccount(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- 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_merchantId")); |
- 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_accountId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccount()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.update(arg_request, arg_merchantId, arg_accountId).then(unittest.expectAsync(((api.Account response) { |
- checkAccount(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-AccountstatusesResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountstatusesResourceApi res = new api.ContentApi(mock).accountstatuses; |
- var arg_request = buildAccountstatusesCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.AccountstatusesCustomBatchRequest.fromJson(json); |
- checkAccountstatusesCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("accountstatuses/batch")); |
- pathOffset += 21; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccountstatusesCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.AccountstatusesCustomBatchResponse response) { |
- checkAccountstatusesCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountstatusesResourceApi res = new api.ContentApi(mock).accountstatuses; |
- var arg_merchantId = "foo"; |
- var arg_accountId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/accountstatuses/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("/accountstatuses/")); |
- pathOffset += 17; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_accountId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccountStatus()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_accountId).then(unittest.expectAsync(((api.AccountStatus response) { |
- checkAccountStatus(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.AccountstatusesResourceApi res = new api.ContentApi(mock).accountstatuses; |
- var arg_merchantId = "foo"; |
- var arg_maxResults = 42; |
- var arg_pageToken = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/accountstatuses", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.equals("/accountstatuses")); |
- pathOffset += 16; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- 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)); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildAccountstatusesListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AccountstatusesListResponse response) { |
- checkAccountstatusesListResponse(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-DatafeedsResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_request = buildDatafeedsCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.DatafeedsCustomBatchRequest.fromJson(json); |
- checkDatafeedsCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("datafeeds/batch")); |
- pathOffset += 15; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeedsCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.DatafeedsCustomBatchResponse response) { |
- checkDatafeedsCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--delete", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_merchantId = "foo"; |
- var arg_datafeedId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/datafeeds/")); |
- pathOffset += 11; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_datafeedId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.delete(arg_merchantId, arg_datafeedId).then(unittest.expectAsync((_) {})); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_merchantId = "foo"; |
- var arg_datafeedId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/datafeeds/")); |
- pathOffset += 11; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_datafeedId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeed()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_datafeedId).then(unittest.expectAsync(((api.Datafeed response) { |
- checkDatafeed(response); |
- }))); |
- }); |
- |
- unittest.test("method--insert", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_request = buildDatafeed(); |
- var arg_merchantId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Datafeed.fromJson(json); |
- checkDatafeed(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/datafeeds")); |
- pathOffset += 10; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeed()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.insert(arg_request, arg_merchantId).then(unittest.expectAsync(((api.Datafeed response) { |
- checkDatafeed(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_merchantId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/datafeeds")); |
- pathOffset += 10; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeedsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId).then(unittest.expectAsync(((api.DatafeedsListResponse response) { |
- checkDatafeedsListResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--patch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_request = buildDatafeed(); |
- var arg_merchantId = "foo"; |
- var arg_datafeedId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Datafeed.fromJson(json); |
- checkDatafeed(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/datafeeds/")); |
- pathOffset += 11; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_datafeedId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeed()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.patch(arg_request, arg_merchantId, arg_datafeedId).then(unittest.expectAsync(((api.Datafeed response) { |
- checkDatafeed(response); |
- }))); |
- }); |
- |
- unittest.test("method--update", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedsResourceApi res = new api.ContentApi(mock).datafeeds; |
- var arg_request = buildDatafeed(); |
- var arg_merchantId = "foo"; |
- var arg_datafeedId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Datafeed.fromJson(json); |
- checkDatafeed(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeeds/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/datafeeds/")); |
- pathOffset += 11; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_datafeedId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeed()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.update(arg_request, arg_merchantId, arg_datafeedId).then(unittest.expectAsync(((api.Datafeed response) { |
- checkDatafeed(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-DatafeedstatusesResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedstatusesResourceApi res = new api.ContentApi(mock).datafeedstatuses; |
- var arg_request = buildDatafeedstatusesCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.DatafeedstatusesCustomBatchRequest.fromJson(json); |
- checkDatafeedstatusesCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.equals("datafeedstatuses/batch")); |
- pathOffset += 22; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeedstatusesCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.DatafeedstatusesCustomBatchResponse response) { |
- checkDatafeedstatusesCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedstatusesResourceApi res = new api.ContentApi(mock).datafeedstatuses; |
- var arg_merchantId = "foo"; |
- var arg_datafeedId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeedstatuses/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/datafeedstatuses/")); |
- pathOffset += 18; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_datafeedId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeedStatus()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_datafeedId).then(unittest.expectAsync(((api.DatafeedStatus response) { |
- checkDatafeedStatus(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.DatafeedstatusesResourceApi res = new api.ContentApi(mock).datafeedstatuses; |
- var arg_merchantId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/datafeedstatuses", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("/datafeedstatuses")); |
- pathOffset += 17; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildDatafeedstatusesListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId).then(unittest.expectAsync(((api.DatafeedstatusesListResponse response) { |
- checkDatafeedstatusesListResponse(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-InventoryResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.InventoryResourceApi res = new api.ContentApi(mock).inventory; |
- var arg_request = buildInventoryCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.InventoryCustomBatchRequest.fromJson(json); |
- checkInventoryCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("inventory/batch")); |
- pathOffset += 15; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildInventoryCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.InventoryCustomBatchResponse response) { |
- checkInventoryCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--set", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.InventoryResourceApi res = new api.ContentApi(mock).inventory; |
- var arg_request = buildInventorySetRequest(); |
- var arg_merchantId = "foo"; |
- var arg_storeCode = "foo"; |
- var arg_productId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.InventorySetRequest.fromJson(json); |
- checkInventorySetRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/inventory/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/inventory/")); |
- pathOffset += 11; |
- index = path.indexOf("/products/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_storeCode")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/products/")); |
- pathOffset += 10; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_productId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildInventorySetResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.set(arg_request, arg_merchantId, arg_storeCode, arg_productId).then(unittest.expectAsync(((api.InventorySetResponse response) { |
- checkInventorySetResponse(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-ProductsResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductsResourceApi res = new api.ContentApi(mock).products; |
- var arg_request = buildProductsCustomBatchRequest(); |
- var arg_dryRun = true; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.ProductsCustomBatchRequest.fromJson(json); |
- checkProductsCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.equals("products/batch")); |
- pathOffset += 14; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- unittest.expect(queryMap["dryRun"].first, unittest.equals("$arg_dryRun")); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProductsCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request, dryRun: arg_dryRun).then(unittest.expectAsync(((api.ProductsCustomBatchResponse response) { |
- checkProductsCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--delete", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductsResourceApi res = new api.ContentApi(mock).products; |
- var arg_merchantId = "foo"; |
- var arg_productId = "foo"; |
- var arg_dryRun = true; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/products/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/products/")); |
- pathOffset += 10; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_productId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- unittest.expect(queryMap["dryRun"].first, unittest.equals("$arg_dryRun")); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.delete(arg_merchantId, arg_productId, dryRun: arg_dryRun).then(unittest.expectAsync((_) {})); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductsResourceApi res = new api.ContentApi(mock).products; |
- var arg_merchantId = "foo"; |
- var arg_productId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/products/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/products/")); |
- pathOffset += 10; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_productId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProduct()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_productId).then(unittest.expectAsync(((api.Product response) { |
- checkProduct(response); |
- }))); |
- }); |
- |
- unittest.test("method--insert", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductsResourceApi res = new api.ContentApi(mock).products; |
- var arg_request = buildProduct(); |
- var arg_merchantId = "foo"; |
- var arg_dryRun = true; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.Product.fromJson(json); |
- checkProduct(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/products", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/products")); |
- pathOffset += 9; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- unittest.expect(queryMap["dryRun"].first, unittest.equals("$arg_dryRun")); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProduct()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.insert(arg_request, arg_merchantId, dryRun: arg_dryRun).then(unittest.expectAsync(((api.Product response) { |
- checkProduct(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductsResourceApi res = new api.ContentApi(mock).products; |
- var arg_merchantId = "foo"; |
- var arg_maxResults = 42; |
- var arg_pageToken = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/products", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/products")); |
- pathOffset += 9; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- 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)); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProductsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ProductsListResponse response) { |
- checkProductsListResponse(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
- unittest.group("resource-ProductstatusesResourceApi", () { |
- unittest.test("method--custombatch", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductstatusesResourceApi res = new api.ContentApi(mock).productstatuses; |
- var arg_request = buildProductstatusesCustomBatchRequest(); |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.ProductstatusesCustomBatchRequest.fromJson(json); |
- checkProductstatusesCustomBatchRequest(obj); |
- |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("productstatuses/batch")); |
- pathOffset += 21; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProductstatusesCustomBatchResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.custombatch(arg_request).then(unittest.expectAsync(((api.ProductstatusesCustomBatchResponse response) { |
- checkProductstatusesCustomBatchResponse(response); |
- }))); |
- }); |
- |
- unittest.test("method--get", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductstatusesResourceApi res = new api.ContentApi(mock).productstatuses; |
- var arg_merchantId = "foo"; |
- var arg_productId = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/productstatuses/", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("/productstatuses/")); |
- pathOffset += 17; |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
- pathOffset = path.length; |
- unittest.expect(subPart, unittest.equals("$arg_productId")); |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- for (var part in query.split("&")) { |
- var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
- } |
- } |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProductStatus()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.get(arg_merchantId, arg_productId).then(unittest.expectAsync(((api.ProductStatus response) { |
- checkProductStatus(response); |
- }))); |
- }); |
- |
- unittest.test("method--list", () { |
- |
- var mock = new common_test.HttpServerMock(); |
- api.ProductstatusesResourceApi res = new api.ContentApi(mock).productstatuses; |
- var arg_merchantId = "foo"; |
- var arg_maxResults = 42; |
- var arg_pageToken = "foo"; |
- mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var path = (req.url).path; |
- var pathOffset = 0; |
- var index; |
- var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/content/v2/")); |
- pathOffset += 12; |
- index = path.indexOf("/productstatuses", pathOffset); |
- unittest.expect(index >= 0, unittest.isTrue); |
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
- pathOffset = index; |
- unittest.expect(subPart, unittest.equals("$arg_merchantId")); |
- unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.equals("/productstatuses")); |
- pathOffset += 16; |
- |
- var query = (req.url).query; |
- var queryOffset = 0; |
- var queryMap = {}; |
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
- parseBool(n) { |
- if (n == "true") return true; |
- if (n == "false") return false; |
- if (n == null) return null; |
- throw new core.ArgumentError("Invalid boolean: $n"); |
- } |
- if (query.length > 0) { |
- 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)); |
- |
- |
- var h = { |
- "content-type" : "application/json; charset=utf-8", |
- }; |
- var resp = convert.JSON.encode(buildProductstatusesListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
- }), true); |
- res.list(arg_merchantId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ProductstatusesListResponse response) { |
- checkProductstatusesListResponse(response); |
- }))); |
- }); |
- |
- }); |
- |
- |
-} |
- |