| 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 516b93d8566b2a3a98f0aadfbb8a86765ad567bb..a584826458fc4256a79614185618934320fb7466 100644
|
| --- a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| +++ b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis_beta.runtimeconfig.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/runtimeconfig/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,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);
|
| }
|
|
|
| -buildUnnamed3553() {
|
| +buildUnnamed3561() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3553(core.List<core.String> o) {
|
| +checkUnnamed3561(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'));
|
| @@ -69,7 +68,7 @@ buildBinding() {
|
| var o = new api.Binding();
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - o.members = buildUnnamed3553();
|
| + o.members = buildUnnamed3561();
|
| o.role = "foo";
|
| }
|
| buildCounterBinding--;
|
| @@ -79,7 +78,7 @@ buildBinding() {
|
| checkBinding(api.Binding o) {
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - checkUnnamed3553(o.members);
|
| + checkUnnamed3561(o.members);
|
| unittest.expect(o.role, unittest.equals('foo'));
|
| }
|
| buildCounterBinding--;
|
| @@ -110,16 +109,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--;
|
| }
|
|
|
| @@ -142,14 +139,14 @@ checkEndCondition(api.EndCondition o) {
|
| buildCounterEndCondition--;
|
| }
|
|
|
| -buildUnnamed3554() {
|
| +buildUnnamed3562() {
|
| var o = new core.List<api.RuntimeConfig>();
|
| o.add(buildRuntimeConfig());
|
| o.add(buildRuntimeConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3554(core.List<api.RuntimeConfig> o) {
|
| +checkUnnamed3562(core.List<api.RuntimeConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkRuntimeConfig(o[0]);
|
| checkRuntimeConfig(o[1]);
|
| @@ -160,7 +157,7 @@ buildListConfigsResponse() {
|
| var o = new api.ListConfigsResponse();
|
| buildCounterListConfigsResponse++;
|
| if (buildCounterListConfigsResponse < 3) {
|
| - o.configs = buildUnnamed3554();
|
| + o.configs = buildUnnamed3562();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListConfigsResponse--;
|
| @@ -170,20 +167,20 @@ buildListConfigsResponse() {
|
| checkListConfigsResponse(api.ListConfigsResponse o) {
|
| buildCounterListConfigsResponse++;
|
| if (buildCounterListConfigsResponse < 3) {
|
| - checkUnnamed3554(o.configs);
|
| + checkUnnamed3562(o.configs);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListConfigsResponse--;
|
| }
|
|
|
| -buildUnnamed3555() {
|
| +buildUnnamed3563() {
|
| var o = new core.List<api.Variable>();
|
| o.add(buildVariable());
|
| o.add(buildVariable());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3555(core.List<api.Variable> o) {
|
| +checkUnnamed3563(core.List<api.Variable> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkVariable(o[0]);
|
| checkVariable(o[1]);
|
| @@ -195,7 +192,7 @@ buildListVariablesResponse() {
|
| buildCounterListVariablesResponse++;
|
| if (buildCounterListVariablesResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.variables = buildUnnamed3555();
|
| + o.variables = buildUnnamed3563();
|
| }
|
| buildCounterListVariablesResponse--;
|
| return o;
|
| @@ -205,19 +202,19 @@ checkListVariablesResponse(api.ListVariablesResponse o) {
|
| buildCounterListVariablesResponse++;
|
| if (buildCounterListVariablesResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3555(o.variables);
|
| + checkUnnamed3563(o.variables);
|
| }
|
| buildCounterListVariablesResponse--;
|
| }
|
|
|
| -buildUnnamed3556() {
|
| +buildUnnamed3564() {
|
| var o = new core.List<api.Waiter>();
|
| o.add(buildWaiter());
|
| o.add(buildWaiter());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3556(core.List<api.Waiter> o) {
|
| +checkUnnamed3564(core.List<api.Waiter> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkWaiter(o[0]);
|
| checkWaiter(o[1]);
|
| @@ -229,7 +226,7 @@ buildListWaitersResponse() {
|
| buildCounterListWaitersResponse++;
|
| if (buildCounterListWaitersResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.waiters = buildUnnamed3556();
|
| + o.waiters = buildUnnamed3564();
|
| }
|
| buildCounterListWaitersResponse--;
|
| return o;
|
| @@ -239,35 +236,67 @@ checkListWaitersResponse(api.ListWaitersResponse o) {
|
| buildCounterListWaitersResponse++;
|
| if (buildCounterListWaitersResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3556(o.waiters);
|
| + checkUnnamed3564(o.waiters);
|
| }
|
| buildCounterListWaitersResponse--;
|
| }
|
|
|
| -buildUnnamed3557() {
|
| +buildUnnamed3565() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed3557(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3565(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'));
|
| }
|
|
|
| -buildUnnamed3558() {
|
| +buildUnnamed3566() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed3558(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3566(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;
|
| @@ -277,9 +306,9 @@ buildOperation() {
|
| if (buildCounterOperation < 3) {
|
| o.done = true;
|
| o.error = buildStatus();
|
| - o.metadata = buildUnnamed3557();
|
| + o.metadata = buildUnnamed3565();
|
| o.name = "foo";
|
| - o.response = buildUnnamed3558();
|
| + o.response = buildUnnamed3566();
|
| }
|
| buildCounterOperation--;
|
| return o;
|
| @@ -290,21 +319,21 @@ checkOperation(api.Operation o) {
|
| if (buildCounterOperation < 3) {
|
| unittest.expect(o.done, unittest.isTrue);
|
| checkStatus(o.error);
|
| - checkUnnamed3557(o.metadata);
|
| + checkUnnamed3565(o.metadata);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed3558(o.response);
|
| + checkUnnamed3566(o.response);
|
| }
|
| buildCounterOperation--;
|
| }
|
|
|
| -buildUnnamed3559() {
|
| +buildUnnamed3567() {
|
| var o = new core.List<api.Binding>();
|
| o.add(buildBinding());
|
| o.add(buildBinding());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3559(core.List<api.Binding> o) {
|
| +checkUnnamed3567(core.List<api.Binding> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBinding(o[0]);
|
| checkBinding(o[1]);
|
| @@ -315,7 +344,7 @@ buildPolicy() {
|
| var o = new api.Policy();
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - o.bindings = buildUnnamed3559();
|
| + o.bindings = buildUnnamed3567();
|
| o.etag = "foo";
|
| o.version = 42;
|
| }
|
| @@ -326,7 +355,7 @@ buildPolicy() {
|
| checkPolicy(api.Policy o) {
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - checkUnnamed3559(o.bindings);
|
| + checkUnnamed3567(o.bindings);
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals(42));
|
| }
|
| @@ -373,30 +402,46 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
|
| buildCounterSetIamPolicyRequest--;
|
| }
|
|
|
| -buildUnnamed3560() {
|
| +buildUnnamed3568() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed3560(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3568(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'));
|
| }
|
|
|
| -buildUnnamed3561() {
|
| +buildUnnamed3569() {
|
| var o = new core.List<core.Map<core.String, core.Object>>();
|
| - o.add(buildUnnamed3560());
|
| - o.add(buildUnnamed3560());
|
| + o.add(buildUnnamed3568());
|
| + o.add(buildUnnamed3568());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3561(core.List<core.Map<core.String, core.Object>> o) {
|
| +checkUnnamed3569(core.List<core.Map<core.String, core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed3560(o[0]);
|
| - checkUnnamed3560(o[1]);
|
| + checkUnnamed3568(o[0]);
|
| + checkUnnamed3568(o[1]);
|
| }
|
|
|
| core.int buildCounterStatus = 0;
|
| @@ -405,7 +450,7 @@ buildStatus() {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| o.code = 42;
|
| - o.details = buildUnnamed3561();
|
| + o.details = buildUnnamed3569();
|
| o.message = "foo";
|
| }
|
| buildCounterStatus--;
|
| @@ -416,20 +461,20 @@ checkStatus(api.Status o) {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| unittest.expect(o.code, unittest.equals(42));
|
| - checkUnnamed3561(o.details);
|
| + checkUnnamed3569(o.details);
|
| unittest.expect(o.message, unittest.equals('foo'));
|
| }
|
| buildCounterStatus--;
|
| }
|
|
|
| -buildUnnamed3562() {
|
| +buildUnnamed3570() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3562(core.List<core.String> o) {
|
| +checkUnnamed3570(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'));
|
| @@ -440,7 +485,7 @@ buildTestIamPermissionsRequest() {
|
| var o = new api.TestIamPermissionsRequest();
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - o.permissions = buildUnnamed3562();
|
| + o.permissions = buildUnnamed3570();
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| return o;
|
| @@ -449,19 +494,19 @@ buildTestIamPermissionsRequest() {
|
| checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - checkUnnamed3562(o.permissions);
|
| + checkUnnamed3570(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| }
|
|
|
| -buildUnnamed3563() {
|
| +buildUnnamed3571() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3563(core.List<core.String> o) {
|
| +checkUnnamed3571(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'));
|
| @@ -472,7 +517,7 @@ buildTestIamPermissionsResponse() {
|
| var o = new api.TestIamPermissionsResponse();
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - o.permissions = buildUnnamed3563();
|
| + o.permissions = buildUnnamed3571();
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| return o;
|
| @@ -481,7 +526,7 @@ buildTestIamPermissionsResponse() {
|
| checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - checkUnnamed3563(o.permissions);
|
| + checkUnnamed3571(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| }
|
| @@ -563,7 +608,6 @@ checkWatchVariableRequest(api.WatchVariableRequest o) {
|
| buildCounterWatchVariableRequest--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-Binding", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -573,7 +617,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Cardinality", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildCardinality();
|
| @@ -582,7 +625,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -591,7 +633,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-EndCondition", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEndCondition();
|
| @@ -600,7 +641,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListConfigsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListConfigsResponse();
|
| @@ -609,7 +649,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListVariablesResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListVariablesResponse();
|
| @@ -618,7 +657,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListWaitersResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListWaitersResponse();
|
| @@ -627,7 +665,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Operation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOperation();
|
| @@ -636,7 +673,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Policy", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPolicy();
|
| @@ -645,7 +681,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-RuntimeConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildRuntimeConfig();
|
| @@ -654,7 +689,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSetIamPolicyRequest();
|
| @@ -663,7 +697,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Status", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildStatus();
|
| @@ -672,7 +705,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsRequest();
|
| @@ -681,7 +713,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsResponse();
|
| @@ -690,7 +721,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Variable", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildVariable();
|
| @@ -699,7 +729,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Waiter", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildWaiter();
|
| @@ -708,7 +737,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-WatchVariableRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildWatchVariableRequest();
|
| @@ -717,12 +745,11 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsConfigsResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_request = buildRuntimeConfig();
|
| var arg_parent = "foo";
|
| var arg_requestId = "foo";
|
| @@ -734,9 +761,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;
|
|
|
| @@ -750,39 +779,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["requestId"].first, unittest.equals(arg_requestId));
|
| -
|
| + unittest.expect(
|
| + queryMap["requestId"].first, unittest.equals(arg_requestId));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildRuntimeConfig());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| + res
|
| + .create(arg_request, arg_parent, requestId: arg_requestId)
|
| + .then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| checkRuntimeConfig(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| 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("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;
|
|
|
| @@ -796,16 +831,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(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -816,18 +852,20 @@ main() {
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| 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("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;
|
|
|
| @@ -841,38 +879,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(buildRuntimeConfig());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_name).then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| + res
|
| + .get(arg_name)
|
| + .then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| checkRuntimeConfig(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_resource = "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("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;
|
|
|
| @@ -886,29 +929,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.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy response) {
|
| + res
|
| + .getIamPolicy(arg_resource)
|
| + .then(unittest.expectAsync1(((api.Policy response) {
|
| checkPolicy(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_parent = "foo";
|
| var arg_pageSize = 42;
|
| var arg_pageToken = "foo";
|
| @@ -917,9 +963,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;
|
|
|
| @@ -933,31 +981,36 @@ 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(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
| + 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(buildListConfigsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListConfigsResponse response) {
|
| + res
|
| + .list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken)
|
| + .then(unittest.expectAsync1(((api.ListConfigsResponse response) {
|
| checkListConfigsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -968,9 +1021,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;
|
|
|
| @@ -984,29 +1039,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.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1017,9 +1075,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;
|
|
|
| @@ -1033,29 +1093,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.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs;
|
| + api.ProjectsConfigsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs;
|
| var arg_request = buildRuntimeConfig();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1066,9 +1128,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;
|
|
|
| @@ -1082,42 +1146,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(buildRuntimeConfig());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_name).then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| + res
|
| + .update(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.RuntimeConfig response) {
|
| checkRuntimeConfig(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsConfigsOperationsResourceApi", () {
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.operations;
|
| + api.ProjectsConfigsOperationsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.operations;
|
| 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("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;
|
|
|
| @@ -1131,16 +1198,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(buildOperation());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1151,9 +1219,9 @@ main() {
|
| });
|
|
|
| unittest.test("method--testIamPermissions", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.operations;
|
| + api.ProjectsConfigsOperationsResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.operations;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1164,9 +1232,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;
|
|
|
| @@ -1180,33 +1250,33 @@ 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.group("resource-ProjectsConfigsVariablesResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_request = buildVariable();
|
| var arg_parent = "foo";
|
| var arg_requestId = "foo";
|
| @@ -1218,9 +1288,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;
|
|
|
| @@ -1234,30 +1306,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["requestId"].first, unittest.equals(arg_requestId));
|
| -
|
| + unittest.expect(
|
| + queryMap["requestId"].first, unittest.equals(arg_requestId));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildVariable());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittest.expectAsync1(((api.Variable response) {
|
| + res
|
| + .create(arg_request, arg_parent, requestId: arg_requestId)
|
| + .then(unittest.expectAsync1(((api.Variable response) {
|
| checkVariable(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_name = "foo";
|
| var arg_recursive = true;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1265,9 +1341,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;
|
|
|
| @@ -1281,39 +1359,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["recursive"].first, unittest.equals("$arg_recursive"));
|
| -
|
| + unittest.expect(
|
| + queryMap["recursive"].first, unittest.equals("$arg_recursive"));
|
|
|
| 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_name, recursive: arg_recursive).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_name, recursive: arg_recursive)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| 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("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;
|
|
|
| @@ -1327,16 +1411,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(buildVariable());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1347,22 +1432,24 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_parent = "foo";
|
| - var arg_pageSize = 42;
|
| - var arg_filter = "foo";
|
| var arg_returnValues = true;
|
| 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 + 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;
|
|
|
| @@ -1376,33 +1463,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(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| + unittest.expect(queryMap["returnValues"].first,
|
| + unittest.equals("$arg_returnValues"));
|
| + 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["returnValues"].first, unittest.equals("$arg_returnValues"));
|
| - 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(buildListVariablesResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageSize: arg_pageSize, filter: arg_filter, returnValues: arg_returnValues, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListVariablesResponse response) {
|
| + res
|
| + .list(arg_parent,
|
| + returnValues: arg_returnValues,
|
| + pageToken: arg_pageToken,
|
| + pageSize: arg_pageSize,
|
| + filter: arg_filter)
|
| + .then(unittest.expectAsync1(((api.ListVariablesResponse response) {
|
| checkListVariablesResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--testIamPermissions", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1413,9 +1510,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;
|
|
|
| @@ -1429,29 +1528,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.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_request = buildVariable();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1462,9 +1563,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;
|
|
|
| @@ -1478,29 +1581,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(buildVariable());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_name).then(unittest.expectAsync1(((api.Variable response) {
|
| + res
|
| + .update(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Variable response) {
|
| checkVariable(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--watch", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| + api.ProjectsConfigsVariablesResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.variables;
|
| var arg_request = buildWatchVariableRequest();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1511,9 +1617,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;
|
|
|
| @@ -1527,33 +1635,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(buildVariable());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.watch(arg_request, arg_name).then(unittest.expectAsync1(((api.Variable response) {
|
| + res
|
| + .watch(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Variable response) {
|
| checkVariable(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsConfigsWaitersResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + api.ProjectsConfigsWaitersResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| var arg_request = buildWaiter();
|
| var arg_parent = "foo";
|
| var arg_requestId = "foo";
|
| @@ -1565,9 +1674,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;
|
|
|
| @@ -1581,39 +1692,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["requestId"].first, unittest.equals(arg_requestId));
|
| -
|
| + unittest.expect(
|
| + queryMap["requestId"].first, unittest.equals(arg_requestId));
|
|
|
| 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, arg_parent, requestId: arg_requestId).then(unittest.expectAsync1(((api.Operation response) {
|
| + res
|
| + .create(arg_request, arg_parent, requestId: arg_requestId)
|
| + .then(unittest.expectAsync1(((api.Operation response) {
|
| checkOperation(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + api.ProjectsConfigsWaitersResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| 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("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;
|
|
|
| @@ -1627,16 +1744,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(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1647,18 +1765,20 @@ main() {
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + api.ProjectsConfigsWaitersResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| 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("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;
|
|
|
| @@ -1672,16 +1792,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(buildWaiter());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1692,9 +1813,9 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + api.ProjectsConfigsWaitersResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| var arg_parent = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| @@ -1703,9 +1824,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;
|
|
|
| @@ -1719,31 +1842,36 @@ 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["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(buildListWaitersResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListWaitersResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListWaitersResponse response) {
|
| checkListWaitersResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--testIamPermissions", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| + api.ProjectsConfigsWaitersResourceApi res =
|
| + new api.RuntimeconfigApi(mock).projects.configs.waiters;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1754,9 +1882,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;
|
|
|
| @@ -1770,27 +1900,25 @@ 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);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|