| Index: generated/googleapis/test/reseller/v1.dart
|
| diff --git a/generated/googleapis/test/reseller/v1.dart b/generated/googleapis/test/reseller/v1.dart
|
| deleted file mode 100644
|
| index 3919a86ff451a12251e7b2b0282fd951b69f1605..0000000000000000000000000000000000000000
|
| --- a/generated/googleapis/test/reseller/v1.dart
|
| +++ /dev/null
|
| @@ -1,1097 +0,0 @@
|
| -library googleapis.reseller.v1.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/reseller/v1.dart' as api;
|
| -
|
| -
|
| -
|
| -core.int buildCounterAddress = 0;
|
| -buildAddress() {
|
| - var o = new api.Address();
|
| - buildCounterAddress++;
|
| - if (buildCounterAddress < 3) {
|
| - o.addressLine1 = "foo";
|
| - o.addressLine2 = "foo";
|
| - o.addressLine3 = "foo";
|
| - o.contactName = "foo";
|
| - o.countryCode = "foo";
|
| - o.kind = "foo";
|
| - o.locality = "foo";
|
| - o.organizationName = "foo";
|
| - o.postalCode = "foo";
|
| - o.region = "foo";
|
| - }
|
| - buildCounterAddress--;
|
| - return o;
|
| -}
|
| -
|
| -checkAddress(api.Address o) {
|
| - buildCounterAddress++;
|
| - if (buildCounterAddress < 3) {
|
| - unittest.expect(o.addressLine1, unittest.equals('foo'));
|
| - unittest.expect(o.addressLine2, unittest.equals('foo'));
|
| - unittest.expect(o.addressLine3, unittest.equals('foo'));
|
| - unittest.expect(o.contactName, unittest.equals('foo'));
|
| - unittest.expect(o.countryCode, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.locality, unittest.equals('foo'));
|
| - unittest.expect(o.organizationName, unittest.equals('foo'));
|
| - unittest.expect(o.postalCode, unittest.equals('foo'));
|
| - unittest.expect(o.region, unittest.equals('foo'));
|
| - }
|
| - buildCounterAddress--;
|
| -}
|
| -
|
| -core.int buildCounterChangePlanRequest = 0;
|
| -buildChangePlanRequest() {
|
| - var o = new api.ChangePlanRequest();
|
| - buildCounterChangePlanRequest++;
|
| - if (buildCounterChangePlanRequest < 3) {
|
| - o.kind = "foo";
|
| - o.planName = "foo";
|
| - o.purchaseOrderId = "foo";
|
| - o.seats = buildSeats();
|
| - }
|
| - buildCounterChangePlanRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkChangePlanRequest(api.ChangePlanRequest o) {
|
| - buildCounterChangePlanRequest++;
|
| - if (buildCounterChangePlanRequest < 3) {
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.planName, unittest.equals('foo'));
|
| - unittest.expect(o.purchaseOrderId, unittest.equals('foo'));
|
| - checkSeats(o.seats);
|
| - }
|
| - buildCounterChangePlanRequest--;
|
| -}
|
| -
|
| -core.int buildCounterCustomer = 0;
|
| -buildCustomer() {
|
| - var o = new api.Customer();
|
| - buildCounterCustomer++;
|
| - if (buildCounterCustomer < 3) {
|
| - o.alternateEmail = "foo";
|
| - o.customerDomain = "foo";
|
| - o.customerId = "foo";
|
| - o.kind = "foo";
|
| - o.phoneNumber = "foo";
|
| - o.postalAddress = buildAddress();
|
| - o.resourceUiUrl = "foo";
|
| - }
|
| - buildCounterCustomer--;
|
| - return o;
|
| -}
|
| -
|
| -checkCustomer(api.Customer o) {
|
| - buildCounterCustomer++;
|
| - if (buildCounterCustomer < 3) {
|
| - unittest.expect(o.alternateEmail, unittest.equals('foo'));
|
| - unittest.expect(o.customerDomain, unittest.equals('foo'));
|
| - unittest.expect(o.customerId, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.phoneNumber, unittest.equals('foo'));
|
| - checkAddress(o.postalAddress);
|
| - unittest.expect(o.resourceUiUrl, unittest.equals('foo'));
|
| - }
|
| - buildCounterCustomer--;
|
| -}
|
| -
|
| -core.int buildCounterRenewalSettings = 0;
|
| -buildRenewalSettings() {
|
| - var o = new api.RenewalSettings();
|
| - buildCounterRenewalSettings++;
|
| - if (buildCounterRenewalSettings < 3) {
|
| - o.kind = "foo";
|
| - o.renewalType = "foo";
|
| - }
|
| - buildCounterRenewalSettings--;
|
| - return o;
|
| -}
|
| -
|
| -checkRenewalSettings(api.RenewalSettings o) {
|
| - buildCounterRenewalSettings++;
|
| - if (buildCounterRenewalSettings < 3) {
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.renewalType, unittest.equals('foo'));
|
| - }
|
| - buildCounterRenewalSettings--;
|
| -}
|
| -
|
| -core.int buildCounterSeats = 0;
|
| -buildSeats() {
|
| - var o = new api.Seats();
|
| - buildCounterSeats++;
|
| - if (buildCounterSeats < 3) {
|
| - o.kind = "foo";
|
| - o.maximumNumberOfSeats = 42;
|
| - o.numberOfSeats = 42;
|
| - }
|
| - buildCounterSeats--;
|
| - return o;
|
| -}
|
| -
|
| -checkSeats(api.Seats o) {
|
| - buildCounterSeats++;
|
| - if (buildCounterSeats < 3) {
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.maximumNumberOfSeats, unittest.equals(42));
|
| - unittest.expect(o.numberOfSeats, unittest.equals(42));
|
| - }
|
| - buildCounterSeats--;
|
| -}
|
| -
|
| -core.int buildCounterSubscriptionPlanCommitmentInterval = 0;
|
| -buildSubscriptionPlanCommitmentInterval() {
|
| - var o = new api.SubscriptionPlanCommitmentInterval();
|
| - buildCounterSubscriptionPlanCommitmentInterval++;
|
| - if (buildCounterSubscriptionPlanCommitmentInterval < 3) {
|
| - o.endTime = "foo";
|
| - o.startTime = "foo";
|
| - }
|
| - buildCounterSubscriptionPlanCommitmentInterval--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscriptionPlanCommitmentInterval(api.SubscriptionPlanCommitmentInterval o) {
|
| - buildCounterSubscriptionPlanCommitmentInterval++;
|
| - if (buildCounterSubscriptionPlanCommitmentInterval < 3) {
|
| - unittest.expect(o.endTime, unittest.equals('foo'));
|
| - unittest.expect(o.startTime, unittest.equals('foo'));
|
| - }
|
| - buildCounterSubscriptionPlanCommitmentInterval--;
|
| -}
|
| -
|
| -core.int buildCounterSubscriptionPlan = 0;
|
| -buildSubscriptionPlan() {
|
| - var o = new api.SubscriptionPlan();
|
| - buildCounterSubscriptionPlan++;
|
| - if (buildCounterSubscriptionPlan < 3) {
|
| - o.commitmentInterval = buildSubscriptionPlanCommitmentInterval();
|
| - o.isCommitmentPlan = true;
|
| - o.planName = "foo";
|
| - }
|
| - buildCounterSubscriptionPlan--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscriptionPlan(api.SubscriptionPlan o) {
|
| - buildCounterSubscriptionPlan++;
|
| - if (buildCounterSubscriptionPlan < 3) {
|
| - checkSubscriptionPlanCommitmentInterval(o.commitmentInterval);
|
| - unittest.expect(o.isCommitmentPlan, unittest.isTrue);
|
| - unittest.expect(o.planName, unittest.equals('foo'));
|
| - }
|
| - buildCounterSubscriptionPlan--;
|
| -}
|
| -
|
| -core.int buildCounterSubscriptionTransferInfo = 0;
|
| -buildSubscriptionTransferInfo() {
|
| - var o = new api.SubscriptionTransferInfo();
|
| - buildCounterSubscriptionTransferInfo++;
|
| - if (buildCounterSubscriptionTransferInfo < 3) {
|
| - o.minimumTransferableSeats = 42;
|
| - o.transferabilityExpirationTime = "foo";
|
| - }
|
| - buildCounterSubscriptionTransferInfo--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscriptionTransferInfo(api.SubscriptionTransferInfo o) {
|
| - buildCounterSubscriptionTransferInfo++;
|
| - if (buildCounterSubscriptionTransferInfo < 3) {
|
| - unittest.expect(o.minimumTransferableSeats, unittest.equals(42));
|
| - unittest.expect(o.transferabilityExpirationTime, unittest.equals('foo'));
|
| - }
|
| - buildCounterSubscriptionTransferInfo--;
|
| -}
|
| -
|
| -core.int buildCounterSubscriptionTrialSettings = 0;
|
| -buildSubscriptionTrialSettings() {
|
| - var o = new api.SubscriptionTrialSettings();
|
| - buildCounterSubscriptionTrialSettings++;
|
| - if (buildCounterSubscriptionTrialSettings < 3) {
|
| - o.isInTrial = true;
|
| - o.trialEndTime = "foo";
|
| - }
|
| - buildCounterSubscriptionTrialSettings--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscriptionTrialSettings(api.SubscriptionTrialSettings o) {
|
| - buildCounterSubscriptionTrialSettings++;
|
| - if (buildCounterSubscriptionTrialSettings < 3) {
|
| - unittest.expect(o.isInTrial, unittest.isTrue);
|
| - unittest.expect(o.trialEndTime, unittest.equals('foo'));
|
| - }
|
| - buildCounterSubscriptionTrialSettings--;
|
| -}
|
| -
|
| -core.int buildCounterSubscription = 0;
|
| -buildSubscription() {
|
| - var o = new api.Subscription();
|
| - buildCounterSubscription++;
|
| - if (buildCounterSubscription < 3) {
|
| - o.creationTime = "foo";
|
| - o.customerId = "foo";
|
| - o.kind = "foo";
|
| - o.plan = buildSubscriptionPlan();
|
| - o.purchaseOrderId = "foo";
|
| - o.renewalSettings = buildRenewalSettings();
|
| - o.resourceUiUrl = "foo";
|
| - o.seats = buildSeats();
|
| - o.skuId = "foo";
|
| - o.status = "foo";
|
| - o.subscriptionId = "foo";
|
| - o.transferInfo = buildSubscriptionTransferInfo();
|
| - o.trialSettings = buildSubscriptionTrialSettings();
|
| - }
|
| - buildCounterSubscription--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscription(api.Subscription o) {
|
| - buildCounterSubscription++;
|
| - if (buildCounterSubscription < 3) {
|
| - unittest.expect(o.creationTime, unittest.equals('foo'));
|
| - unittest.expect(o.customerId, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - checkSubscriptionPlan(o.plan);
|
| - unittest.expect(o.purchaseOrderId, unittest.equals('foo'));
|
| - checkRenewalSettings(o.renewalSettings);
|
| - unittest.expect(o.resourceUiUrl, unittest.equals('foo'));
|
| - checkSeats(o.seats);
|
| - unittest.expect(o.skuId, unittest.equals('foo'));
|
| - unittest.expect(o.status, unittest.equals('foo'));
|
| - unittest.expect(o.subscriptionId, unittest.equals('foo'));
|
| - checkSubscriptionTransferInfo(o.transferInfo);
|
| - checkSubscriptionTrialSettings(o.trialSettings);
|
| - }
|
| - buildCounterSubscription--;
|
| -}
|
| -
|
| -buildUnnamed932() {
|
| - var o = new core.List<api.Subscription>();
|
| - o.add(buildSubscription());
|
| - o.add(buildSubscription());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed932(core.List<api.Subscription> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkSubscription(o[0]);
|
| - checkSubscription(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterSubscriptions = 0;
|
| -buildSubscriptions() {
|
| - var o = new api.Subscriptions();
|
| - buildCounterSubscriptions++;
|
| - if (buildCounterSubscriptions < 3) {
|
| - o.kind = "foo";
|
| - o.nextPageToken = "foo";
|
| - o.subscriptions = buildUnnamed932();
|
| - }
|
| - buildCounterSubscriptions--;
|
| - return o;
|
| -}
|
| -
|
| -checkSubscriptions(api.Subscriptions o) {
|
| - buildCounterSubscriptions++;
|
| - if (buildCounterSubscriptions < 3) {
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed932(o.subscriptions);
|
| - }
|
| - buildCounterSubscriptions--;
|
| -}
|
| -
|
| -
|
| -main() {
|
| - unittest.group("obj-schema-Address", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildAddress();
|
| - var od = new api.Address.fromJson(o.toJson());
|
| - checkAddress(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ChangePlanRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildChangePlanRequest();
|
| - var od = new api.ChangePlanRequest.fromJson(o.toJson());
|
| - checkChangePlanRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-Customer", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildCustomer();
|
| - var od = new api.Customer.fromJson(o.toJson());
|
| - checkCustomer(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-RenewalSettings", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildRenewalSettings();
|
| - var od = new api.RenewalSettings.fromJson(o.toJson());
|
| - checkRenewalSettings(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-Seats", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSeats();
|
| - var od = new api.Seats.fromJson(o.toJson());
|
| - checkSeats(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-SubscriptionPlanCommitmentInterval", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscriptionPlanCommitmentInterval();
|
| - var od = new api.SubscriptionPlanCommitmentInterval.fromJson(o.toJson());
|
| - checkSubscriptionPlanCommitmentInterval(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-SubscriptionPlan", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscriptionPlan();
|
| - var od = new api.SubscriptionPlan.fromJson(o.toJson());
|
| - checkSubscriptionPlan(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-SubscriptionTransferInfo", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscriptionTransferInfo();
|
| - var od = new api.SubscriptionTransferInfo.fromJson(o.toJson());
|
| - checkSubscriptionTransferInfo(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-SubscriptionTrialSettings", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscriptionTrialSettings();
|
| - var od = new api.SubscriptionTrialSettings.fromJson(o.toJson());
|
| - checkSubscriptionTrialSettings(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-Subscription", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscription();
|
| - var od = new api.Subscription.fromJson(o.toJson());
|
| - checkSubscription(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-Subscriptions", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSubscriptions();
|
| - var od = new api.Subscriptions.fromJson(o.toJson());
|
| - checkSubscriptions(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("resource-CustomersResourceApi", () {
|
| - unittest.test("method--get", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.CustomersResourceApi res = new api.ResellerApi(mock).customers;
|
| - var arg_customerId = "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 + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| - pathOffset = path.length;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| -
|
| - 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(buildCustomer());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.get(arg_customerId).then(unittest.expectAsync(((api.Customer response) {
|
| - checkCustomer(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--insert", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.CustomersResourceApi res = new api.ResellerApi(mock).customers;
|
| - var arg_request = buildCustomer();
|
| - var arg_customerAuthToken = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.Customer.fromJson(json);
|
| - checkCustomer(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("customers"));
|
| - 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["customerAuthToken"].first, unittest.equals(arg_customerAuthToken));
|
| -
|
| -
|
| - var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| - };
|
| - var resp = convert.JSON.encode(buildCustomer());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.insert(arg_request, customerAuthToken: arg_customerAuthToken).then(unittest.expectAsync(((api.Customer response) {
|
| - checkCustomer(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--patch", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.CustomersResourceApi res = new api.ResellerApi(mock).customers;
|
| - var arg_request = buildCustomer();
|
| - var arg_customerId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.Customer.fromJson(json);
|
| - checkCustomer(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| - pathOffset = path.length;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| -
|
| - 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(buildCustomer());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.patch(arg_request, arg_customerId).then(unittest.expectAsync(((api.Customer response) {
|
| - checkCustomer(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--update", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.CustomersResourceApi res = new api.ResellerApi(mock).customers;
|
| - var arg_request = buildCustomer();
|
| - var arg_customerId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.Customer.fromJson(json);
|
| - checkCustomer(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| - pathOffset = path.length;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| -
|
| - 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(buildCustomer());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.update(arg_request, arg_customerId).then(unittest.expectAsync(((api.Customer response) {
|
| - checkCustomer(response);
|
| - })));
|
| - });
|
| -
|
| - });
|
| -
|
| -
|
| - unittest.group("resource-SubscriptionsResourceApi", () {
|
| - unittest.test("method--changePlan", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_request = buildChangePlanRequest();
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.ChangePlanRequest.fromJson(json);
|
| - checkChangePlanRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - index = path.indexOf("/changePlan", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.equals("/changePlan"));
|
| - pathOffset += 11;
|
| -
|
| - 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(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.changePlan(arg_request, arg_customerId, arg_subscriptionId).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--changeRenewalSettings", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_request = buildRenewalSettings();
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.RenewalSettings.fromJson(json);
|
| - checkRenewalSettings(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - index = path.indexOf("/changeRenewalSettings", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.equals("/changeRenewalSettings"));
|
| - 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(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.changeRenewalSettings(arg_request, arg_customerId, arg_subscriptionId).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--changeSeats", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_request = buildSeats();
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.Seats.fromJson(json);
|
| - checkSeats(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - index = path.indexOf("/changeSeats", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("/changeSeats"));
|
| - pathOffset += 12;
|
| -
|
| - 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(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.changeSeats(arg_request, arg_customerId, arg_subscriptionId).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--delete", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "foo";
|
| - var arg_deletionType = "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 + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| - pathOffset = path.length;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| -
|
| - 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["deletionType"].first, unittest.equals(arg_deletionType));
|
| -
|
| -
|
| - 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_customerId, arg_subscriptionId, arg_deletionType).then(unittest.expectAsync((_) {}));
|
| - });
|
| -
|
| - unittest.test("method--get", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "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 + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| - pathOffset = path.length;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| -
|
| - 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(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.get(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--insert", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_request = buildSubscription();
|
| - var arg_customerId = "foo";
|
| - var arg_customerAuthToken = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.Subscription.fromJson(json);
|
| - checkSubscription(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.equals("/subscriptions"));
|
| - 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["customerAuthToken"].first, unittest.equals(arg_customerAuthToken));
|
| -
|
| -
|
| - var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| - };
|
| - var resp = convert.JSON.encode(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.insert(arg_request, arg_customerId, customerAuthToken: arg_customerAuthToken).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--list", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_customerAuthToken = "foo";
|
| - var arg_customerId = "foo";
|
| - var arg_customerNamePrefix = "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 + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.equals("subscriptions"));
|
| - pathOffset += 13;
|
| -
|
| - 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["customerAuthToken"].first, unittest.equals(arg_customerAuthToken));
|
| - unittest.expect(queryMap["customerId"].first, unittest.equals(arg_customerId));
|
| - unittest.expect(queryMap["customerNamePrefix"].first, unittest.equals(arg_customerNamePrefix));
|
| - 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(buildSubscriptions());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.list(customerAuthToken: arg_customerAuthToken, customerId: arg_customerId, customerNamePrefix: arg_customerNamePrefix, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Subscriptions response) {
|
| - checkSubscriptions(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--startPaidService", () {
|
| -
|
| - var mock = new common_test.HttpServerMock();
|
| - api.SubscriptionsResourceApi res = new api.ResellerApi(mock).subscriptions;
|
| - var arg_customerId = "foo";
|
| - var arg_subscriptionId = "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 + 18), unittest.equals("/apps/reseller/v1/"));
|
| - pathOffset += 18;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("customers/"));
|
| - pathOffset += 10;
|
| - index = path.indexOf("/subscriptions/", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_customerId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("/subscriptions/"));
|
| - pathOffset += 15;
|
| - index = path.indexOf("/startPaidService", pathOffset);
|
| - unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| - pathOffset = index;
|
| - unittest.expect(subPart, unittest.equals("$arg_subscriptionId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("/startPaidService"));
|
| - 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(buildSubscription());
|
| - return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| - }), true);
|
| - res.startPaidService(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(((api.Subscription response) {
|
| - checkSubscription(response);
|
| - })));
|
| - });
|
| -
|
| - });
|
| -
|
| -
|
| -}
|
| -
|
|
|