| Index: generated/googleapis/test/cloudresourcemanager/v2beta1_test.dart
|
| diff --git a/generated/googleapis/test/cloudresourcemanager/v2beta1_test.dart b/generated/googleapis/test/cloudresourcemanager/v2beta1_test.dart
|
| index 7c6deeb4bc5491792ae8358031cba7e33340d4d4..f68cda390402a163d419c46dadac912dd4c14ac9 100644
|
| --- a/generated/googleapis/test/cloudresourcemanager/v2beta1_test.dart
|
| +++ b/generated/googleapis/test/cloudresourcemanager/v2beta1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis.cloudresourcemanager.v2beta1.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/cloudresourcemanager/v2beta1.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,20 +44,20 @@ 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);
|
| }
|
|
|
| -buildUnnamed88() {
|
| +buildUnnamed83() {
|
| var o = new core.List<api.AuditLogConfig>();
|
| o.add(buildAuditLogConfig());
|
| o.add(buildAuditLogConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed88(core.List<api.AuditLogConfig> o) {
|
| +checkUnnamed83(core.List<api.AuditLogConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditLogConfig(o[0]);
|
| checkAuditLogConfig(o[1]);
|
| @@ -69,7 +68,7 @@ buildAuditConfig() {
|
| var o = new api.AuditConfig();
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - o.auditLogConfigs = buildUnnamed88();
|
| + o.auditLogConfigs = buildUnnamed83();
|
| o.service = "foo";
|
| }
|
| buildCounterAuditConfig--;
|
| @@ -79,20 +78,20 @@ buildAuditConfig() {
|
| checkAuditConfig(api.AuditConfig o) {
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - checkUnnamed88(o.auditLogConfigs);
|
| + checkUnnamed83(o.auditLogConfigs);
|
| unittest.expect(o.service, unittest.equals('foo'));
|
| }
|
| buildCounterAuditConfig--;
|
| }
|
|
|
| -buildUnnamed89() {
|
| +buildUnnamed84() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed89(core.List<core.String> o) {
|
| +checkUnnamed84(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'));
|
| @@ -103,7 +102,7 @@ buildAuditLogConfig() {
|
| var o = new api.AuditLogConfig();
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - o.exemptedMembers = buildUnnamed89();
|
| + o.exemptedMembers = buildUnnamed84();
|
| o.logType = "foo";
|
| }
|
| buildCounterAuditLogConfig--;
|
| @@ -113,20 +112,20 @@ buildAuditLogConfig() {
|
| checkAuditLogConfig(api.AuditLogConfig o) {
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - checkUnnamed89(o.exemptedMembers);
|
| + checkUnnamed84(o.exemptedMembers);
|
| unittest.expect(o.logType, unittest.equals('foo'));
|
| }
|
| buildCounterAuditLogConfig--;
|
| }
|
|
|
| -buildUnnamed90() {
|
| +buildUnnamed85() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed90(core.List<core.String> o) {
|
| +checkUnnamed85(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'));
|
| @@ -137,7 +136,7 @@ buildBinding() {
|
| var o = new api.Binding();
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - o.members = buildUnnamed90();
|
| + o.members = buildUnnamed85();
|
| o.role = "foo";
|
| }
|
| buildCounterBinding--;
|
| @@ -147,7 +146,7 @@ buildBinding() {
|
| checkBinding(api.Binding o) {
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - checkUnnamed90(o.members);
|
| + checkUnnamed85(o.members);
|
| unittest.expect(o.role, unittest.equals('foo'));
|
| }
|
| buildCounterBinding--;
|
| @@ -228,27 +227,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--;
|
| }
|
|
|
| -buildUnnamed91() {
|
| +buildUnnamed86() {
|
| var o = new core.List<api.Folder>();
|
| o.add(buildFolder());
|
| o.add(buildFolder());
|
| return o;
|
| }
|
|
|
| -checkUnnamed91(core.List<api.Folder> o) {
|
| +checkUnnamed86(core.List<api.Folder> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkFolder(o[0]);
|
| checkFolder(o[1]);
|
| @@ -259,7 +256,7 @@ buildListFoldersResponse() {
|
| var o = new api.ListFoldersResponse();
|
| buildCounterListFoldersResponse++;
|
| if (buildCounterListFoldersResponse < 3) {
|
| - o.folders = buildUnnamed91();
|
| + o.folders = buildUnnamed86();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListFoldersResponse--;
|
| @@ -269,7 +266,7 @@ buildListFoldersResponse() {
|
| checkListFoldersResponse(api.ListFoldersResponse o) {
|
| buildCounterListFoldersResponse++;
|
| if (buildCounterListFoldersResponse < 3) {
|
| - checkUnnamed91(o.folders);
|
| + checkUnnamed86(o.folders);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListFoldersResponse--;
|
| @@ -294,30 +291,62 @@ checkMoveFolderRequest(api.MoveFolderRequest o) {
|
| buildCounterMoveFolderRequest--;
|
| }
|
|
|
| -buildUnnamed92() {
|
| +buildUnnamed87() {
|
| var o = new core.Map<core.String, core.Object>();
|
| - o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| - o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| + o["x"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| + o["y"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| return o;
|
| }
|
|
|
| -checkUnnamed92(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed87(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
|
| - var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLength(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
|
| + var casted1 = (o["x"]) as core.Map;
|
| + unittest.expect(casted1, unittest.hasLength(3));
|
| + unittest.expect(casted1["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted1["bool"], unittest.equals(true));
|
| + unittest.expect(casted1["string"], unittest.equals('foo'));
|
| + var casted2 = (o["y"]) as core.Map;
|
| + unittest.expect(casted2, unittest.hasLength(3));
|
| + unittest.expect(casted2["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted2["bool"], unittest.equals(true));
|
| + unittest.expect(casted2["string"], unittest.equals('foo'));
|
| }
|
|
|
| -buildUnnamed93() {
|
| +buildUnnamed88() {
|
| var o = new core.Map<core.String, core.Object>();
|
| - o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| - o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| + o["x"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| + o["y"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| return o;
|
| }
|
|
|
| -checkUnnamed93(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed88(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo'));
|
| - var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLength(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo'));
|
| + var casted3 = (o["x"]) as core.Map;
|
| + unittest.expect(casted3, unittest.hasLength(3));
|
| + unittest.expect(casted3["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted3["bool"], unittest.equals(true));
|
| + unittest.expect(casted3["string"], unittest.equals('foo'));
|
| + var casted4 = (o["y"]) as core.Map;
|
| + unittest.expect(casted4, unittest.hasLength(3));
|
| + unittest.expect(casted4["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted4["bool"], unittest.equals(true));
|
| + unittest.expect(casted4["string"], unittest.equals('foo'));
|
| }
|
|
|
| core.int buildCounterOperation = 0;
|
| @@ -327,9 +356,9 @@ buildOperation() {
|
| if (buildCounterOperation < 3) {
|
| o.done = true;
|
| o.error = buildStatus();
|
| - o.metadata = buildUnnamed92();
|
| + o.metadata = buildUnnamed87();
|
| o.name = "foo";
|
| - o.response = buildUnnamed93();
|
| + o.response = buildUnnamed88();
|
| }
|
| buildCounterOperation--;
|
| return o;
|
| @@ -340,34 +369,34 @@ checkOperation(api.Operation o) {
|
| if (buildCounterOperation < 3) {
|
| unittest.expect(o.done, unittest.isTrue);
|
| checkStatus(o.error);
|
| - checkUnnamed92(o.metadata);
|
| + checkUnnamed87(o.metadata);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed93(o.response);
|
| + checkUnnamed88(o.response);
|
| }
|
| buildCounterOperation--;
|
| }
|
|
|
| -buildUnnamed94() {
|
| +buildUnnamed89() {
|
| var o = new core.List<api.AuditConfig>();
|
| o.add(buildAuditConfig());
|
| o.add(buildAuditConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed94(core.List<api.AuditConfig> o) {
|
| +checkUnnamed89(core.List<api.AuditConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditConfig(o[0]);
|
| checkAuditConfig(o[1]);
|
| }
|
|
|
| -buildUnnamed95() {
|
| +buildUnnamed90() {
|
| var o = new core.List<api.Binding>();
|
| o.add(buildBinding());
|
| o.add(buildBinding());
|
| return o;
|
| }
|
|
|
| -checkUnnamed95(core.List<api.Binding> o) {
|
| +checkUnnamed90(core.List<api.Binding> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBinding(o[0]);
|
| checkBinding(o[1]);
|
| @@ -378,8 +407,8 @@ buildPolicy() {
|
| var o = new api.Policy();
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - o.auditConfigs = buildUnnamed94();
|
| - o.bindings = buildUnnamed95();
|
| + o.auditConfigs = buildUnnamed89();
|
| + o.bindings = buildUnnamed90();
|
| o.etag = "foo";
|
| o.version = 42;
|
| }
|
| @@ -390,8 +419,8 @@ buildPolicy() {
|
| checkPolicy(api.Policy o) {
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - checkUnnamed94(o.auditConfigs);
|
| - checkUnnamed95(o.bindings);
|
| + checkUnnamed89(o.auditConfigs);
|
| + checkUnnamed90(o.bindings);
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals(42));
|
| }
|
| @@ -444,14 +473,14 @@ checkSearchFoldersRequest(api.SearchFoldersRequest o) {
|
| buildCounterSearchFoldersRequest--;
|
| }
|
|
|
| -buildUnnamed96() {
|
| +buildUnnamed91() {
|
| var o = new core.List<api.Folder>();
|
| o.add(buildFolder());
|
| o.add(buildFolder());
|
| return o;
|
| }
|
|
|
| -checkUnnamed96(core.List<api.Folder> o) {
|
| +checkUnnamed91(core.List<api.Folder> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkFolder(o[0]);
|
| checkFolder(o[1]);
|
| @@ -462,7 +491,7 @@ buildSearchFoldersResponse() {
|
| var o = new api.SearchFoldersResponse();
|
| buildCounterSearchFoldersResponse++;
|
| if (buildCounterSearchFoldersResponse < 3) {
|
| - o.folders = buildUnnamed96();
|
| + o.folders = buildUnnamed91();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterSearchFoldersResponse--;
|
| @@ -472,7 +501,7 @@ buildSearchFoldersResponse() {
|
| checkSearchFoldersResponse(api.SearchFoldersResponse o) {
|
| buildCounterSearchFoldersResponse++;
|
| if (buildCounterSearchFoldersResponse < 3) {
|
| - checkUnnamed96(o.folders);
|
| + checkUnnamed91(o.folders);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterSearchFoldersResponse--;
|
| @@ -499,30 +528,46 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
|
| buildCounterSetIamPolicyRequest--;
|
| }
|
|
|
| -buildUnnamed97() {
|
| +buildUnnamed92() {
|
| var o = new core.Map<core.String, core.Object>();
|
| - o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| - o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| + o["x"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| + o["y"] = {
|
| + 'list': [1, 2, 3],
|
| + 'bool': true,
|
| + 'string': 'foo'
|
| + };
|
| return o;
|
| }
|
|
|
| -checkUnnamed97(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed92(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], unittest.equals('foo'));
|
| - var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], unittest.equals('foo'));
|
| + var casted5 = (o["x"]) as core.Map;
|
| + unittest.expect(casted5, unittest.hasLength(3));
|
| + unittest.expect(casted5["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted5["bool"], unittest.equals(true));
|
| + unittest.expect(casted5["string"], unittest.equals('foo'));
|
| + var casted6 = (o["y"]) as core.Map;
|
| + unittest.expect(casted6, unittest.hasLength(3));
|
| + unittest.expect(casted6["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted6["bool"], unittest.equals(true));
|
| + unittest.expect(casted6["string"], unittest.equals('foo'));
|
| }
|
|
|
| -buildUnnamed98() {
|
| +buildUnnamed93() {
|
| var o = new core.List<core.Map<core.String, core.Object>>();
|
| - o.add(buildUnnamed97());
|
| - o.add(buildUnnamed97());
|
| + o.add(buildUnnamed92());
|
| + o.add(buildUnnamed92());
|
| return o;
|
| }
|
|
|
| -checkUnnamed98(core.List<core.Map<core.String, core.Object>> o) {
|
| +checkUnnamed93(core.List<core.Map<core.String, core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed97(o[0]);
|
| - checkUnnamed97(o[1]);
|
| + checkUnnamed92(o[0]);
|
| + checkUnnamed92(o[1]);
|
| }
|
|
|
| core.int buildCounterStatus = 0;
|
| @@ -531,7 +576,7 @@ buildStatus() {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| o.code = 42;
|
| - o.details = buildUnnamed98();
|
| + o.details = buildUnnamed93();
|
| o.message = "foo";
|
| }
|
| buildCounterStatus--;
|
| @@ -542,20 +587,20 @@ checkStatus(api.Status o) {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| unittest.expect(o.code, unittest.equals(42));
|
| - checkUnnamed98(o.details);
|
| + checkUnnamed93(o.details);
|
| unittest.expect(o.message, unittest.equals('foo'));
|
| }
|
| buildCounterStatus--;
|
| }
|
|
|
| -buildUnnamed99() {
|
| +buildUnnamed94() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed99(core.List<core.String> o) {
|
| +checkUnnamed94(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'));
|
| @@ -566,7 +611,7 @@ buildTestIamPermissionsRequest() {
|
| var o = new api.TestIamPermissionsRequest();
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - o.permissions = buildUnnamed99();
|
| + o.permissions = buildUnnamed94();
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| return o;
|
| @@ -575,19 +620,19 @@ buildTestIamPermissionsRequest() {
|
| checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - checkUnnamed99(o.permissions);
|
| + checkUnnamed94(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| }
|
|
|
| -buildUnnamed100() {
|
| +buildUnnamed95() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed100(core.List<core.String> o) {
|
| +checkUnnamed95(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'));
|
| @@ -598,7 +643,7 @@ buildTestIamPermissionsResponse() {
|
| var o = new api.TestIamPermissionsResponse();
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - o.permissions = buildUnnamed100();
|
| + o.permissions = buildUnnamed95();
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| return o;
|
| @@ -607,7 +652,7 @@ buildTestIamPermissionsResponse() {
|
| checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - checkUnnamed100(o.permissions);
|
| + checkUnnamed95(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| }
|
| @@ -616,20 +661,17 @@ core.int buildCounterUndeleteFolderRequest = 0;
|
| buildUndeleteFolderRequest() {
|
| var o = new api.UndeleteFolderRequest();
|
| buildCounterUndeleteFolderRequest++;
|
| - if (buildCounterUndeleteFolderRequest < 3) {
|
| - }
|
| + if (buildCounterUndeleteFolderRequest < 3) {}
|
| buildCounterUndeleteFolderRequest--;
|
| return o;
|
| }
|
|
|
| checkUndeleteFolderRequest(api.UndeleteFolderRequest o) {
|
| buildCounterUndeleteFolderRequest++;
|
| - if (buildCounterUndeleteFolderRequest < 3) {
|
| - }
|
| + if (buildCounterUndeleteFolderRequest < 3) {}
|
| buildCounterUndeleteFolderRequest--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-AuditConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -639,7 +681,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-AuditLogConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildAuditLogConfig();
|
| @@ -648,7 +689,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Binding", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBinding();
|
| @@ -657,7 +697,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Folder", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFolder();
|
| @@ -666,7 +705,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-FolderOperation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFolderOperation();
|
| @@ -675,7 +713,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-FolderOperationError", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFolderOperationError();
|
| @@ -684,7 +721,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-GetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGetIamPolicyRequest();
|
| @@ -693,7 +729,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListFoldersResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListFoldersResponse();
|
| @@ -702,7 +737,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-MoveFolderRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildMoveFolderRequest();
|
| @@ -711,7 +745,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Operation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOperation();
|
| @@ -720,7 +753,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Policy", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPolicy();
|
| @@ -729,7 +761,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ProjectCreationStatus", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildProjectCreationStatus();
|
| @@ -738,7 +769,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SearchFoldersRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSearchFoldersRequest();
|
| @@ -747,7 +777,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SearchFoldersResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSearchFoldersResponse();
|
| @@ -756,7 +785,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSetIamPolicyRequest();
|
| @@ -765,7 +793,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Status", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildStatus();
|
| @@ -774,7 +801,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsRequest();
|
| @@ -783,7 +809,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsResponse();
|
| @@ -792,7 +817,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-UndeleteFolderRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildUndeleteFolderRequest();
|
| @@ -801,12 +825,11 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-FoldersResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildFolder();
|
| var arg_parent = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -817,9 +840,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 + 15), unittest.equals("v2beta1/folders"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 15),
|
| + unittest.equals("v2beta1/folders"));
|
| pathOffset += 15;
|
|
|
| var query = (req.url).query;
|
| @@ -832,39 +857,44 @@ 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["parent"].first, unittest.equals(arg_parent));
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildOperation());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, parent: arg_parent).then(unittest.expectAsync1(((api.Operation response) {
|
| + res
|
| + .create(arg_request, parent: arg_parent)
|
| + .then(unittest.expectAsync1(((api.Operation response) {
|
| checkOperation(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_name = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -878,16 +908,17 @@ 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(buildFolder());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -898,18 +929,20 @@ main() {
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_name = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -923,16 +956,17 @@ 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(buildFolder());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -943,9 +977,9 @@ main() {
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildGetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -956,9 +990,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -972,41 +1008,46 @@ 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.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| - var arg_showDeleted = true;
|
| - var arg_pageToken = "foo";
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_pageSize = 42;
|
| var arg_parent = "foo";
|
| + var arg_showDeleted = true;
|
| + var arg_pageToken = "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 + 15), unittest.equals("v2beta1/folders"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 15),
|
| + unittest.equals("v2beta1/folders"));
|
| pathOffset += 15;
|
|
|
| var query = (req.url).query;
|
| @@ -1019,33 +1060,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]));
|
| }
|
| }
|
| - unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_showDeleted"));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
| unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent));
|
| -
|
| + unittest.expect(
|
| + queryMap["showDeleted"].first, unittest.equals("$arg_showDeleted"));
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListFoldersResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(showDeleted: arg_showDeleted, pageToken: arg_pageToken, pageSize: arg_pageSize, parent: arg_parent).then(unittest.expectAsync1(((api.ListFoldersResponse response) {
|
| + res
|
| + .list(
|
| + pageSize: arg_pageSize,
|
| + parent: arg_parent,
|
| + showDeleted: arg_showDeleted,
|
| + pageToken: arg_pageToken)
|
| + .then(unittest.expectAsync1(((api.ListFoldersResponse response) {
|
| checkListFoldersResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--move", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildMoveFolderRequest();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1056,9 +1107,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1072,29 +1125,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(buildOperation());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.move(arg_request, arg_name).then(unittest.expectAsync1(((api.Operation response) {
|
| + res
|
| + .move(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Operation response) {
|
| checkOperation(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--patch", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildFolder();
|
| var arg_name = "foo";
|
| var arg_updateMask = "foo";
|
| @@ -1106,9 +1162,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1122,30 +1180,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["updateMask"].first, unittest.equals(arg_updateMask));
|
| -
|
| + unittest.expect(
|
| + queryMap["updateMask"].first, unittest.equals(arg_updateMask));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildFolder());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest.expectAsync1(((api.Folder response) {
|
| + res
|
| + .patch(arg_request, arg_name, updateMask: arg_updateMask)
|
| + .then(unittest.expectAsync1(((api.Folder response) {
|
| checkFolder(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--search", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildSearchFoldersRequest();
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var obj = new api.SearchFoldersRequest.fromJson(json);
|
| @@ -1155,9 +1217,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 + 22), unittest.equals("v2beta1/folders:search"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 22),
|
| + unittest.equals("v2beta1/folders:search"));
|
| pathOffset += 22;
|
|
|
| var query = (req.url).query;
|
| @@ -1170,29 +1234,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(buildSearchFoldersResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.search(arg_request).then(unittest.expectAsync1(((api.SearchFoldersResponse response) {
|
| + res
|
| + .search(arg_request)
|
| + .then(unittest.expectAsync1(((api.SearchFoldersResponse response) {
|
| checkSearchFoldersResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1203,9 +1270,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1219,29 +1288,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.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1252,9 +1324,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1268,29 +1342,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.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders;
|
| + api.FoldersResourceApi res =
|
| + new api.CloudresourcemanagerApi(mock).folders;
|
| var arg_request = buildUndeleteFolderRequest();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1301,9 +1377,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("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1317,27 +1395,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(buildFolder());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.undelete(arg_request, arg_name).then(unittest.expectAsync1(((api.Folder response) {
|
| + res
|
| + .undelete(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Folder response) {
|
| checkFolder(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|