| Index: generated/googleapis/test/groupssettings/v1_test.dart
|
| diff --git a/generated/googleapis/test/groupssettings/v1_test.dart b/generated/googleapis/test/groupssettings/v1_test.dart
|
| index 299cb555fa44e89619cea18324c63219b11845cf..c6302c4c067bcd33d7edccfce65a102d873fae66 100644
|
| --- a/generated/googleapis/test/groupssettings/v1_test.dart
|
| +++ b/generated/googleapis/test/groupssettings/v1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis.groupssettings.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/groupssettings/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,8 +44,8 @@ class HttpServerMock extends http.BaseClient {
|
| }
|
| }
|
|
|
| -http.StreamedResponse stringResponse(
|
| - core.int status, core.Map<core.String, core.String> headers, core.String body) {
|
| +http.StreamedResponse stringResponse(core.int status,
|
| + core.Map<core.String, core.String> headers, core.String body) {
|
| var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
|
| return new http.StreamedResponse(stream, status, headers: headers);
|
| }
|
| @@ -101,7 +100,8 @@ checkGroups(api.Groups o) {
|
| unittest.expect(o.archiveOnly, unittest.equals('foo'));
|
| unittest.expect(o.customFooterText, unittest.equals('foo'));
|
| unittest.expect(o.customReplyTo, unittest.equals('foo'));
|
| - unittest.expect(o.defaultMessageDenyNotificationText, unittest.equals('foo'));
|
| + unittest.expect(
|
| + o.defaultMessageDenyNotificationText, unittest.equals('foo'));
|
| unittest.expect(o.description, unittest.equals('foo'));
|
| unittest.expect(o.email, unittest.equals('foo'));
|
| unittest.expect(o.includeCustomFooter, unittest.equals('foo'));
|
| @@ -130,7 +130,6 @@ checkGroups(api.Groups o) {
|
| buildCounterGroups--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-Groups", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -140,10 +139,8 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-GroupsResourceApi", () {
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.GroupsResourceApi res = new api.GroupssettingsApi(mock).groups;
|
| var arg_groupUniqueId = "foo";
|
| @@ -152,7 +149,8 @@ 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;
|
|
|
| var query = (req.url).query;
|
| @@ -165,27 +163,29 @@ 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(buildGroups());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_groupUniqueId).then(unittest.expectAsync1(((api.Groups response) {
|
| + res
|
| + .get(arg_groupUniqueId)
|
| + .then(unittest.expectAsync1(((api.Groups response) {
|
| checkGroups(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--patch", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.GroupsResourceApi res = new api.GroupssettingsApi(mock).groups;
|
| var arg_request = buildGroups();
|
| @@ -198,7 +198,8 @@ 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;
|
|
|
| var query = (req.url).query;
|
| @@ -211,27 +212,29 @@ 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(buildGroups());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.patch(arg_request, arg_groupUniqueId).then(unittest.expectAsync1(((api.Groups response) {
|
| + res
|
| + .patch(arg_request, arg_groupUniqueId)
|
| + .then(unittest.expectAsync1(((api.Groups response) {
|
| checkGroups(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--update", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.GroupsResourceApi res = new api.GroupssettingsApi(mock).groups;
|
| var arg_request = buildGroups();
|
| @@ -244,7 +247,8 @@ 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;
|
|
|
| var query = (req.url).query;
|
| @@ -257,27 +261,26 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildGroups());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_groupUniqueId).then(unittest.expectAsync1(((api.Groups response) {
|
| + res
|
| + .update(arg_request, arg_groupUniqueId)
|
| + .then(unittest.expectAsync1(((api.Groups response) {
|
| checkGroups(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|