| Index: generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart
|
| diff --git a/generated/googleapis/test/licensing/v1_test.dart b/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart
|
| similarity index 53%
|
| copy from generated/googleapis/test/licensing/v1_test.dart
|
| copy to generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart
|
| index 722a59ddf61417c8dbc9f272c4628fba24b33d3e..426e0f45910f9a8446792f562208dc9254249aae 100644
|
| --- a/generated/googleapis/test/licensing/v1_test.dart
|
| +++ b/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart
|
| @@ -1,4 +1,4 @@
|
| -library googleapis.licensing.v1.test;
|
| +library googleapis_beta.replicapoolupdater.v1beta1.test;
|
|
|
| import "dart:core" as core;
|
| import "dart:collection" as collection;
|
| @@ -8,137 +8,243 @@ 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 'package:googleapis_beta/common/common.dart' as common;
|
| +import 'package:googleapis_beta/src/common_internal.dart' as common_internal;
|
| import '../common/common_internal_test.dart' as common_test;
|
|
|
| -import 'package:googleapis/licensing/v1.dart' as api;
|
| +import 'package:googleapis_beta/replicapoolupdater/v1beta1.dart' as api;
|
|
|
|
|
|
|
| -core.int buildCounterLicenseAssignment = 0;
|
| -buildLicenseAssignment() {
|
| - var o = new api.LicenseAssignment();
|
| - buildCounterLicenseAssignment++;
|
| - if (buildCounterLicenseAssignment < 3) {
|
| - o.etags = "foo";
|
| - o.kind = "foo";
|
| - o.productId = "foo";
|
| - o.selfLink = "foo";
|
| - o.skuId = "foo";
|
| - o.userId = "foo";
|
| +core.int buildCounterInsertResponse = 0;
|
| +buildInsertResponse() {
|
| + var o = new api.InsertResponse();
|
| + buildCounterInsertResponse++;
|
| + if (buildCounterInsertResponse < 3) {
|
| + o.update = "foo";
|
| }
|
| - buildCounterLicenseAssignment--;
|
| + buildCounterInsertResponse--;
|
| return o;
|
| }
|
|
|
| -checkLicenseAssignment(api.LicenseAssignment o) {
|
| - buildCounterLicenseAssignment++;
|
| - if (buildCounterLicenseAssignment < 3) {
|
| - unittest.expect(o.etags, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.productId, unittest.equals('foo'));
|
| - unittest.expect(o.selfLink, unittest.equals('foo'));
|
| - unittest.expect(o.skuId, unittest.equals('foo'));
|
| - unittest.expect(o.userId, unittest.equals('foo'));
|
| +checkInsertResponse(api.InsertResponse o) {
|
| + buildCounterInsertResponse++;
|
| + if (buildCounterInsertResponse < 3) {
|
| + unittest.expect(o.update, unittest.equals('foo'));
|
| }
|
| - buildCounterLicenseAssignment--;
|
| + buildCounterInsertResponse--;
|
| }
|
|
|
| -core.int buildCounterLicenseAssignmentInsert = 0;
|
| -buildLicenseAssignmentInsert() {
|
| - var o = new api.LicenseAssignmentInsert();
|
| - buildCounterLicenseAssignmentInsert++;
|
| - if (buildCounterLicenseAssignmentInsert < 3) {
|
| - o.userId = "foo";
|
| +core.int buildCounterInstanceUpdate = 0;
|
| +buildInstanceUpdate() {
|
| + var o = new api.InstanceUpdate();
|
| + buildCounterInstanceUpdate++;
|
| + if (buildCounterInstanceUpdate < 3) {
|
| + o.instanceName = "foo";
|
| + o.state = "foo";
|
| }
|
| - buildCounterLicenseAssignmentInsert--;
|
| + buildCounterInstanceUpdate--;
|
| return o;
|
| }
|
|
|
| -checkLicenseAssignmentInsert(api.LicenseAssignmentInsert o) {
|
| - buildCounterLicenseAssignmentInsert++;
|
| - if (buildCounterLicenseAssignmentInsert < 3) {
|
| - unittest.expect(o.userId, unittest.equals('foo'));
|
| +checkInstanceUpdate(api.InstanceUpdate o) {
|
| + buildCounterInstanceUpdate++;
|
| + if (buildCounterInstanceUpdate < 3) {
|
| + unittest.expect(o.instanceName, unittest.equals('foo'));
|
| + unittest.expect(o.state, unittest.equals('foo'));
|
| }
|
| - buildCounterLicenseAssignmentInsert--;
|
| + buildCounterInstanceUpdate--;
|
| }
|
|
|
| -buildUnnamed872() {
|
| - var o = new core.List<api.LicenseAssignment>();
|
| - o.add(buildLicenseAssignment());
|
| - o.add(buildLicenseAssignment());
|
| +buildUnnamed1375() {
|
| + var o = new core.List<api.InstanceUpdate>();
|
| + o.add(buildInstanceUpdate());
|
| + o.add(buildInstanceUpdate());
|
| return o;
|
| }
|
|
|
| -checkUnnamed872(core.List<api.LicenseAssignment> o) {
|
| +checkUnnamed1375(core.List<api.InstanceUpdate> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkLicenseAssignment(o[0]);
|
| - checkLicenseAssignment(o[1]);
|
| + checkInstanceUpdate(o[0]);
|
| + checkInstanceUpdate(o[1]);
|
| }
|
|
|
| -core.int buildCounterLicenseAssignmentList = 0;
|
| -buildLicenseAssignmentList() {
|
| - var o = new api.LicenseAssignmentList();
|
| - buildCounterLicenseAssignmentList++;
|
| - if (buildCounterLicenseAssignmentList < 3) {
|
| - o.etag = "foo";
|
| - o.items = buildUnnamed872();
|
| +core.int buildCounterUpdate = 0;
|
| +buildUpdate() {
|
| + var o = new api.Update();
|
| + buildCounterUpdate++;
|
| + if (buildCounterUpdate < 3) {
|
| + o.details = "foo";
|
| + o.handle = "foo";
|
| + o.instanceTemplate = "foo";
|
| + o.instanceUpdates = buildUnnamed1375();
|
| o.kind = "foo";
|
| - o.nextPageToken = "foo";
|
| + o.policy = buildUpdatePolicy();
|
| + o.selfLink = "foo";
|
| + o.state = "foo";
|
| + o.targetState = "foo";
|
| }
|
| - buildCounterLicenseAssignmentList--;
|
| + buildCounterUpdate--;
|
| return o;
|
| }
|
|
|
| -checkLicenseAssignmentList(api.LicenseAssignmentList o) {
|
| - buildCounterLicenseAssignmentList++;
|
| - if (buildCounterLicenseAssignmentList < 3) {
|
| - unittest.expect(o.etag, unittest.equals('foo'));
|
| - checkUnnamed872(o.items);
|
| +checkUpdate(api.Update o) {
|
| + buildCounterUpdate++;
|
| + if (buildCounterUpdate < 3) {
|
| + unittest.expect(o.details, unittest.equals('foo'));
|
| + unittest.expect(o.handle, unittest.equals('foo'));
|
| + unittest.expect(o.instanceTemplate, unittest.equals('foo'));
|
| + checkUnnamed1375(o.instanceUpdates);
|
| unittest.expect(o.kind, unittest.equals('foo'));
|
| + checkUpdatePolicy(o.policy);
|
| + unittest.expect(o.selfLink, unittest.equals('foo'));
|
| + unittest.expect(o.state, unittest.equals('foo'));
|
| + unittest.expect(o.targetState, unittest.equals('foo'));
|
| + }
|
| + buildCounterUpdate--;
|
| +}
|
| +
|
| +buildUnnamed1376() {
|
| + var o = new core.List<api.Update>();
|
| + o.add(buildUpdate());
|
| + o.add(buildUpdate());
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed1376(core.List<api.Update> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + checkUpdate(o[0]);
|
| + checkUpdate(o[1]);
|
| +}
|
| +
|
| +core.int buildCounterUpdateList = 0;
|
| +buildUpdateList() {
|
| + var o = new api.UpdateList();
|
| + buildCounterUpdateList++;
|
| + if (buildCounterUpdateList < 3) {
|
| + o.items = buildUnnamed1376();
|
| + o.nextPageToken = "foo";
|
| + }
|
| + buildCounterUpdateList--;
|
| + return o;
|
| +}
|
| +
|
| +checkUpdateList(api.UpdateList o) {
|
| + buildCounterUpdateList++;
|
| + if (buildCounterUpdateList < 3) {
|
| + checkUnnamed1376(o.items);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| - buildCounterLicenseAssignmentList--;
|
| + buildCounterUpdateList--;
|
| +}
|
| +
|
| +core.int buildCounterUpdatePolicy = 0;
|
| +buildUpdatePolicy() {
|
| + var o = new api.UpdatePolicy();
|
| + buildCounterUpdatePolicy++;
|
| + if (buildCounterUpdatePolicy < 3) {
|
| + o.canary = buildUpdatePolicyCanary();
|
| + o.maxNumConcurrentInstances = 42;
|
| + o.sleepAfterInstanceRestartSec = 42;
|
| + }
|
| + buildCounterUpdatePolicy--;
|
| + return o;
|
| +}
|
| +
|
| +checkUpdatePolicy(api.UpdatePolicy o) {
|
| + buildCounterUpdatePolicy++;
|
| + if (buildCounterUpdatePolicy < 3) {
|
| + checkUpdatePolicyCanary(o.canary);
|
| + unittest.expect(o.maxNumConcurrentInstances, unittest.equals(42));
|
| + unittest.expect(o.sleepAfterInstanceRestartSec, unittest.equals(42));
|
| + }
|
| + buildCounterUpdatePolicy--;
|
| +}
|
| +
|
| +core.int buildCounterUpdatePolicyCanary = 0;
|
| +buildUpdatePolicyCanary() {
|
| + var o = new api.UpdatePolicyCanary();
|
| + buildCounterUpdatePolicyCanary++;
|
| + if (buildCounterUpdatePolicyCanary < 3) {
|
| + o.numInstances = 42;
|
| + }
|
| + buildCounterUpdatePolicyCanary--;
|
| + return o;
|
| +}
|
| +
|
| +checkUpdatePolicyCanary(api.UpdatePolicyCanary o) {
|
| + buildCounterUpdatePolicyCanary++;
|
| + if (buildCounterUpdatePolicyCanary < 3) {
|
| + unittest.expect(o.numInstances, unittest.equals(42));
|
| + }
|
| + buildCounterUpdatePolicyCanary--;
|
| }
|
|
|
|
|
| main() {
|
| - unittest.group("obj-schema-LicenseAssignment", () {
|
| + unittest.group("obj-schema-InsertResponse", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildInsertResponse();
|
| + var od = new api.InsertResponse.fromJson(o.toJson());
|
| + checkInsertResponse(od);
|
| + });
|
| + });
|
| +
|
| +
|
| + unittest.group("obj-schema-InstanceUpdate", () {
|
| unittest.test("to-json--from-json", () {
|
| - var o = buildLicenseAssignment();
|
| - var od = new api.LicenseAssignment.fromJson(o.toJson());
|
| - checkLicenseAssignment(od);
|
| + var o = buildInstanceUpdate();
|
| + var od = new api.InstanceUpdate.fromJson(o.toJson());
|
| + checkInstanceUpdate(od);
|
| });
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-LicenseAssignmentInsert", () {
|
| + unittest.group("obj-schema-Update", () {
|
| unittest.test("to-json--from-json", () {
|
| - var o = buildLicenseAssignmentInsert();
|
| - var od = new api.LicenseAssignmentInsert.fromJson(o.toJson());
|
| - checkLicenseAssignmentInsert(od);
|
| + var o = buildUpdate();
|
| + var od = new api.Update.fromJson(o.toJson());
|
| + checkUpdate(od);
|
| });
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-LicenseAssignmentList", () {
|
| + unittest.group("obj-schema-UpdateList", () {
|
| unittest.test("to-json--from-json", () {
|
| - var o = buildLicenseAssignmentList();
|
| - var od = new api.LicenseAssignmentList.fromJson(o.toJson());
|
| - checkLicenseAssignmentList(od);
|
| + var o = buildUpdateList();
|
| + var od = new api.UpdateList.fromJson(o.toJson());
|
| + checkUpdateList(od);
|
| });
|
| });
|
|
|
|
|
| - unittest.group("resource-LicenseAssignmentsResourceApi", () {
|
| - unittest.test("method--delete", () {
|
| + unittest.group("obj-schema-UpdatePolicy", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildUpdatePolicy();
|
| + var od = new api.UpdatePolicy.fromJson(o.toJson());
|
| + checkUpdatePolicy(od);
|
| + });
|
| + });
|
| +
|
| +
|
| + unittest.group("obj-schema-UpdatePolicyCanary", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildUpdatePolicyCanary();
|
| + var od = new api.UpdatePolicyCanary.fromJson(o.toJson());
|
| + checkUpdatePolicyCanary(od);
|
| + });
|
| + });
|
| +
|
| +
|
| + unittest.group("resource-UpdatesResourceApi", () {
|
| + unittest.test("method--cancel", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| - var arg_userId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| + var arg_update = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -171,16 +277,17 @@ main() {
|
| var resp = "";
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.delete(arg_productId, arg_skuId, arg_userId).then(unittest.expectAsync((_) {}));
|
| + res.cancel(arg_project, arg_zone, arg_instanceGroupManager, arg_update).then(unittest.expectAsync((_) {}));
|
| });
|
|
|
| unittest.test("method--get", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| - var arg_userId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| + var arg_update = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -210,24 +317,25 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildLicenseAssignment());
|
| + var resp = convert.JSON.encode(buildUpdate());
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_productId, arg_skuId, arg_userId).then(unittest.expectAsync(((api.LicenseAssignment response) {
|
| - checkLicenseAssignment(response);
|
| + res.get(arg_project, arg_zone, arg_instanceGroupManager, arg_update).then(unittest.expectAsync(((api.Update response) {
|
| + checkUpdate(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--insert", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_request = buildLicenseAssignmentInsert();
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_request = buildUpdate();
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.LicenseAssignmentInsert.fromJson(json);
|
| - checkLicenseAssignmentInsert(obj);
|
| + var obj = new api.Update.fromJson(json);
|
| + checkUpdate(obj);
|
|
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -257,20 +365,21 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildLicenseAssignment());
|
| + var resp = convert.JSON.encode(buildInsertResponse());
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.insert(arg_request, arg_productId, arg_skuId).then(unittest.expectAsync(((api.LicenseAssignment response) {
|
| - checkLicenseAssignment(response);
|
| + res.insert(arg_request, arg_project, arg_zone, arg_instanceGroupManager).then(unittest.expectAsync(((api.InsertResponse response) {
|
| + checkInsertResponse(response);
|
| })));
|
| });
|
|
|
| - unittest.test("method--listForProduct", () {
|
| + unittest.test("method--list", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_productId = "foo";
|
| - var arg_customerId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| var arg_maxResults = 42;
|
| var arg_pageToken = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| @@ -297,7 +406,6 @@ main() {
|
| addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["customerId"].first, unittest.equals(arg_customerId));
|
| unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults));
|
| unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
|
|
| @@ -305,23 +413,22 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildLicenseAssignmentList());
|
| + var resp = convert.JSON.encode(buildUpdateList());
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.listForProduct(arg_productId, arg_customerId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.LicenseAssignmentList response) {
|
| - checkLicenseAssignmentList(response);
|
| + res.list(arg_project, arg_zone, arg_instanceGroupManager, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.UpdateList response) {
|
| + checkUpdateList(response);
|
| })));
|
| });
|
|
|
| - unittest.test("method--listForProductAndSku", () {
|
| + unittest.test("method--pause", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| - var arg_customerId = "foo";
|
| - var arg_maxResults = 42;
|
| - var arg_pageToken = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| + var arg_update = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -346,34 +453,26 @@ main() {
|
| addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["customerId"].first, unittest.equals(arg_customerId));
|
| - 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(buildLicenseAssignmentList());
|
| + var resp = "";
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.listForProductAndSku(arg_productId, arg_skuId, arg_customerId, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.LicenseAssignmentList response) {
|
| - checkLicenseAssignmentList(response);
|
| - })));
|
| + res.pause(arg_project, arg_zone, arg_instanceGroupManager, arg_update).then(unittest.expectAsync((_) {}));
|
| });
|
|
|
| - unittest.test("method--patch", () {
|
| + unittest.test("method--rollback", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_request = buildLicenseAssignment();
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| - var arg_userId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| + var arg_update = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.LicenseAssignment.fromJson(json);
|
| - checkLicenseAssignment(obj);
|
| -
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| @@ -402,26 +501,21 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildLicenseAssignment());
|
| + var resp = "";
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.patch(arg_request, arg_productId, arg_skuId, arg_userId).then(unittest.expectAsync(((api.LicenseAssignment response) {
|
| - checkLicenseAssignment(response);
|
| - })));
|
| + res.rollback(arg_project, arg_zone, arg_instanceGroupManager, arg_update).then(unittest.expectAsync((_) {}));
|
| });
|
|
|
| - unittest.test("method--update", () {
|
| + unittest.test("method--rollforward", () {
|
|
|
| var mock = new common_test.HttpServerMock();
|
| - api.LicenseAssignmentsResourceApi res = new api.LicensingApi(mock).licenseAssignments;
|
| - var arg_request = buildLicenseAssignment();
|
| - var arg_productId = "foo";
|
| - var arg_skuId = "foo";
|
| - var arg_userId = "foo";
|
| + api.UpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).updates;
|
| + var arg_project = "foo";
|
| + var arg_zone = "foo";
|
| + var arg_instanceGroupManager = "foo";
|
| + var arg_update = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.LicenseAssignment.fromJson(json);
|
| - checkLicenseAssignment(obj);
|
| -
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| @@ -450,12 +544,10 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildLicenseAssignment());
|
| + var resp = "";
|
| return new async.Future.value(common_test.stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_productId, arg_skuId, arg_userId).then(unittest.expectAsync(((api.LicenseAssignment response) {
|
| - checkLicenseAssignment(response);
|
| - })));
|
| + res.rollforward(arg_project, arg_zone, arg_instanceGroupManager, arg_update).then(unittest.expectAsync((_) {}));
|
| });
|
|
|
| });
|
|
|