Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: generated/googleapis/test/cloudfunctions/v1_test.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: generated/googleapis/test/cloudfunctions/v1_test.dart
diff --git a/generated/googleapis/test/cloudfunctions/v1_test.dart b/generated/googleapis/test/cloudfunctions/v1_test.dart
index c232eef0b708a79be5a145142331b98adc1aabd5..6d1ba94188e423a171060e4b24358e186fe1e159 100644
--- a/generated/googleapis/test/cloudfunctions/v1_test.dart
+++ b/generated/googleapis/test/cloudfunctions/v1_test.dart
@@ -1,12 +1,10 @@
library googleapis.cloudfunctions.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/cloudfunctions/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);
}
-buildUnnamed146() {
+buildUnnamed141() {
var o = new core.List<api.Location>();
o.add(buildLocation());
o.add(buildLocation());
return o;
}
-checkUnnamed146(core.List<api.Location> o) {
+checkUnnamed141(core.List<api.Location> o) {
unittest.expect(o, unittest.hasLength(2));
checkLocation(o[0]);
checkLocation(o[1]);
@@ -69,7 +68,7 @@ buildListLocationsResponse() {
var o = new api.ListLocationsResponse();
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
- o.locations = buildUnnamed146();
+ o.locations = buildUnnamed141();
o.nextPageToken = "foo";
}
buildCounterListLocationsResponse--;
@@ -79,20 +78,20 @@ buildListLocationsResponse() {
checkListLocationsResponse(api.ListLocationsResponse o) {
buildCounterListLocationsResponse++;
if (buildCounterListLocationsResponse < 3) {
- checkUnnamed146(o.locations);
+ checkUnnamed141(o.locations);
unittest.expect(o.nextPageToken, unittest.equals('foo'));
}
buildCounterListLocationsResponse--;
}
-buildUnnamed147() {
+buildUnnamed142() {
var o = new core.List<api.Operation>();
o.add(buildOperation());
o.add(buildOperation());
return o;
}
-checkUnnamed147(core.List<api.Operation> o) {
+checkUnnamed142(core.List<api.Operation> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperation(o[0]);
checkOperation(o[1]);
@@ -104,7 +103,7 @@ buildListOperationsResponse() {
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
o.nextPageToken = "foo";
- o.operations = buildUnnamed147();
+ o.operations = buildUnnamed142();
}
buildCounterListOperationsResponse--;
return o;
@@ -114,35 +113,51 @@ checkListOperationsResponse(api.ListOperationsResponse o) {
buildCounterListOperationsResponse++;
if (buildCounterListOperationsResponse < 3) {
unittest.expect(o.nextPageToken, unittest.equals('foo'));
- checkUnnamed147(o.operations);
+ checkUnnamed142(o.operations);
}
buildCounterListOperationsResponse--;
}
-buildUnnamed148() {
+buildUnnamed143() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
-checkUnnamed148(core.Map<core.String, core.String> o) {
+checkUnnamed143(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'));
}
-buildUnnamed149() {
+buildUnnamed144() {
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;
}
-checkUnnamed149(core.Map<core.String, core.Object> o) {
+checkUnnamed144(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'));
}
core.int buildCounterLocation = 0;
@@ -150,9 +165,9 @@ buildLocation() {
var o = new api.Location();
buildCounterLocation++;
if (buildCounterLocation < 3) {
- o.labels = buildUnnamed148();
+ o.labels = buildUnnamed143();
o.locationId = "foo";
- o.metadata = buildUnnamed149();
+ o.metadata = buildUnnamed144();
o.name = "foo";
}
buildCounterLocation--;
@@ -162,38 +177,70 @@ buildLocation() {
checkLocation(api.Location o) {
buildCounterLocation++;
if (buildCounterLocation < 3) {
- checkUnnamed148(o.labels);
+ checkUnnamed143(o.labels);
unittest.expect(o.locationId, unittest.equals('foo'));
- checkUnnamed149(o.metadata);
+ checkUnnamed144(o.metadata);
unittest.expect(o.name, unittest.equals('foo'));
}
buildCounterLocation--;
}
-buildUnnamed150() {
+buildUnnamed145() {
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;
}
-checkUnnamed150(core.Map<core.String, core.Object> o) {
+checkUnnamed145(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'));
}
-buildUnnamed151() {
+buildUnnamed146() {
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;
}
-checkUnnamed151(core.Map<core.String, core.Object> o) {
+checkUnnamed146(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'));
}
core.int buildCounterOperation = 0;
@@ -203,9 +250,9 @@ buildOperation() {
if (buildCounterOperation < 3) {
o.done = true;
o.error = buildStatus();
- o.metadata = buildUnnamed150();
+ o.metadata = buildUnnamed145();
o.name = "foo";
- o.response = buildUnnamed151();
+ o.response = buildUnnamed146();
}
buildCounterOperation--;
return o;
@@ -216,24 +263,40 @@ checkOperation(api.Operation o) {
if (buildCounterOperation < 3) {
unittest.expect(o.done, unittest.isTrue);
checkStatus(o.error);
- checkUnnamed150(o.metadata);
+ checkUnnamed145(o.metadata);
unittest.expect(o.name, unittest.equals('foo'));
- checkUnnamed151(o.response);
+ checkUnnamed146(o.response);
}
buildCounterOperation--;
}
-buildUnnamed152() {
+buildUnnamed147() {
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;
}
-checkUnnamed152(core.Map<core.String, core.Object> o) {
+checkUnnamed147(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
- var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.expect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], unittest.equals('foo'));
- var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLength(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.expect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], unittest.equals('foo'));
+ var casted7 = (o["x"]) as core.Map;
+ unittest.expect(casted7, unittest.hasLength(3));
+ unittest.expect(casted7["list"], unittest.equals([1, 2, 3]));
+ unittest.expect(casted7["bool"], unittest.equals(true));
+ unittest.expect(casted7["string"], unittest.equals('foo'));
+ var casted8 = (o["y"]) as core.Map;
+ unittest.expect(casted8, unittest.hasLength(3));
+ unittest.expect(casted8["list"], unittest.equals([1, 2, 3]));
+ unittest.expect(casted8["bool"], unittest.equals(true));
+ unittest.expect(casted8["string"], unittest.equals('foo'));
}
core.int buildCounterOperationMetadataV1Beta2 = 0;
@@ -241,7 +304,7 @@ buildOperationMetadataV1Beta2() {
var o = new api.OperationMetadataV1Beta2();
buildCounterOperationMetadataV1Beta2++;
if (buildCounterOperationMetadataV1Beta2 < 3) {
- o.request = buildUnnamed152();
+ o.request = buildUnnamed147();
o.target = "foo";
o.type = "foo";
}
@@ -252,37 +315,53 @@ buildOperationMetadataV1Beta2() {
checkOperationMetadataV1Beta2(api.OperationMetadataV1Beta2 o) {
buildCounterOperationMetadataV1Beta2++;
if (buildCounterOperationMetadataV1Beta2 < 3) {
- checkUnnamed152(o.request);
+ checkUnnamed147(o.request);
unittest.expect(o.target, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterOperationMetadataV1Beta2--;
}
-buildUnnamed153() {
+buildUnnamed148() {
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;
}
-checkUnnamed153(core.Map<core.String, core.Object> o) {
+checkUnnamed148(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
- var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLength(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.expect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"], unittest.equals('foo'));
- var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLength(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["string"], unittest.equals('foo'));
+ var casted9 = (o["x"]) as core.Map;
+ unittest.expect(casted9, unittest.hasLength(3));
+ unittest.expect(casted9["list"], unittest.equals([1, 2, 3]));
+ unittest.expect(casted9["bool"], unittest.equals(true));
+ unittest.expect(casted9["string"], unittest.equals('foo'));
+ var casted10 = (o["y"]) as core.Map;
+ unittest.expect(casted10, unittest.hasLength(3));
+ unittest.expect(casted10["list"], unittest.equals([1, 2, 3]));
+ unittest.expect(casted10["bool"], unittest.equals(true));
+ unittest.expect(casted10["string"], unittest.equals('foo'));
}
-buildUnnamed154() {
+buildUnnamed149() {
var o = new core.List<core.Map<core.String, core.Object>>();
- o.add(buildUnnamed153());
- o.add(buildUnnamed153());
+ o.add(buildUnnamed148());
+ o.add(buildUnnamed148());
return o;
}
-checkUnnamed154(core.List<core.Map<core.String, core.Object>> o) {
+checkUnnamed149(core.List<core.Map<core.String, core.Object>> o) {
unittest.expect(o, unittest.hasLength(2));
- checkUnnamed153(o[0]);
- checkUnnamed153(o[1]);
+ checkUnnamed148(o[0]);
+ checkUnnamed148(o[1]);
}
core.int buildCounterStatus = 0;
@@ -291,7 +370,7 @@ buildStatus() {
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
- o.details = buildUnnamed154();
+ o.details = buildUnnamed149();
o.message = "foo";
}
buildCounterStatus--;
@@ -302,13 +381,12 @@ checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(o.code, unittest.equals(42));
- checkUnnamed154(o.details);
+ checkUnnamed149(o.details);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterStatus--;
}
-
main() {
unittest.group("obj-schema-ListLocationsResponse", () {
unittest.test("to-json--from-json", () {
@@ -318,7 +396,6 @@ main() {
});
});
-
unittest.group("obj-schema-ListOperationsResponse", () {
unittest.test("to-json--from-json", () {
var o = buildListOperationsResponse();
@@ -327,7 +404,6 @@ main() {
});
});
-
unittest.group("obj-schema-Location", () {
unittest.test("to-json--from-json", () {
var o = buildLocation();
@@ -336,7 +412,6 @@ main() {
});
});
-
unittest.group("obj-schema-Operation", () {
unittest.test("to-json--from-json", () {
var o = buildOperation();
@@ -345,7 +420,6 @@ main() {
});
});
-
unittest.group("obj-schema-OperationMetadataV1Beta2", () {
unittest.test("to-json--from-json", () {
var o = buildOperationMetadataV1Beta2();
@@ -354,7 +428,6 @@ main() {
});
});
-
unittest.group("obj-schema-Status", () {
unittest.test("to-json--from-json", () {
var o = buildStatus();
@@ -363,21 +436,22 @@ main() {
});
});
-
unittest.group("resource-OperationsResourceApi", () {
unittest.test("method--get", () {
-
var mock = new HttpServerMock();
- api.OperationsResourceApi res = new api.CloudfunctionsApi(mock).operations;
+ api.OperationsResourceApi res =
+ new api.CloudfunctionsApi(mock).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 + 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;
@@ -391,16 +465,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));
@@ -411,9 +486,9 @@ main() {
});
unittest.test("method--list", () {
-
var mock = new HttpServerMock();
- api.OperationsResourceApi res = new api.CloudfunctionsApi(mock).operations;
+ api.OperationsResourceApi res =
+ new api.CloudfunctionsApi(mock).operations;
var arg_pageToken = "foo";
var arg_name = "foo";
var arg_pageSize = 42;
@@ -423,9 +498,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 + 13), unittest.equals("v1/operations"));
+ unittest.expect(path.substring(pathOffset, pathOffset + 13),
+ unittest.equals("v1/operations"));
pathOffset += 13;
var query = (req.url).query;
@@ -438,49 +515,58 @@ 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(
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken));
unittest.expect(queryMap["name"].first, unittest.equals(arg_name));
- 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["filter"].first, unittest.equals(arg_filter));
-
var h = {
- "content-type" : "application/json; charset=utf-8",
+ "content-type": "application/json; charset=utf-8",
};
var resp = convert.JSON.encode(buildListOperationsResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
- res.list(pageToken: arg_pageToken, name: arg_name, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync1(((api.ListOperationsResponse response) {
+ res
+ .list(
+ pageToken: arg_pageToken,
+ name: arg_name,
+ pageSize: arg_pageSize,
+ filter: arg_filter)
+ .then(unittest.expectAsync1(((api.ListOperationsResponse response) {
checkListOperationsResponse(response);
})));
});
-
});
-
unittest.group("resource-ProjectsLocationsResourceApi", () {
unittest.test("method--list", () {
-
var mock = new HttpServerMock();
- api.ProjectsLocationsResourceApi res = new api.CloudfunctionsApi(mock).projects.locations;
+ api.ProjectsLocationsResourceApi res =
+ new api.CloudfunctionsApi(mock).projects.locations;
var arg_name = "foo";
- var arg_filter = "foo";
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 + 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;
@@ -494,30 +580,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["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["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(buildListLocationsResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
- res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListLocationsResponse response) {
+ res
+ .list(arg_name,
+ pageToken: arg_pageToken,
+ pageSize: arg_pageSize,
+ filter: arg_filter)
+ .then(unittest.expectAsync1(((api.ListLocationsResponse response) {
checkListLocationsResponse(response);
})));
});
-
});
-
-
}
-
« no previous file with comments | « generated/googleapis/test/clouddebugger/v2_test.dart ('k') | generated/googleapis/test/cloudkms/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698