| Index: generated/googleapis/test/pubsub/v1_test.dart
|
| diff --git a/generated/googleapis/test/pubsub/v1_test.dart b/generated/googleapis/test/pubsub/v1_test.dart
|
| index f49da3265395de08afd220ebd04e32166482c567..52f12ed960171efe1adddc3a1ed3273873c1b005 100644
|
| --- a/generated/googleapis/test/pubsub/v1_test.dart
|
| +++ b/generated/googleapis/test/pubsub/v1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis.pubsub.v1.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/pubsub/v1.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);
|
| }
|
|
|
| -buildUnnamed1273() {
|
| +buildUnnamed1269() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1273(core.List<core.String> o) {
|
| +checkUnnamed1269(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 @@ buildAcknowledgeRequest() {
|
| var o = new api.AcknowledgeRequest();
|
| buildCounterAcknowledgeRequest++;
|
| if (buildCounterAcknowledgeRequest < 3) {
|
| - o.ackIds = buildUnnamed1273();
|
| + o.ackIds = buildUnnamed1269();
|
| }
|
| buildCounterAcknowledgeRequest--;
|
| return o;
|
| @@ -78,19 +77,19 @@ buildAcknowledgeRequest() {
|
| checkAcknowledgeRequest(api.AcknowledgeRequest o) {
|
| buildCounterAcknowledgeRequest++;
|
| if (buildCounterAcknowledgeRequest < 3) {
|
| - checkUnnamed1273(o.ackIds);
|
| + checkUnnamed1269(o.ackIds);
|
| }
|
| buildCounterAcknowledgeRequest--;
|
| }
|
|
|
| -buildUnnamed1274() {
|
| +buildUnnamed1270() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1274(core.List<core.String> o) {
|
| +checkUnnamed1270(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'));
|
| @@ -101,7 +100,7 @@ buildBinding() {
|
| var o = new api.Binding();
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - o.members = buildUnnamed1274();
|
| + o.members = buildUnnamed1270();
|
| o.role = "foo";
|
| }
|
| buildCounterBinding--;
|
| @@ -111,7 +110,7 @@ buildBinding() {
|
| checkBinding(api.Binding o) {
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - checkUnnamed1274(o.members);
|
| + checkUnnamed1270(o.members);
|
| unittest.expect(o.role, unittest.equals('foo'));
|
| }
|
| buildCounterBinding--;
|
| @@ -121,27 +120,25 @@ 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--;
|
| }
|
|
|
| -buildUnnamed1275() {
|
| +buildUnnamed1271() {
|
| var o = new core.List<api.Subscription>();
|
| o.add(buildSubscription());
|
| o.add(buildSubscription());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1275(core.List<api.Subscription> o) {
|
| +checkUnnamed1271(core.List<api.Subscription> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkSubscription(o[0]);
|
| checkSubscription(o[1]);
|
| @@ -153,7 +150,7 @@ buildListSubscriptionsResponse() {
|
| buildCounterListSubscriptionsResponse++;
|
| if (buildCounterListSubscriptionsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.subscriptions = buildUnnamed1275();
|
| + o.subscriptions = buildUnnamed1271();
|
| }
|
| buildCounterListSubscriptionsResponse--;
|
| return o;
|
| @@ -163,19 +160,19 @@ checkListSubscriptionsResponse(api.ListSubscriptionsResponse o) {
|
| buildCounterListSubscriptionsResponse++;
|
| if (buildCounterListSubscriptionsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed1275(o.subscriptions);
|
| + checkUnnamed1271(o.subscriptions);
|
| }
|
| buildCounterListSubscriptionsResponse--;
|
| }
|
|
|
| -buildUnnamed1276() {
|
| +buildUnnamed1272() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1276(core.List<core.String> o) {
|
| +checkUnnamed1272(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'));
|
| @@ -187,7 +184,7 @@ buildListTopicSubscriptionsResponse() {
|
| buildCounterListTopicSubscriptionsResponse++;
|
| if (buildCounterListTopicSubscriptionsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.subscriptions = buildUnnamed1276();
|
| + o.subscriptions = buildUnnamed1272();
|
| }
|
| buildCounterListTopicSubscriptionsResponse--;
|
| return o;
|
| @@ -197,19 +194,19 @@ checkListTopicSubscriptionsResponse(api.ListTopicSubscriptionsResponse o) {
|
| buildCounterListTopicSubscriptionsResponse++;
|
| if (buildCounterListTopicSubscriptionsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed1276(o.subscriptions);
|
| + checkUnnamed1272(o.subscriptions);
|
| }
|
| buildCounterListTopicSubscriptionsResponse--;
|
| }
|
|
|
| -buildUnnamed1277() {
|
| +buildUnnamed1273() {
|
| var o = new core.List<api.Topic>();
|
| o.add(buildTopic());
|
| o.add(buildTopic());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1277(core.List<api.Topic> o) {
|
| +checkUnnamed1273(core.List<api.Topic> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkTopic(o[0]);
|
| checkTopic(o[1]);
|
| @@ -221,7 +218,7 @@ buildListTopicsResponse() {
|
| buildCounterListTopicsResponse++;
|
| if (buildCounterListTopicsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.topics = buildUnnamed1277();
|
| + o.topics = buildUnnamed1273();
|
| }
|
| buildCounterListTopicsResponse--;
|
| return o;
|
| @@ -231,19 +228,19 @@ checkListTopicsResponse(api.ListTopicsResponse o) {
|
| buildCounterListTopicsResponse++;
|
| if (buildCounterListTopicsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed1277(o.topics);
|
| + checkUnnamed1273(o.topics);
|
| }
|
| buildCounterListTopicsResponse--;
|
| }
|
|
|
| -buildUnnamed1278() {
|
| +buildUnnamed1274() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1278(core.List<core.String> o) {
|
| +checkUnnamed1274(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'));
|
| @@ -255,7 +252,7 @@ buildModifyAckDeadlineRequest() {
|
| buildCounterModifyAckDeadlineRequest++;
|
| if (buildCounterModifyAckDeadlineRequest < 3) {
|
| o.ackDeadlineSeconds = 42;
|
| - o.ackIds = buildUnnamed1278();
|
| + o.ackIds = buildUnnamed1274();
|
| }
|
| buildCounterModifyAckDeadlineRequest--;
|
| return o;
|
| @@ -265,7 +262,7 @@ checkModifyAckDeadlineRequest(api.ModifyAckDeadlineRequest o) {
|
| buildCounterModifyAckDeadlineRequest++;
|
| if (buildCounterModifyAckDeadlineRequest < 3) {
|
| unittest.expect(o.ackDeadlineSeconds, unittest.equals(42));
|
| - checkUnnamed1278(o.ackIds);
|
| + checkUnnamed1274(o.ackIds);
|
| }
|
| buildCounterModifyAckDeadlineRequest--;
|
| }
|
| @@ -289,14 +286,14 @@ checkModifyPushConfigRequest(api.ModifyPushConfigRequest o) {
|
| buildCounterModifyPushConfigRequest--;
|
| }
|
|
|
| -buildUnnamed1279() {
|
| +buildUnnamed1275() {
|
| var o = new core.List<api.Binding>();
|
| o.add(buildBinding());
|
| o.add(buildBinding());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1279(core.List<api.Binding> o) {
|
| +checkUnnamed1275(core.List<api.Binding> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBinding(o[0]);
|
| checkBinding(o[1]);
|
| @@ -307,7 +304,7 @@ buildPolicy() {
|
| var o = new api.Policy();
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - o.bindings = buildUnnamed1279();
|
| + o.bindings = buildUnnamed1275();
|
| o.etag = "foo";
|
| o.version = 42;
|
| }
|
| @@ -318,21 +315,21 @@ buildPolicy() {
|
| checkPolicy(api.Policy o) {
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - checkUnnamed1279(o.bindings);
|
| + checkUnnamed1275(o.bindings);
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals(42));
|
| }
|
| buildCounterPolicy--;
|
| }
|
|
|
| -buildUnnamed1280() {
|
| +buildUnnamed1276() {
|
| var o = new core.List<api.PubsubMessage>();
|
| o.add(buildPubsubMessage());
|
| o.add(buildPubsubMessage());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1280(core.List<api.PubsubMessage> o) {
|
| +checkUnnamed1276(core.List<api.PubsubMessage> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkPubsubMessage(o[0]);
|
| checkPubsubMessage(o[1]);
|
| @@ -343,7 +340,7 @@ buildPublishRequest() {
|
| var o = new api.PublishRequest();
|
| buildCounterPublishRequest++;
|
| if (buildCounterPublishRequest < 3) {
|
| - o.messages = buildUnnamed1280();
|
| + o.messages = buildUnnamed1276();
|
| }
|
| buildCounterPublishRequest--;
|
| return o;
|
| @@ -352,19 +349,19 @@ buildPublishRequest() {
|
| checkPublishRequest(api.PublishRequest o) {
|
| buildCounterPublishRequest++;
|
| if (buildCounterPublishRequest < 3) {
|
| - checkUnnamed1280(o.messages);
|
| + checkUnnamed1276(o.messages);
|
| }
|
| buildCounterPublishRequest--;
|
| }
|
|
|
| -buildUnnamed1281() {
|
| +buildUnnamed1277() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1281(core.List<core.String> o) {
|
| +checkUnnamed1277(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'));
|
| @@ -375,7 +372,7 @@ buildPublishResponse() {
|
| var o = new api.PublishResponse();
|
| buildCounterPublishResponse++;
|
| if (buildCounterPublishResponse < 3) {
|
| - o.messageIds = buildUnnamed1281();
|
| + o.messageIds = buildUnnamed1277();
|
| }
|
| buildCounterPublishResponse--;
|
| return o;
|
| @@ -384,19 +381,19 @@ buildPublishResponse() {
|
| checkPublishResponse(api.PublishResponse o) {
|
| buildCounterPublishResponse++;
|
| if (buildCounterPublishResponse < 3) {
|
| - checkUnnamed1281(o.messageIds);
|
| + checkUnnamed1277(o.messageIds);
|
| }
|
| buildCounterPublishResponse--;
|
| }
|
|
|
| -buildUnnamed1282() {
|
| +buildUnnamed1278() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed1282(core.Map<core.String, core.String> o) {
|
| +checkUnnamed1278(core.Map<core.String, core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o["x"], unittest.equals('foo'));
|
| unittest.expect(o["y"], unittest.equals('foo'));
|
| @@ -407,7 +404,7 @@ buildPubsubMessage() {
|
| var o = new api.PubsubMessage();
|
| buildCounterPubsubMessage++;
|
| if (buildCounterPubsubMessage < 3) {
|
| - o.attributes = buildUnnamed1282();
|
| + o.attributes = buildUnnamed1278();
|
| o.data = "foo";
|
| o.messageId = "foo";
|
| o.publishTime = "foo";
|
| @@ -419,7 +416,7 @@ buildPubsubMessage() {
|
| checkPubsubMessage(api.PubsubMessage o) {
|
| buildCounterPubsubMessage++;
|
| if (buildCounterPubsubMessage < 3) {
|
| - checkUnnamed1282(o.attributes);
|
| + checkUnnamed1278(o.attributes);
|
| unittest.expect(o.data, unittest.equals('foo'));
|
| unittest.expect(o.messageId, unittest.equals('foo'));
|
| unittest.expect(o.publishTime, unittest.equals('foo'));
|
| @@ -448,14 +445,14 @@ checkPullRequest(api.PullRequest o) {
|
| buildCounterPullRequest--;
|
| }
|
|
|
| -buildUnnamed1283() {
|
| +buildUnnamed1279() {
|
| var o = new core.List<api.ReceivedMessage>();
|
| o.add(buildReceivedMessage());
|
| o.add(buildReceivedMessage());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1283(core.List<api.ReceivedMessage> o) {
|
| +checkUnnamed1279(core.List<api.ReceivedMessage> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkReceivedMessage(o[0]);
|
| checkReceivedMessage(o[1]);
|
| @@ -466,7 +463,7 @@ buildPullResponse() {
|
| var o = new api.PullResponse();
|
| buildCounterPullResponse++;
|
| if (buildCounterPullResponse < 3) {
|
| - o.receivedMessages = buildUnnamed1283();
|
| + o.receivedMessages = buildUnnamed1279();
|
| }
|
| buildCounterPullResponse--;
|
| return o;
|
| @@ -475,19 +472,19 @@ buildPullResponse() {
|
| checkPullResponse(api.PullResponse o) {
|
| buildCounterPullResponse++;
|
| if (buildCounterPullResponse < 3) {
|
| - checkUnnamed1283(o.receivedMessages);
|
| + checkUnnamed1279(o.receivedMessages);
|
| }
|
| buildCounterPullResponse--;
|
| }
|
|
|
| -buildUnnamed1284() {
|
| +buildUnnamed1280() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed1284(core.Map<core.String, core.String> o) {
|
| +checkUnnamed1280(core.Map<core.String, core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o["x"], unittest.equals('foo'));
|
| unittest.expect(o["y"], unittest.equals('foo'));
|
| @@ -498,7 +495,7 @@ buildPushConfig() {
|
| var o = new api.PushConfig();
|
| buildCounterPushConfig++;
|
| if (buildCounterPushConfig < 3) {
|
| - o.attributes = buildUnnamed1284();
|
| + o.attributes = buildUnnamed1280();
|
| o.pushEndpoint = "foo";
|
| }
|
| buildCounterPushConfig--;
|
| @@ -508,7 +505,7 @@ buildPushConfig() {
|
| checkPushConfig(api.PushConfig o) {
|
| buildCounterPushConfig++;
|
| if (buildCounterPushConfig < 3) {
|
| - checkUnnamed1284(o.attributes);
|
| + checkUnnamed1280(o.attributes);
|
| unittest.expect(o.pushEndpoint, unittest.equals('foo'));
|
| }
|
| buildCounterPushConfig--;
|
| @@ -579,14 +576,14 @@ checkSubscription(api.Subscription o) {
|
| buildCounterSubscription--;
|
| }
|
|
|
| -buildUnnamed1285() {
|
| +buildUnnamed1281() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1285(core.List<core.String> o) {
|
| +checkUnnamed1281(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'));
|
| @@ -597,7 +594,7 @@ buildTestIamPermissionsRequest() {
|
| var o = new api.TestIamPermissionsRequest();
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - o.permissions = buildUnnamed1285();
|
| + o.permissions = buildUnnamed1281();
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| return o;
|
| @@ -606,19 +603,19 @@ buildTestIamPermissionsRequest() {
|
| checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - checkUnnamed1285(o.permissions);
|
| + checkUnnamed1281(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| }
|
|
|
| -buildUnnamed1286() {
|
| +buildUnnamed1282() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1286(core.List<core.String> o) {
|
| +checkUnnamed1282(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'));
|
| @@ -629,7 +626,7 @@ buildTestIamPermissionsResponse() {
|
| var o = new api.TestIamPermissionsResponse();
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - o.permissions = buildUnnamed1286();
|
| + o.permissions = buildUnnamed1282();
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| return o;
|
| @@ -638,7 +635,7 @@ buildTestIamPermissionsResponse() {
|
| checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - checkUnnamed1286(o.permissions);
|
| + checkUnnamed1282(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| }
|
| @@ -662,7 +659,6 @@ checkTopic(api.Topic o) {
|
| buildCounterTopic--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-AcknowledgeRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -672,7 +668,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Binding", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBinding();
|
| @@ -681,7 +676,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -690,7 +684,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListSubscriptionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListSubscriptionsResponse();
|
| @@ -699,7 +692,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListTopicSubscriptionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListTopicSubscriptionsResponse();
|
| @@ -708,7 +700,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListTopicsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListTopicsResponse();
|
| @@ -717,7 +708,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ModifyAckDeadlineRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildModifyAckDeadlineRequest();
|
| @@ -726,7 +716,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ModifyPushConfigRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildModifyPushConfigRequest();
|
| @@ -735,7 +724,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Policy", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPolicy();
|
| @@ -744,7 +732,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PublishRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPublishRequest();
|
| @@ -753,7 +740,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PublishResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPublishResponse();
|
| @@ -762,7 +748,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PubsubMessage", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPubsubMessage();
|
| @@ -771,7 +756,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PullRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPullRequest();
|
| @@ -780,7 +764,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PullResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPullResponse();
|
| @@ -789,7 +772,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-PushConfig", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildPushConfig();
|
| @@ -798,7 +780,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ReceivedMessage", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildReceivedMessage();
|
| @@ -807,7 +788,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSetIamPolicyRequest();
|
| @@ -816,7 +796,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Subscription", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSubscription();
|
| @@ -825,7 +804,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsRequest();
|
| @@ -834,7 +812,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsResponse();
|
| @@ -843,7 +820,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Topic", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTopic();
|
| @@ -852,21 +828,22 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsSnapshotsResourceApi", () {
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSnapshotsResourceApi res = new api.PubsubApi(mock).projects.snapshots;
|
| + api.ProjectsSnapshotsResourceApi res =
|
| + new api.PubsubApi(mock).projects.snapshots;
|
| 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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -880,29 +857,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--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSnapshotsResourceApi res = new api.PubsubApi(mock).projects.snapshots;
|
| + api.ProjectsSnapshotsResourceApi res =
|
| + new api.PubsubApi(mock).projects.snapshots;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -913,9 +893,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -929,29 +911,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.ProjectsSnapshotsResourceApi res = new api.PubsubApi(mock).projects.snapshots;
|
| + api.ProjectsSnapshotsResourceApi res =
|
| + new api.PubsubApi(mock).projects.snapshots;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -962,9 +947,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -978,33 +965,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-ProjectsSubscriptionsResourceApi", () {
|
| unittest.test("method--acknowledge", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildAcknowledgeRequest();
|
| var arg_subscription = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1015,9 +1002,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1031,29 +1020,32 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.acknowledge(arg_request, arg_subscription).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .acknowledge(arg_request, arg_subscription)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildSubscription();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1064,9 +1056,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1080,38 +1074,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(buildSubscription());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_name).then(unittest.expectAsync1(((api.Subscription response) {
|
| + res
|
| + .create(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Subscription response) {
|
| checkSubscription(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_subscription = "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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1125,38 +1124,43 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.delete(arg_subscription).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_subscription)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_subscription = "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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1170,38 +1174,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(buildSubscription());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_subscription).then(unittest.expectAsync1(((api.Subscription response) {
|
| + res
|
| + .get(arg_subscription)
|
| + .then(unittest.expectAsync1(((api.Subscription response) {
|
| checkSubscription(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| 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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1215,40 +1224,45 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.getIamPolicy(arg_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.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_project = "foo";
|
| - var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| + var arg_pageToken = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1262,31 +1276,37 @@ 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(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(buildListSubscriptionsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_project, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListSubscriptionsResponse response) {
|
| + res
|
| + .list(arg_project, pageSize: arg_pageSize, pageToken: arg_pageToken)
|
| + .then(
|
| + unittest.expectAsync1(((api.ListSubscriptionsResponse response) {
|
| checkListSubscriptionsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--modifyAckDeadline", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildModifyAckDeadlineRequest();
|
| var arg_subscription = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1297,9 +1317,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1313,29 +1335,32 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.modifyAckDeadline(arg_request, arg_subscription).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .modifyAckDeadline(arg_request, arg_subscription)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--modifyPushConfig", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildModifyPushConfigRequest();
|
| var arg_subscription = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1346,9 +1371,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1362,29 +1389,32 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.modifyPushConfig(arg_request, arg_subscription).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .modifyPushConfig(arg_request, arg_subscription)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--pull", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildPullRequest();
|
| var arg_subscription = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1395,9 +1425,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1411,29 +1443,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(buildPullResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.pull(arg_request, arg_subscription).then(unittest.expectAsync1(((api.PullResponse response) {
|
| + res
|
| + .pull(arg_request, arg_subscription)
|
| + .then(unittest.expectAsync1(((api.PullResponse response) {
|
| checkPullResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1444,9 +1479,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1460,29 +1497,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.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions;
|
| + api.ProjectsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.subscriptions;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1493,9 +1533,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1509,33 +1551,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-ProjectsTopicsResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_request = buildTopic();
|
| var arg_name = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1546,9 +1588,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1562,38 +1606,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(buildTopic());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_name).then(unittest.expectAsync1(((api.Topic response) {
|
| + res
|
| + .create(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Topic response) {
|
| checkTopic(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_topic = "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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1607,16 +1656,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));
|
| @@ -1627,18 +1677,20 @@ main() {
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_topic = "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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1652,16 +1704,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(buildTopic());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1672,18 +1725,20 @@ main() {
|
| });
|
|
|
| unittest.test("method--getIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| 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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1697,29 +1752,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.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_project = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| @@ -1728,9 +1786,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1744,31 +1804,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(buildListTopicsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_project, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListTopicsResponse response) {
|
| + res
|
| + .list(arg_project, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListTopicsResponse response) {
|
| checkListTopicsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--publish", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_request = buildPublishRequest();
|
| var arg_topic = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1779,9 +1844,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1795,29 +1862,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(buildPublishResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.publish(arg_request, arg_topic).then(unittest.expectAsync1(((api.PublishResponse response) {
|
| + res
|
| + .publish(arg_request, arg_topic)
|
| + .then(unittest.expectAsync1(((api.PublishResponse response) {
|
| checkPublishResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--setIamPolicy", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_request = buildSetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1828,9 +1898,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1844,29 +1916,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.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topics;
|
| + api.ProjectsTopicsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics;
|
| var arg_request = buildTestIamPermissionsRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1877,9 +1952,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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1893,44 +1970,46 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(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-ProjectsTopicsSubscriptionsResourceApi", () {
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTopicsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.topics.subscriptions;
|
| + api.ProjectsTopicsSubscriptionsResourceApi res =
|
| + new api.PubsubApi(mock).projects.topics.subscriptions;
|
| var arg_topic = "foo";
|
| - var arg_pageSize = 42;
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| 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 + 3), unittest.equals("v1/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| pathOffset += 3;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1944,29 +2023,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]));
|
| }
|
| }
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + 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(buildListTopicSubscriptionsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_topic, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListTopicSubscriptionsResponse response) {
|
| + res
|
| + .list(arg_topic, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest
|
| + .expectAsync1(((api.ListTopicSubscriptionsResponse response) {
|
| checkListTopicSubscriptionsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|