Index: generated/googleapis/test/sourcerepo/v1_test.dart |
diff --git a/generated/googleapis/test/sourcerepo/v1_test.dart b/generated/googleapis/test/sourcerepo/v1_test.dart |
index 01c147848c7c4b938553640c7c1251057a8fd784..9775b72cba3b1b3304eb4411827c5fed89461e6f 100644 |
--- a/generated/googleapis/test/sourcerepo/v1_test.dart |
+++ b/generated/googleapis/test/sourcerepo/v1_test.dart |
@@ -1,12 +1,10 @@ |
library googleapis.sourcerepo.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/sourcerepo/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,33 +44,33 @@ 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); |
} |
-buildUnnamed496() { |
+buildUnnamed495() { |
var o = new core.List<api.AuditLogConfig>(); |
o.add(buildAuditLogConfig()); |
o.add(buildAuditLogConfig()); |
return o; |
} |
-checkUnnamed496(core.List<api.AuditLogConfig> o) { |
+checkUnnamed495(core.List<api.AuditLogConfig> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAuditLogConfig(o[0]); |
checkAuditLogConfig(o[1]); |
} |
-buildUnnamed497() { |
+buildUnnamed496() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed497(core.List<core.String> o) { |
+checkUnnamed496(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')); |
@@ -82,8 +81,8 @@ buildAuditConfig() { |
var o = new api.AuditConfig(); |
buildCounterAuditConfig++; |
if (buildCounterAuditConfig < 3) { |
- o.auditLogConfigs = buildUnnamed496(); |
- o.exemptedMembers = buildUnnamed497(); |
+ o.auditLogConfigs = buildUnnamed495(); |
+ o.exemptedMembers = buildUnnamed496(); |
o.service = "foo"; |
} |
buildCounterAuditConfig--; |
@@ -93,21 +92,21 @@ buildAuditConfig() { |
checkAuditConfig(api.AuditConfig o) { |
buildCounterAuditConfig++; |
if (buildCounterAuditConfig < 3) { |
- checkUnnamed496(o.auditLogConfigs); |
- checkUnnamed497(o.exemptedMembers); |
+ checkUnnamed495(o.auditLogConfigs); |
+ checkUnnamed496(o.exemptedMembers); |
unittest.expect(o.service, unittest.equals('foo')); |
} |
buildCounterAuditConfig--; |
} |
-buildUnnamed498() { |
+buildUnnamed497() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed498(core.List<core.String> o) { |
+checkUnnamed497(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')); |
@@ -118,7 +117,7 @@ buildAuditLogConfig() { |
var o = new api.AuditLogConfig(); |
buildCounterAuditLogConfig++; |
if (buildCounterAuditLogConfig < 3) { |
- o.exemptedMembers = buildUnnamed498(); |
+ o.exemptedMembers = buildUnnamed497(); |
o.logType = "foo"; |
} |
buildCounterAuditLogConfig--; |
@@ -128,20 +127,20 @@ buildAuditLogConfig() { |
checkAuditLogConfig(api.AuditLogConfig o) { |
buildCounterAuditLogConfig++; |
if (buildCounterAuditLogConfig < 3) { |
- checkUnnamed498(o.exemptedMembers); |
+ checkUnnamed497(o.exemptedMembers); |
unittest.expect(o.logType, unittest.equals('foo')); |
} |
buildCounterAuditLogConfig--; |
} |
-buildUnnamed499() { |
+buildUnnamed498() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed499(core.List<core.String> o) { |
+checkUnnamed498(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')); |
@@ -152,7 +151,7 @@ buildBinding() { |
var o = new api.Binding(); |
buildCounterBinding++; |
if (buildCounterBinding < 3) { |
- o.members = buildUnnamed499(); |
+ o.members = buildUnnamed498(); |
o.role = "foo"; |
} |
buildCounterBinding--; |
@@ -162,7 +161,7 @@ buildBinding() { |
checkBinding(api.Binding o) { |
buildCounterBinding++; |
if (buildCounterBinding < 3) { |
- checkUnnamed499(o.members); |
+ checkUnnamed498(o.members); |
unittest.expect(o.role, unittest.equals('foo')); |
} |
buildCounterBinding--; |
@@ -187,14 +186,14 @@ checkCloudAuditOptions(api.CloudAuditOptions o) { |
buildCounterCloudAuditOptions--; |
} |
-buildUnnamed500() { |
+buildUnnamed499() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed500(core.List<core.String> o) { |
+checkUnnamed499(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')); |
@@ -210,7 +209,7 @@ buildCondition() { |
o.svc = "foo"; |
o.sys = "foo"; |
o.value = "foo"; |
- o.values = buildUnnamed500(); |
+ o.values = buildUnnamed499(); |
} |
buildCounterCondition--; |
return o; |
@@ -224,7 +223,7 @@ checkCondition(api.Condition o) { |
unittest.expect(o.svc, unittest.equals('foo')); |
unittest.expect(o.sys, unittest.equals('foo')); |
unittest.expect(o.value, unittest.equals('foo')); |
- checkUnnamed500(o.values); |
+ checkUnnamed499(o.values); |
} |
buildCounterCondition--; |
} |
@@ -254,16 +253,14 @@ core.int buildCounterDataAccessOptions = 0; |
buildDataAccessOptions() { |
var o = new api.DataAccessOptions(); |
buildCounterDataAccessOptions++; |
- if (buildCounterDataAccessOptions < 3) { |
- } |
+ if (buildCounterDataAccessOptions < 3) {} |
buildCounterDataAccessOptions--; |
return o; |
} |
checkDataAccessOptions(api.DataAccessOptions o) { |
buildCounterDataAccessOptions++; |
- if (buildCounterDataAccessOptions < 3) { |
- } |
+ if (buildCounterDataAccessOptions < 3) {} |
buildCounterDataAccessOptions--; |
} |
@@ -271,27 +268,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--; |
} |
-buildUnnamed501() { |
+buildUnnamed500() { |
var o = new core.List<api.Repo>(); |
o.add(buildRepo()); |
o.add(buildRepo()); |
return o; |
} |
-checkUnnamed501(core.List<api.Repo> o) { |
+checkUnnamed500(core.List<api.Repo> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkRepo(o[0]); |
checkRepo(o[1]); |
@@ -303,7 +298,7 @@ buildListReposResponse() { |
buildCounterListReposResponse++; |
if (buildCounterListReposResponse < 3) { |
o.nextPageToken = "foo"; |
- o.repos = buildUnnamed501(); |
+ o.repos = buildUnnamed500(); |
} |
buildCounterListReposResponse--; |
return o; |
@@ -313,7 +308,7 @@ checkListReposResponse(api.ListReposResponse o) { |
buildCounterListReposResponse++; |
if (buildCounterListReposResponse < 3) { |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed501(o.repos); |
+ checkUnnamed500(o.repos); |
} |
buildCounterListReposResponse--; |
} |
@@ -364,40 +359,40 @@ checkMirrorConfig(api.MirrorConfig o) { |
buildCounterMirrorConfig--; |
} |
-buildUnnamed502() { |
+buildUnnamed501() { |
var o = new core.List<api.AuditConfig>(); |
o.add(buildAuditConfig()); |
o.add(buildAuditConfig()); |
return o; |
} |
-checkUnnamed502(core.List<api.AuditConfig> o) { |
+checkUnnamed501(core.List<api.AuditConfig> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAuditConfig(o[0]); |
checkAuditConfig(o[1]); |
} |
-buildUnnamed503() { |
+buildUnnamed502() { |
var o = new core.List<api.Binding>(); |
o.add(buildBinding()); |
o.add(buildBinding()); |
return o; |
} |
-checkUnnamed503(core.List<api.Binding> o) { |
+checkUnnamed502(core.List<api.Binding> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkBinding(o[0]); |
checkBinding(o[1]); |
} |
-buildUnnamed504() { |
+buildUnnamed503() { |
var o = new core.List<api.Rule>(); |
o.add(buildRule()); |
o.add(buildRule()); |
return o; |
} |
-checkUnnamed504(core.List<api.Rule> o) { |
+checkUnnamed503(core.List<api.Rule> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkRule(o[0]); |
checkRule(o[1]); |
@@ -408,11 +403,11 @@ buildPolicy() { |
var o = new api.Policy(); |
buildCounterPolicy++; |
if (buildCounterPolicy < 3) { |
- o.auditConfigs = buildUnnamed502(); |
- o.bindings = buildUnnamed503(); |
+ o.auditConfigs = buildUnnamed501(); |
+ o.bindings = buildUnnamed502(); |
o.etag = "foo"; |
o.iamOwned = true; |
- o.rules = buildUnnamed504(); |
+ o.rules = buildUnnamed503(); |
o.version = 42; |
} |
buildCounterPolicy--; |
@@ -422,11 +417,11 @@ buildPolicy() { |
checkPolicy(api.Policy o) { |
buildCounterPolicy++; |
if (buildCounterPolicy < 3) { |
- checkUnnamed502(o.auditConfigs); |
- checkUnnamed503(o.bindings); |
+ checkUnnamed501(o.auditConfigs); |
+ checkUnnamed502(o.bindings); |
unittest.expect(o.etag, unittest.equals('foo')); |
unittest.expect(o.iamOwned, unittest.isTrue); |
- checkUnnamed504(o.rules); |
+ checkUnnamed503(o.rules); |
unittest.expect(o.version, unittest.equals(42)); |
} |
buildCounterPolicy--; |
@@ -457,66 +452,66 @@ checkRepo(api.Repo o) { |
buildCounterRepo--; |
} |
-buildUnnamed505() { |
+buildUnnamed504() { |
var o = new core.List<api.Condition>(); |
o.add(buildCondition()); |
o.add(buildCondition()); |
return o; |
} |
-checkUnnamed505(core.List<api.Condition> o) { |
+checkUnnamed504(core.List<api.Condition> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkCondition(o[0]); |
checkCondition(o[1]); |
} |
-buildUnnamed506() { |
+buildUnnamed505() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed506(core.List<core.String> o) { |
+checkUnnamed505(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')); |
} |
-buildUnnamed507() { |
+buildUnnamed506() { |
var o = new core.List<api.LogConfig>(); |
o.add(buildLogConfig()); |
o.add(buildLogConfig()); |
return o; |
} |
-checkUnnamed507(core.List<api.LogConfig> o) { |
+checkUnnamed506(core.List<api.LogConfig> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkLogConfig(o[0]); |
checkLogConfig(o[1]); |
} |
-buildUnnamed508() { |
+buildUnnamed507() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed508(core.List<core.String> o) { |
+checkUnnamed507(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')); |
} |
-buildUnnamed509() { |
+buildUnnamed508() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed509(core.List<core.String> o) { |
+checkUnnamed508(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')); |
@@ -528,12 +523,12 @@ buildRule() { |
buildCounterRule++; |
if (buildCounterRule < 3) { |
o.action = "foo"; |
- o.conditions = buildUnnamed505(); |
+ o.conditions = buildUnnamed504(); |
o.description = "foo"; |
- o.in_ = buildUnnamed506(); |
- o.logConfig = buildUnnamed507(); |
- o.notIn = buildUnnamed508(); |
- o.permissions = buildUnnamed509(); |
+ o.in_ = buildUnnamed505(); |
+ o.logConfig = buildUnnamed506(); |
+ o.notIn = buildUnnamed507(); |
+ o.permissions = buildUnnamed508(); |
} |
buildCounterRule--; |
return o; |
@@ -543,12 +538,12 @@ checkRule(api.Rule o) { |
buildCounterRule++; |
if (buildCounterRule < 3) { |
unittest.expect(o.action, unittest.equals('foo')); |
- checkUnnamed505(o.conditions); |
+ checkUnnamed504(o.conditions); |
unittest.expect(o.description, unittest.equals('foo')); |
- checkUnnamed506(o.in_); |
- checkUnnamed507(o.logConfig); |
- checkUnnamed508(o.notIn); |
- checkUnnamed509(o.permissions); |
+ checkUnnamed505(o.in_); |
+ checkUnnamed506(o.logConfig); |
+ checkUnnamed507(o.notIn); |
+ checkUnnamed508(o.permissions); |
} |
buildCounterRule--; |
} |
@@ -574,14 +569,14 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
buildCounterSetIamPolicyRequest--; |
} |
-buildUnnamed510() { |
+buildUnnamed509() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed510(core.List<core.String> o) { |
+checkUnnamed509(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')); |
@@ -592,7 +587,7 @@ buildTestIamPermissionsRequest() { |
var o = new api.TestIamPermissionsRequest(); |
buildCounterTestIamPermissionsRequest++; |
if (buildCounterTestIamPermissionsRequest < 3) { |
- o.permissions = buildUnnamed510(); |
+ o.permissions = buildUnnamed509(); |
} |
buildCounterTestIamPermissionsRequest--; |
return o; |
@@ -601,19 +596,19 @@ buildTestIamPermissionsRequest() { |
checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
buildCounterTestIamPermissionsRequest++; |
if (buildCounterTestIamPermissionsRequest < 3) { |
- checkUnnamed510(o.permissions); |
+ checkUnnamed509(o.permissions); |
} |
buildCounterTestIamPermissionsRequest--; |
} |
-buildUnnamed511() { |
+buildUnnamed510() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed511(core.List<core.String> o) { |
+checkUnnamed510(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')); |
@@ -624,7 +619,7 @@ buildTestIamPermissionsResponse() { |
var o = new api.TestIamPermissionsResponse(); |
buildCounterTestIamPermissionsResponse++; |
if (buildCounterTestIamPermissionsResponse < 3) { |
- o.permissions = buildUnnamed511(); |
+ o.permissions = buildUnnamed510(); |
} |
buildCounterTestIamPermissionsResponse--; |
return o; |
@@ -633,12 +628,11 @@ buildTestIamPermissionsResponse() { |
checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
buildCounterTestIamPermissionsResponse++; |
if (buildCounterTestIamPermissionsResponse < 3) { |
- checkUnnamed511(o.permissions); |
+ checkUnnamed510(o.permissions); |
} |
buildCounterTestIamPermissionsResponse--; |
} |
- |
main() { |
unittest.group("obj-schema-AuditConfig", () { |
unittest.test("to-json--from-json", () { |
@@ -648,7 +642,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-AuditLogConfig", () { |
unittest.test("to-json--from-json", () { |
var o = buildAuditLogConfig(); |
@@ -657,7 +650,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Binding", () { |
unittest.test("to-json--from-json", () { |
var o = buildBinding(); |
@@ -666,7 +658,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-CloudAuditOptions", () { |
unittest.test("to-json--from-json", () { |
var o = buildCloudAuditOptions(); |
@@ -675,7 +666,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Condition", () { |
unittest.test("to-json--from-json", () { |
var o = buildCondition(); |
@@ -684,7 +674,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-CounterOptions", () { |
unittest.test("to-json--from-json", () { |
var o = buildCounterOptions(); |
@@ -693,7 +682,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-DataAccessOptions", () { |
unittest.test("to-json--from-json", () { |
var o = buildDataAccessOptions(); |
@@ -702,7 +690,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Empty", () { |
unittest.test("to-json--from-json", () { |
var o = buildEmpty(); |
@@ -711,7 +698,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListReposResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListReposResponse(); |
@@ -720,7 +706,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-LogConfig", () { |
unittest.test("to-json--from-json", () { |
var o = buildLogConfig(); |
@@ -729,7 +714,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-MirrorConfig", () { |
unittest.test("to-json--from-json", () { |
var o = buildMirrorConfig(); |
@@ -738,7 +722,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Policy", () { |
unittest.test("to-json--from-json", () { |
var o = buildPolicy(); |
@@ -747,7 +730,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Repo", () { |
unittest.test("to-json--from-json", () { |
var o = buildRepo(); |
@@ -756,7 +738,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Rule", () { |
unittest.test("to-json--from-json", () { |
var o = buildRule(); |
@@ -765,7 +746,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-SetIamPolicyRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildSetIamPolicyRequest(); |
@@ -774,7 +754,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-TestIamPermissionsRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildTestIamPermissionsRequest(); |
@@ -783,7 +762,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-TestIamPermissionsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildTestIamPermissionsResponse(); |
@@ -792,12 +770,11 @@ main() { |
}); |
}); |
- |
unittest.group("resource-ProjectsReposResourceApi", () { |
unittest.test("method--create", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
var arg_request = buildRepo(); |
var arg_parent = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -808,9 +785,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; |
@@ -824,38 +803,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(buildRepo()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Repo response) { |
+ res |
+ .create(arg_request, arg_parent) |
+ .then(unittest.expectAsync1(((api.Repo response) { |
checkRepo(response); |
}))); |
}); |
unittest.test("method--delete", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
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; |
@@ -869,16 +853,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)); |
@@ -889,18 +874,20 @@ main() { |
}); |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
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; |
@@ -914,16 +901,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(buildRepo()); |
return new async.Future.value(stringResponse(200, h, resp)); |
@@ -934,18 +922,20 @@ main() { |
}); |
unittest.test("method--getIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
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; |
@@ -959,29 +949,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.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
var arg_name = "foo"; |
var arg_pageToken = "foo"; |
var arg_pageSize = 42; |
@@ -990,9 +983,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; |
@@ -1006,31 +1001,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(buildListReposResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListReposResponse response) { |
+ res |
+ .list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize) |
+ .then(unittest.expectAsync1(((api.ListReposResponse response) { |
checkListReposResponse(response); |
}))); |
}); |
unittest.test("method--setIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
var arg_request = buildSetIamPolicyRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1041,9 +1041,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; |
@@ -1057,29 +1059,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.ProjectsReposResourceApi res = new api.SourcerepoApi(mock).projects.repos; |
+ api.ProjectsReposResourceApi res = |
+ new api.SourcerepoApi(mock).projects.repos; |
var arg_request = buildTestIamPermissionsRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1090,9 +1095,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; |
@@ -1106,27 +1113,25 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
+ res.testIamPermissions(arg_request, arg_resource).then( |
+ unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
checkTestIamPermissionsResponse(response); |
}))); |
}); |
- |
}); |
- |
- |
} |
- |