| Index: generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| diff --git a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| index 14e228567f00165e98e9d49aa0b80a48a809d0b4..031dc1f2fe7aa2f6fc90ddd7b0c8eb6fe5d07209 100644
|
| --- a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| +++ b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| @@ -51,6 +51,40 @@ http.StreamedResponse stringResponse(
|
| return new http.StreamedResponse(stream, status, headers: headers);
|
| }
|
|
|
| +buildUnnamed3764() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3764(core.List<core.String> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + unittest.expect(o[0], unittest.equals('foo'));
|
| + unittest.expect(o[1], unittest.equals('foo'));
|
| +}
|
| +
|
| +core.int buildCounterBinding = 0;
|
| +buildBinding() {
|
| + var o = new api.Binding();
|
| + buildCounterBinding++;
|
| + if (buildCounterBinding < 3) {
|
| + o.members = buildUnnamed3764();
|
| + o.role = "foo";
|
| + }
|
| + buildCounterBinding--;
|
| + return o;
|
| +}
|
| +
|
| +checkBinding(api.Binding o) {
|
| + buildCounterBinding++;
|
| + if (buildCounterBinding < 3) {
|
| + checkUnnamed3764(o.members);
|
| + unittest.expect(o.role, unittest.equals('foo'));
|
| + }
|
| + buildCounterBinding--;
|
| +}
|
| +
|
| core.int buildCounterCardinality = 0;
|
| buildCardinality() {
|
| var o = new api.Cardinality();
|
| @@ -108,14 +142,14 @@ checkEndCondition(api.EndCondition o) {
|
| buildCounterEndCondition--;
|
| }
|
|
|
| -buildUnnamed4048() {
|
| +buildUnnamed3765() {
|
| var o = new core.List<api.RuntimeConfig>();
|
| o.add(buildRuntimeConfig());
|
| o.add(buildRuntimeConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed4048(core.List<api.RuntimeConfig> o) {
|
| +checkUnnamed3765(core.List<api.RuntimeConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkRuntimeConfig(o[0]);
|
| checkRuntimeConfig(o[1]);
|
| @@ -126,7 +160,7 @@ buildListConfigsResponse() {
|
| var o = new api.ListConfigsResponse();
|
| buildCounterListConfigsResponse++;
|
| if (buildCounterListConfigsResponse < 3) {
|
| - o.configs = buildUnnamed4048();
|
| + o.configs = buildUnnamed3765();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListConfigsResponse--;
|
| @@ -136,20 +170,20 @@ buildListConfigsResponse() {
|
| checkListConfigsResponse(api.ListConfigsResponse o) {
|
| buildCounterListConfigsResponse++;
|
| if (buildCounterListConfigsResponse < 3) {
|
| - checkUnnamed4048(o.configs);
|
| + checkUnnamed3765(o.configs);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListConfigsResponse--;
|
| }
|
|
|
| -buildUnnamed4049() {
|
| +buildUnnamed3766() {
|
| var o = new core.List<api.Variable>();
|
| o.add(buildVariable());
|
| o.add(buildVariable());
|
| return o;
|
| }
|
|
|
| -checkUnnamed4049(core.List<api.Variable> o) {
|
| +checkUnnamed3766(core.List<api.Variable> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkVariable(o[0]);
|
| checkVariable(o[1]);
|
| @@ -161,7 +195,7 @@ buildListVariablesResponse() {
|
| buildCounterListVariablesResponse++;
|
| if (buildCounterListVariablesResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.variables = buildUnnamed4049();
|
| + o.variables = buildUnnamed3766();
|
| }
|
| buildCounterListVariablesResponse--;
|
| return o;
|
| @@ -171,19 +205,19 @@ checkListVariablesResponse(api.ListVariablesResponse o) {
|
| buildCounterListVariablesResponse++;
|
| if (buildCounterListVariablesResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed4049(o.variables);
|
| + checkUnnamed3766(o.variables);
|
| }
|
| buildCounterListVariablesResponse--;
|
| }
|
|
|
| -buildUnnamed4050() {
|
| +buildUnnamed3767() {
|
| var o = new core.List<api.Waiter>();
|
| o.add(buildWaiter());
|
| o.add(buildWaiter());
|
| return o;
|
| }
|
|
|
| -checkUnnamed4050(core.List<api.Waiter> o) {
|
| +checkUnnamed3767(core.List<api.Waiter> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkWaiter(o[0]);
|
| checkWaiter(o[1]);
|
| @@ -195,7 +229,7 @@ buildListWaitersResponse() {
|
| buildCounterListWaitersResponse++;
|
| if (buildCounterListWaitersResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.waiters = buildUnnamed4050();
|
| + o.waiters = buildUnnamed3767();
|
| }
|
| buildCounterListWaitersResponse--;
|
| return o;
|
| @@ -205,32 +239,32 @@ checkListWaitersResponse(api.ListWaitersResponse o) {
|
| buildCounterListWaitersResponse++;
|
| if (buildCounterListWaitersResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed4050(o.waiters);
|
| + checkUnnamed3767(o.waiters);
|
| }
|
| buildCounterListWaitersResponse--;
|
| }
|
|
|
| -buildUnnamed4051() {
|
| +buildUnnamed3768() {
|
| 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'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed4051(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3768(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'));
|
| }
|
|
|
| -buildUnnamed4052() {
|
| +buildUnnamed3769() {
|
| 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'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed4052(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3769(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'));
|
| @@ -243,9 +277,9 @@ buildOperation() {
|
| if (buildCounterOperation < 3) {
|
| o.done = true;
|
| o.error = buildStatus();
|
| - o.metadata = buildUnnamed4051();
|
| + o.metadata = buildUnnamed3768();
|
| o.name = "foo";
|
| - o.response = buildUnnamed4052();
|
| + o.response = buildUnnamed3769();
|
| }
|
| buildCounterOperation--;
|
| return o;
|
| @@ -256,13 +290,49 @@ checkOperation(api.Operation o) {
|
| if (buildCounterOperation < 3) {
|
| unittest.expect(o.done, unittest.isTrue);
|
| checkStatus(o.error);
|
| - checkUnnamed4051(o.metadata);
|
| + checkUnnamed3768(o.metadata);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed4052(o.response);
|
| + checkUnnamed3769(o.response);
|
| }
|
| buildCounterOperation--;
|
| }
|
|
|
| +buildUnnamed3770() {
|
| + var o = new core.List<api.Binding>();
|
| + o.add(buildBinding());
|
| + o.add(buildBinding());
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3770(core.List<api.Binding> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + checkBinding(o[0]);
|
| + checkBinding(o[1]);
|
| +}
|
| +
|
| +core.int buildCounterPolicy = 0;
|
| +buildPolicy() {
|
| + var o = new api.Policy();
|
| + buildCounterPolicy++;
|
| + if (buildCounterPolicy < 3) {
|
| + o.bindings = buildUnnamed3770();
|
| + o.etag = "foo";
|
| + o.version = 42;
|
| + }
|
| + buildCounterPolicy--;
|
| + return o;
|
| +}
|
| +
|
| +checkPolicy(api.Policy o) {
|
| + buildCounterPolicy++;
|
| + if (buildCounterPolicy < 3) {
|
| + checkUnnamed3770(o.bindings);
|
| + unittest.expect(o.etag, unittest.equals('foo'));
|
| + unittest.expect(o.version, unittest.equals(42));
|
| + }
|
| + buildCounterPolicy--;
|
| +}
|
| +
|
| core.int buildCounterRuntimeConfig = 0;
|
| buildRuntimeConfig() {
|
| var o = new api.RuntimeConfig();
|
| @@ -284,30 +354,49 @@ checkRuntimeConfig(api.RuntimeConfig o) {
|
| buildCounterRuntimeConfig--;
|
| }
|
|
|
| -buildUnnamed4053() {
|
| +core.int buildCounterSetIamPolicyRequest = 0;
|
| +buildSetIamPolicyRequest() {
|
| + var o = new api.SetIamPolicyRequest();
|
| + buildCounterSetIamPolicyRequest++;
|
| + if (buildCounterSetIamPolicyRequest < 3) {
|
| + o.policy = buildPolicy();
|
| + }
|
| + buildCounterSetIamPolicyRequest--;
|
| + return o;
|
| +}
|
| +
|
| +checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
|
| + buildCounterSetIamPolicyRequest++;
|
| + if (buildCounterSetIamPolicyRequest < 3) {
|
| + checkPolicy(o.policy);
|
| + }
|
| + buildCounterSetIamPolicyRequest--;
|
| +}
|
| +
|
| +buildUnnamed3771() {
|
| 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'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed4053(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3771(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'));
|
| }
|
|
|
| -buildUnnamed4054() {
|
| +buildUnnamed3772() {
|
| var o = new core.List<core.Map<core.String, core.Object>>();
|
| - o.add(buildUnnamed4053());
|
| - o.add(buildUnnamed4053());
|
| + o.add(buildUnnamed3771());
|
| + o.add(buildUnnamed3771());
|
| return o;
|
| }
|
|
|
| -checkUnnamed4054(core.List<core.Map<core.String, core.Object>> o) {
|
| +checkUnnamed3772(core.List<core.Map<core.String, core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed4053(o[0]);
|
| - checkUnnamed4053(o[1]);
|
| + checkUnnamed3771(o[0]);
|
| + checkUnnamed3771(o[1]);
|
| }
|
|
|
| core.int buildCounterStatus = 0;
|
| @@ -316,7 +405,7 @@ buildStatus() {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| o.code = 42;
|
| - o.details = buildUnnamed4054();
|
| + o.details = buildUnnamed3772();
|
| o.message = "foo";
|
| }
|
| buildCounterStatus--;
|
| @@ -327,12 +416,76 @@ checkStatus(api.Status o) {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| unittest.expect(o.code, unittest.equals(42));
|
| - checkUnnamed4054(o.details);
|
| + checkUnnamed3772(o.details);
|
| unittest.expect(o.message, unittest.equals('foo'));
|
| }
|
| buildCounterStatus--;
|
| }
|
|
|
| +buildUnnamed3773() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3773(core.List<core.String> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + unittest.expect(o[0], unittest.equals('foo'));
|
| + unittest.expect(o[1], unittest.equals('foo'));
|
| +}
|
| +
|
| +core.int buildCounterTestIamPermissionsRequest = 0;
|
| +buildTestIamPermissionsRequest() {
|
| + var o = new api.TestIamPermissionsRequest();
|
| + buildCounterTestIamPermissionsRequest++;
|
| + if (buildCounterTestIamPermissionsRequest < 3) {
|
| + o.permissions = buildUnnamed3773();
|
| + }
|
| + buildCounterTestIamPermissionsRequest--;
|
| + return o;
|
| +}
|
| +
|
| +checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| + buildCounterTestIamPermissionsRequest++;
|
| + if (buildCounterTestIamPermissionsRequest < 3) {
|
| + checkUnnamed3773(o.permissions);
|
| + }
|
| + buildCounterTestIamPermissionsRequest--;
|
| +}
|
| +
|
| +buildUnnamed3774() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3774(core.List<core.String> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + unittest.expect(o[0], unittest.equals('foo'));
|
| + unittest.expect(o[1], unittest.equals('foo'));
|
| +}
|
| +
|
| +core.int buildCounterTestIamPermissionsResponse = 0;
|
| +buildTestIamPermissionsResponse() {
|
| + var o = new api.TestIamPermissionsResponse();
|
| + buildCounterTestIamPermissionsResponse++;
|
| + if (buildCounterTestIamPermissionsResponse < 3) {
|
| + o.permissions = buildUnnamed3774();
|
| + }
|
| + buildCounterTestIamPermissionsResponse--;
|
| + return o;
|
| +}
|
| +
|
| +checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| + buildCounterTestIamPermissionsResponse++;
|
| + if (buildCounterTestIamPermissionsResponse < 3) {
|
| + checkUnnamed3774(o.permissions);
|
| + }
|
| + buildCounterTestIamPermissionsResponse--;
|
| +}
|
| +
|
| core.int buildCounterVariable = 0;
|
| buildVariable() {
|
| var o = new api.Variable();
|
| @@ -410,8 +563,56 @@ checkWatchVariableRequest(api.WatchVariableRequest o) {
|
| buildCounterWatchVariableRequest--;
|
| }
|
|
|
| +buildUnnamed3775() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3775(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'));
|
| +}
|
| +
|
| +buildUnnamed3776() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3776(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'));
|
| +}
|
| +
|
| +buildUnnamed3777() {
|
| + var o = new core.List<core.String>();
|
| + o.add("foo");
|
| + o.add("foo");
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3777(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'));
|
| +}
|
| +
|
|
|
| main() {
|
| + unittest.group("obj-schema-Binding", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildBinding();
|
| + var od = new api.Binding.fromJson(o.toJson());
|
| + checkBinding(od);
|
| + });
|
| + });
|
| +
|
| +
|
| unittest.group("obj-schema-Cardinality", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildCardinality();
|
| @@ -475,6 +676,15 @@ main() {
|
| });
|
|
|
|
|
| + unittest.group("obj-schema-Policy", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildPolicy();
|
| + var od = new api.Policy.fromJson(o.toJson());
|
| + checkPolicy(od);
|
| + });
|
| + });
|
| +
|
| +
|
| unittest.group("obj-schema-RuntimeConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildRuntimeConfig();
|
| @@ -484,6 +694,15 @@ main() {
|
| });
|
|
|
|
|
| + unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildSetIamPolicyRequest();
|
| + var od = new api.SetIamPolicyRequest.fromJson(o.toJson());
|
| + checkSetIamPolicyRequest(od);
|
| + });
|
| + });
|
| +
|
| +
|
| unittest.group("obj-schema-Status", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildStatus();
|
| @@ -493,6 +712,24 @@ main() {
|
| });
|
|
|
|
|
| + unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildTestIamPermissionsRequest();
|
| + var od = new api.TestIamPermissionsRequest.fromJson(o.toJson());
|
| + checkTestIamPermissionsRequest(od);
|
| + });
|
| + });
|
| +
|
| +
|
| + unittest.group("obj-schema-TestIamPermissionsResponse", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildTestIamPermissionsResponse();
|
| + var od = new api.TestIamPermissionsResponse.fromJson(o.toJson());
|
| + checkTestIamPermissionsResponse(od);
|
| + });
|
| + });
|
| +
|
| +
|
| unittest.group("obj-schema-Variable", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildVariable();
|
| @@ -662,6 +899,51 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--getIamPolicy", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + var arg_resource = "foo";
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildPolicy());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy response) {
|
| + checkPolicy(response);
|
| + })));
|
| + });
|
| +
|
| unittest.test("method--list", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -711,6 +993,104 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--setIamPolicy", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + var arg_request = buildSetIamPolicyRequest();
|
| + var arg_resource = "foo";
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var obj = new api.SetIamPolicyRequest.fromJson(json);
|
| + checkSetIamPolicyRequest(obj);
|
| +
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildPolicy());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.Policy response) {
|
| + checkPolicy(response);
|
| + })));
|
| + });
|
| +
|
| + unittest.test("method--testIamPermissions", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + var arg_request = buildTestIamPermissionsRequest();
|
| + var arg_resource = "foo";
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var obj = new api.TestIamPermissionsRequest.fromJson(json);
|
| + checkTestIamPermissionsRequest(obj);
|
| +
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildTestIamPermissionsResponse());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync(((api.TestIamPermissionsResponse response) {
|
| + checkTestIamPermissionsResponse(response);
|
| + })));
|
| + });
|
| +
|
| unittest.test("method--update", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -809,6 +1189,53 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--testIamPermissions", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.operations;
|
| + var arg_resource = "foo";
|
| + var arg_permissions = buildUnnamed3775();
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| + unittest.expect(queryMap["permissions"], unittest.equals(arg_permissions));
|
| +
|
| +
|
| + var h = {
|
| + "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_resource, permissions: arg_permissions).then(unittest.expectAsync(((api.TestIamPermissionsResponse response) {
|
| + checkTestIamPermissionsResponse(response);
|
| + })));
|
| + });
|
| +
|
| });
|
|
|
|
|
| @@ -1007,6 +1434,53 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--testIamPermissions", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + var arg_resource = "foo";
|
| + var arg_permissions = buildUnnamed3776();
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| + unittest.expect(queryMap["permissions"], unittest.equals(arg_permissions));
|
| +
|
| +
|
| + var h = {
|
| + "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_resource, permissions: arg_permissions).then(unittest.expectAsync(((api.TestIamPermissionsResponse response) {
|
| + checkTestIamPermissionsResponse(response);
|
| + })));
|
| + });
|
| +
|
| unittest.test("method--update", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -1299,6 +1773,53 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--testIamPermissions", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + var arg_resource = "foo";
|
| + var arg_permissions = buildUnnamed3777();
|
| + mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| + unittest.expect(queryMap["permissions"], unittest.equals(arg_permissions));
|
| +
|
| +
|
| + var h = {
|
| + "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_resource, permissions: arg_permissions).then(unittest.expectAsync(((api.TestIamPermissionsResponse response) {
|
| + checkTestIamPermissionsResponse(response);
|
| + })));
|
| + });
|
| +
|
| });
|
|
|
|
|
|
|