| Index: generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| diff --git a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| index 86952afa2df56af05dcc87b66f8dcd2298a72b56..b661e3cd50353e2155f6b2610399ec137e51be78 100644
|
| --- a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| +++ b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis_beta.cloudresourcemanager.v1beta1.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:test/test.dart' as unittest;
|
|
|
| import 'package:googleapis_beta/cloudresourcemanager/v1beta1.dart' as api;
|
| @@ -22,7 +20,8 @@ class HttpServerMock extends http.BaseClient {
|
|
|
| async.Future<http.StreamedResponse> send(http.BaseRequest request) {
|
| if (_expectJson) {
|
| - return request.finalize()
|
| + return request
|
| + .finalize()
|
| .transform(convert.UTF8.decoder)
|
| .join('')
|
| .then((core.String jsonString) {
|
| @@ -45,8 +44,8 @@ class HttpServerMock extends http.BaseClient {
|
| }
|
| }
|
|
|
| -http.StreamedResponse stringResponse(
|
| - core.int status, core.Map<core.String, core.String> headers, core.String body) {
|
| +http.StreamedResponse stringResponse(core.int status,
|
| + core.Map<core.String, core.String> headers, core.String body) {
|
| var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
|
| return new http.StreamedResponse(stream, status, headers: headers);
|
| }
|
| @@ -70,14 +69,14 @@ checkAncestor(api.Ancestor o) {
|
| buildCounterAncestor--;
|
| }
|
|
|
| -buildUnnamed3426() {
|
| +buildUnnamed3431() {
|
| var o = new core.List<api.AuditLogConfig>();
|
| o.add(buildAuditLogConfig());
|
| o.add(buildAuditLogConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3426(core.List<api.AuditLogConfig> o) {
|
| +checkUnnamed3431(core.List<api.AuditLogConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditLogConfig(o[0]);
|
| checkAuditLogConfig(o[1]);
|
| @@ -88,7 +87,7 @@ buildAuditConfig() {
|
| var o = new api.AuditConfig();
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - o.auditLogConfigs = buildUnnamed3426();
|
| + o.auditLogConfigs = buildUnnamed3431();
|
| o.service = "foo";
|
| }
|
| buildCounterAuditConfig--;
|
| @@ -98,20 +97,20 @@ buildAuditConfig() {
|
| checkAuditConfig(api.AuditConfig o) {
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - checkUnnamed3426(o.auditLogConfigs);
|
| + checkUnnamed3431(o.auditLogConfigs);
|
| unittest.expect(o.service, unittest.equals('foo'));
|
| }
|
| buildCounterAuditConfig--;
|
| }
|
|
|
| -buildUnnamed3427() {
|
| +buildUnnamed3432() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3427(core.List<core.String> o) {
|
| +checkUnnamed3432(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -122,7 +121,7 @@ buildAuditLogConfig() {
|
| var o = new api.AuditLogConfig();
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - o.exemptedMembers = buildUnnamed3427();
|
| + o.exemptedMembers = buildUnnamed3432();
|
| o.logType = "foo";
|
| }
|
| buildCounterAuditLogConfig--;
|
| @@ -132,20 +131,20 @@ buildAuditLogConfig() {
|
| checkAuditLogConfig(api.AuditLogConfig o) {
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - checkUnnamed3427(o.exemptedMembers);
|
| + checkUnnamed3432(o.exemptedMembers);
|
| unittest.expect(o.logType, unittest.equals('foo'));
|
| }
|
| buildCounterAuditLogConfig--;
|
| }
|
|
|
| -buildUnnamed3428() {
|
| +buildUnnamed3433() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3428(core.List<core.String> o) {
|
| +checkUnnamed3433(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -156,7 +155,7 @@ buildBinding() {
|
| var o = new api.Binding();
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - o.members = buildUnnamed3428();
|
| + o.members = buildUnnamed3433();
|
| o.role = "foo";
|
| }
|
| buildCounterBinding--;
|
| @@ -166,7 +165,7 @@ buildBinding() {
|
| checkBinding(api.Binding o) {
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - checkUnnamed3428(o.members);
|
| + checkUnnamed3433(o.members);
|
| unittest.expect(o.role, unittest.equals('foo'));
|
| }
|
| buildCounterBinding--;
|
| @@ -176,16 +175,14 @@ core.int buildCounterEmpty = 0;
|
| buildEmpty() {
|
| var o = new api.Empty();
|
| buildCounterEmpty++;
|
| - if (buildCounterEmpty < 3) {
|
| - }
|
| + if (buildCounterEmpty < 3) {}
|
| buildCounterEmpty--;
|
| return o;
|
| }
|
|
|
| checkEmpty(api.Empty o) {
|
| buildCounterEmpty++;
|
| - if (buildCounterEmpty < 3) {
|
| - }
|
| + if (buildCounterEmpty < 3) {}
|
| buildCounterEmpty--;
|
| }
|
|
|
| @@ -237,27 +234,25 @@ core.int buildCounterGetAncestryRequest = 0;
|
| buildGetAncestryRequest() {
|
| var o = new api.GetAncestryRequest();
|
| buildCounterGetAncestryRequest++;
|
| - if (buildCounterGetAncestryRequest < 3) {
|
| - }
|
| + if (buildCounterGetAncestryRequest < 3) {}
|
| buildCounterGetAncestryRequest--;
|
| return o;
|
| }
|
|
|
| checkGetAncestryRequest(api.GetAncestryRequest o) {
|
| buildCounterGetAncestryRequest++;
|
| - if (buildCounterGetAncestryRequest < 3) {
|
| - }
|
| + if (buildCounterGetAncestryRequest < 3) {}
|
| buildCounterGetAncestryRequest--;
|
| }
|
|
|
| -buildUnnamed3429() {
|
| +buildUnnamed3434() {
|
| var o = new core.List<api.Ancestor>();
|
| o.add(buildAncestor());
|
| o.add(buildAncestor());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3429(core.List<api.Ancestor> o) {
|
| +checkUnnamed3434(core.List<api.Ancestor> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAncestor(o[0]);
|
| checkAncestor(o[1]);
|
| @@ -268,7 +263,7 @@ buildGetAncestryResponse() {
|
| var o = new api.GetAncestryResponse();
|
| buildCounterGetAncestryResponse++;
|
| if (buildCounterGetAncestryResponse < 3) {
|
| - o.ancestor = buildUnnamed3429();
|
| + o.ancestor = buildUnnamed3434();
|
| }
|
| buildCounterGetAncestryResponse--;
|
| return o;
|
| @@ -277,7 +272,7 @@ buildGetAncestryResponse() {
|
| checkGetAncestryResponse(api.GetAncestryResponse o) {
|
| buildCounterGetAncestryResponse++;
|
| if (buildCounterGetAncestryResponse < 3) {
|
| - checkUnnamed3429(o.ancestor);
|
| + checkUnnamed3434(o.ancestor);
|
| }
|
| buildCounterGetAncestryResponse--;
|
| }
|
| @@ -286,27 +281,25 @@ core.int buildCounterGetIamPolicyRequest = 0;
|
| buildGetIamPolicyRequest() {
|
| var o = new api.GetIamPolicyRequest();
|
| buildCounterGetIamPolicyRequest++;
|
| - if (buildCounterGetIamPolicyRequest < 3) {
|
| - }
|
| + if (buildCounterGetIamPolicyRequest < 3) {}
|
| buildCounterGetIamPolicyRequest--;
|
| return o;
|
| }
|
|
|
| checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
|
| buildCounterGetIamPolicyRequest++;
|
| - if (buildCounterGetIamPolicyRequest < 3) {
|
| - }
|
| + if (buildCounterGetIamPolicyRequest < 3) {}
|
| buildCounterGetIamPolicyRequest--;
|
| }
|
|
|
| -buildUnnamed3430() {
|
| +buildUnnamed3435() {
|
| var o = new core.List<api.Organization>();
|
| o.add(buildOrganization());
|
| o.add(buildOrganization());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3430(core.List<api.Organization> o) {
|
| +checkUnnamed3435(core.List<api.Organization> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkOrganization(o[0]);
|
| checkOrganization(o[1]);
|
| @@ -318,7 +311,7 @@ buildListOrganizationsResponse() {
|
| buildCounterListOrganizationsResponse++;
|
| if (buildCounterListOrganizationsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.organizations = buildUnnamed3430();
|
| + o.organizations = buildUnnamed3435();
|
| }
|
| buildCounterListOrganizationsResponse--;
|
| return o;
|
| @@ -328,19 +321,19 @@ checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
|
| buildCounterListOrganizationsResponse++;
|
| if (buildCounterListOrganizationsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3430(o.organizations);
|
| + checkUnnamed3435(o.organizations);
|
| }
|
| buildCounterListOrganizationsResponse--;
|
| }
|
|
|
| -buildUnnamed3431() {
|
| +buildUnnamed3436() {
|
| var o = new core.List<api.Project>();
|
| o.add(buildProject());
|
| o.add(buildProject());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3431(core.List<api.Project> o) {
|
| +checkUnnamed3436(core.List<api.Project> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkProject(o[0]);
|
| checkProject(o[1]);
|
| @@ -352,7 +345,7 @@ buildListProjectsResponse() {
|
| buildCounterListProjectsResponse++;
|
| if (buildCounterListProjectsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.projects = buildUnnamed3431();
|
| + o.projects = buildUnnamed3436();
|
| }
|
| buildCounterListProjectsResponse--;
|
| return o;
|
| @@ -362,7 +355,7 @@ checkListProjectsResponse(api.ListProjectsResponse o) {
|
| buildCounterListProjectsResponse++;
|
| if (buildCounterListProjectsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3431(o.projects);
|
| + checkUnnamed3436(o.projects);
|
| }
|
| buildCounterListProjectsResponse--;
|
| }
|
| @@ -415,27 +408,27 @@ checkOrganizationOwner(api.OrganizationOwner o) {
|
| buildCounterOrganizationOwner--;
|
| }
|
|
|
| -buildUnnamed3432() {
|
| +buildUnnamed3437() {
|
| var o = new core.List<api.AuditConfig>();
|
| o.add(buildAuditConfig());
|
| o.add(buildAuditConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3432(core.List<api.AuditConfig> o) {
|
| +checkUnnamed3437(core.List<api.AuditConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditConfig(o[0]);
|
| checkAuditConfig(o[1]);
|
| }
|
|
|
| -buildUnnamed3433() {
|
| +buildUnnamed3438() {
|
| var o = new core.List<api.Binding>();
|
| o.add(buildBinding());
|
| o.add(buildBinding());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3433(core.List<api.Binding> o) {
|
| +checkUnnamed3438(core.List<api.Binding> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBinding(o[0]);
|
| checkBinding(o[1]);
|
| @@ -446,8 +439,8 @@ buildPolicy() {
|
| var o = new api.Policy();
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - o.auditConfigs = buildUnnamed3432();
|
| - o.bindings = buildUnnamed3433();
|
| + o.auditConfigs = buildUnnamed3437();
|
| + o.bindings = buildUnnamed3438();
|
| o.etag = "foo";
|
| o.version = 42;
|
| }
|
| @@ -458,22 +451,22 @@ buildPolicy() {
|
| checkPolicy(api.Policy o) {
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - checkUnnamed3432(o.auditConfigs);
|
| - checkUnnamed3433(o.bindings);
|
| + checkUnnamed3437(o.auditConfigs);
|
| + checkUnnamed3438(o.bindings);
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals(42));
|
| }
|
| buildCounterPolicy--;
|
| }
|
|
|
| -buildUnnamed3434() {
|
| +buildUnnamed3439() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed3434(core.Map<core.String, core.String> o) {
|
| +checkUnnamed3439(core.Map<core.String, core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o["x"], unittest.equals('foo'));
|
| unittest.expect(o["y"], unittest.equals('foo'));
|
| @@ -485,7 +478,7 @@ buildProject() {
|
| buildCounterProject++;
|
| if (buildCounterProject < 3) {
|
| o.createTime = "foo";
|
| - o.labels = buildUnnamed3434();
|
| + o.labels = buildUnnamed3439();
|
| o.lifecycleState = "foo";
|
| o.name = "foo";
|
| o.parent = buildResourceId();
|
| @@ -500,7 +493,7 @@ checkProject(api.Project o) {
|
| buildCounterProject++;
|
| if (buildCounterProject < 3) {
|
| unittest.expect(o.createTime, unittest.equals('foo'));
|
| - checkUnnamed3434(o.labels);
|
| + checkUnnamed3439(o.labels);
|
| unittest.expect(o.lifecycleState, unittest.equals('foo'));
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| checkResourceId(o.parent);
|
| @@ -575,14 +568,14 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
|
| buildCounterSetIamPolicyRequest--;
|
| }
|
|
|
| -buildUnnamed3435() {
|
| +buildUnnamed3440() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3435(core.List<core.String> o) {
|
| +checkUnnamed3440(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -593,7 +586,7 @@ buildTestIamPermissionsRequest() {
|
| var o = new api.TestIamPermissionsRequest();
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - o.permissions = buildUnnamed3435();
|
| + o.permissions = buildUnnamed3440();
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| return o;
|
| @@ -602,19 +595,19 @@ buildTestIamPermissionsRequest() {
|
| checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - checkUnnamed3435(o.permissions);
|
| + checkUnnamed3440(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| }
|
|
|
| -buildUnnamed3436() {
|
| +buildUnnamed3441() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3436(core.List<core.String> o) {
|
| +checkUnnamed3441(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -625,7 +618,7 @@ buildTestIamPermissionsResponse() {
|
| var o = new api.TestIamPermissionsResponse();
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - o.permissions = buildUnnamed3436();
|
| + o.permissions = buildUnnamed3441();
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| return o;
|
| @@ -634,7 +627,7 @@ buildTestIamPermissionsResponse() {
|
| checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - checkUnnamed3436(o.permissions);
|
| + checkUnnamed3441(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| }
|
| @@ -643,20 +636,17 @@ core.int buildCounterUndeleteProjectRequest = 0;
|
| buildUndeleteProjectRequest() {
|
| var o = new api.UndeleteProjectRequest();
|
| buildCounterUndeleteProjectRequest++;
|
| - if (buildCounterUndeleteProjectRequest < 3) {
|
| - }
|
| + if (buildCounterUndeleteProjectRequest < 3) {}
|
| buildCounterUndeleteProjectRequest--;
|
| return o;
|
| }
|
|
|
| checkUndeleteProjectRequest(api.UndeleteProjectRequest o) {
|
| buildCounterUndeleteProjectRequest++;
|
| - if (buildCounterUndeleteProjectRequest < 3) {
|
| - }
|
| + if (buildCounterUndeleteProjectRequest < 3) {}
|
| buildCounterUndeleteProjectRequest--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-Ancestor", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -666,7 +656,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-AuditConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildAuditConfig();
|
| @@ -675,7 +664,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-AuditLogConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildAuditLogConfig();
|
| @@ -684,7 +672,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Binding", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBinding();
|
| @@ -693,7 +680,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -702,7 +688,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-FolderOperation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFolderOperation();
|
| @@ -711,7 +696,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-FolderOperationError", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFolderOperationError();
|
| @@ -720,7 +704,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-GetAncestryRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGetAncestryRequest();
|
| @@ -729,7 +712,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-GetAncestryResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGetAncestryResponse();
|
| @@ -738,7 +720,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-GetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGetIamPolicyRequest();
|
| @@ -747,7 +728,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListOrganizationsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListOrganizationsResponse();
|
| @@ -756,7 +736,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListProjectsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListProjectsResponse();
|
| @@ -765,7 +744,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Organization", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOrganization();
|
| @@ -774,7 +752,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-OrganizationOwner", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOrganizationOwner();
|
| @@ -783,7 +760,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Policy", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPolicy();
|
| @@ -792,7 +768,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Project", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildProject();
|
| @@ -801,7 +776,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ProjectCreationStatus", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildProjectCreationStatus();
|
| @@ -810,7 +784,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ResourceId", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildResourceId();
|
| @@ -819,7 +792,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSetIamPolicyRequest();
|
| @@ -828,7 +800,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsRequest();
|
| @@ -837,7 +808,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsResponse();
|
| @@ -846,7 +816,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-UndeleteProjectRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildUndeleteProjectRequest();
|
| @@ -855,12 +824,11 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-OrganizationsResourceApi", () {
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_name = "foo";
|
| var arg_organizationId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -868,9 +836,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v1beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -884,30 +854,34 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["organizationId"].first, unittest.equals(arg_organizationId));
|
| -
|
| + unittest.expect(queryMap["organizationId"].first,
|
| + unittest.equals(arg_organizationId));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildOrganization());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_name, organizationId: arg_organizationId).then(unittest.expectAsync1(((api.Organization response) {
|
| + res
|
| + .get(arg_name, organizationId: arg_organizationId)
|
| + .then(unittest.expectAsync1(((api.Organization response) {
|
| checkOrganization(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_request = buildGetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -918,9 +892,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v1beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -934,40 +910,45 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) {
|
| + res
|
| + .getIamPolicy(arg_request, arg_resource)
|
| + .then(unittest.expectAsync1(((api.Policy response) {
|
| checkPolicy(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_filter = "foo";
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| + var arg_filter = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("v1beta1/organizations"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 21),
|
| + unittest.equals("v1beta1/organizations"));
|
| pathOffset += 21;
|
|
|
| var query = (req.url).query;
|
| @@ -980,32 +961,41 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
| unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| -
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListOrganizationsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListOrganizationsResponse response) {
|
| + res
|
| + .list(
|
| + pageToken: arg_pageToken,
|
| + pageSize: arg_pageSize,
|
| + filter: arg_filter)
|
| + .then(
|
| + unittest.expectAsync1(((api.ListOrganizationsResponse response) {
|
| checkListOrganizationsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1016,9 +1006,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v1beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1032,29 +1024,32 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) {
|
| + res
|
| + .setIamPolicy(arg_request, arg_resource)
|
| + .then(unittest.expectAsync1(((api.Policy response) {
|
| checkPolicy(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--testIamPermissions", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1065,9 +1060,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v1beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1081,29 +1078,31 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildTestIamPermissionsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.TestIamPermissionsResponse response) {
|
| + res.testIamPermissions(arg_request, arg_resource).then(
|
| + unittest.expectAsync1(((api.TestIamPermissionsResponse response) {
|
| checkTestIamPermissionsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--update", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + api.OrganizationsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).organizations;
|
| var arg_request = buildOrganization();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1114,9 +1113,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v1beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1130,33 +1131,34 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildOrganization());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_name).then(unittest.expectAsync1(((api.Organization response) {
|
| + res
|
| + .update(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Organization response) {
|
| checkOrganization(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildProject();
|
| var arg_useLegacyStack = true;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1167,9 +1169,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.equals("v1beta1/projects"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 16),
|
| + unittest.equals("v1beta1/projects"));
|
| pathOffset += 16;
|
|
|
| var query = (req.url).query;
|
| @@ -1182,39 +1186,45 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["useLegacyStack"].first, unittest.equals("$arg_useLegacyStack"));
|
| -
|
| + unittest.expect(queryMap["useLegacyStack"].first,
|
| + unittest.equals("$arg_useLegacyStack"));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildProject());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, useLegacyStack: arg_useLegacyStack).then(unittest.expectAsync1(((api.Project response) {
|
| + res
|
| + .create(arg_request, useLegacyStack: arg_useLegacyStack)
|
| + .then(unittest.expectAsync1(((api.Project response) {
|
| checkProject(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1230,38 +1240,43 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.delete(arg_projectId).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_projectId)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1277,29 +1292,32 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildProject());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_projectId).then(unittest.expectAsync1(((api.Project response) {
|
| + res
|
| + .get(arg_projectId)
|
| + .then(unittest.expectAsync1(((api.Project response) {
|
| checkProject(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--getAncestry", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildGetAncestryRequest();
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1310,16 +1328,20 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| index = path.indexOf(":getAncestry", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals(":getAncestry"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals(":getAncestry"));
|
| pathOffset += 12;
|
|
|
| var query = (req.url).query;
|
| @@ -1332,29 +1354,32 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildGetAncestryResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.getAncestry(arg_request, arg_projectId).then(unittest.expectAsync1(((api.GetAncestryResponse response) {
|
| + res
|
| + .getAncestry(arg_request, arg_projectId)
|
| + .then(unittest.expectAsync1(((api.GetAncestryResponse response) {
|
| checkGetAncestryResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildGetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1365,16 +1390,20 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| index = path.indexOf(":getIamPolicy", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_resource"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.equals(":getIamPolicy"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 13),
|
| + unittest.equals(":getIamPolicy"));
|
| pathOffset += 13;
|
|
|
| var query = (req.url).query;
|
| @@ -1387,40 +1416,45 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) {
|
| + res
|
| + .getIamPolicy(arg_request, arg_resource)
|
| + .then(unittest.expectAsync1(((api.Policy response) {
|
| checkPolicy(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| + var arg_filter = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| - var arg_filter = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.equals("v1beta1/projects"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 16),
|
| + unittest.equals("v1beta1/projects"));
|
| pathOffset += 16;
|
|
|
| var query = (req.url).query;
|
| @@ -1433,32 +1467,40 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
|
| -
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListProjectsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync1(((api.ListProjectsResponse response) {
|
| + res
|
| + .list(
|
| + filter: arg_filter,
|
| + pageToken: arg_pageToken,
|
| + pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListProjectsResponse response) {
|
| checkListProjectsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1469,16 +1511,20 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| index = path.indexOf(":setIamPolicy", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_resource"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.equals(":setIamPolicy"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 13),
|
| + unittest.equals(":setIamPolicy"));
|
| pathOffset += 13;
|
|
|
| var query = (req.url).query;
|
| @@ -1491,29 +1537,32 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) {
|
| + res
|
| + .setIamPolicy(arg_request, arg_resource)
|
| + .then(unittest.expectAsync1(((api.Policy response) {
|
| checkPolicy(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--testIamPermissions", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1524,16 +1573,20 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| index = path.indexOf(":testIamPermissions", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_resource"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.equals(":testIamPermissions"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 19),
|
| + unittest.equals(":testIamPermissions"));
|
| pathOffset += 19;
|
|
|
| var query = (req.url).query;
|
| @@ -1546,29 +1599,31 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildTestIamPermissionsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.TestIamPermissionsResponse response) {
|
| + res.testIamPermissions(arg_request, arg_resource).then(
|
| + unittest.expectAsync1(((api.TestIamPermissionsResponse response) {
|
| checkTestIamPermissionsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--undelete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildUndeleteProjectRequest();
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1579,16 +1634,20 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| index = path.indexOf(":undelete", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals(":undelete"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 9),
|
| + unittest.equals(":undelete"));
|
| pathOffset += 9;
|
|
|
| var query = (req.url).query;
|
| @@ -1601,29 +1660,32 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.undelete(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .undelete(arg_request, arg_projectId)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--update", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| + api.ProjectsResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).projects;
|
| var arg_request = buildProject();
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1634,9 +1696,11 @@ main() {
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.equals("v1beta1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 17),
|
| + unittest.equals("v1beta1/projects/"));
|
| pathOffset += 17;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1652,27 +1716,26 @@ main() {
|
| 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]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildProject());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Project response) {
|
| + res
|
| + .update(arg_request, arg_projectId)
|
| + .then(unittest.expectAsync1(((api.Project response) {
|
| checkProject(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|