| Index: generated/googleapis/test/cloudbuild/v1_test.dart
|
| diff --git a/generated/googleapis/test/cloudbuild/v1_test.dart b/generated/googleapis/test/cloudbuild/v1_test.dart
|
| index 80acb4dcc975c1ec0851f4f783ee3ae5855b401c..b268cba48c19f66a98d893143dae5ef59925abda 100644
|
| --- a/generated/googleapis/test/cloudbuild/v1_test.dart
|
| +++ b/generated/googleapis/test/cloudbuild/v1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis.cloudbuild.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/cloudbuild/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,72 +44,72 @@ 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);
|
| }
|
|
|
| -buildUnnamed1419() {
|
| +buildUnnamed1409() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1419(core.List<core.String> o) {
|
| +checkUnnamed1409(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'));
|
| }
|
|
|
| -buildUnnamed1420() {
|
| +buildUnnamed1410() {
|
| var o = new core.List<api.Secret>();
|
| o.add(buildSecret());
|
| o.add(buildSecret());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1420(core.List<api.Secret> o) {
|
| +checkUnnamed1410(core.List<api.Secret> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkSecret(o[0]);
|
| checkSecret(o[1]);
|
| }
|
|
|
| -buildUnnamed1421() {
|
| +buildUnnamed1411() {
|
| var o = new core.List<api.BuildStep>();
|
| o.add(buildBuildStep());
|
| o.add(buildBuildStep());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1421(core.List<api.BuildStep> o) {
|
| +checkUnnamed1411(core.List<api.BuildStep> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBuildStep(o[0]);
|
| checkBuildStep(o[1]);
|
| }
|
|
|
| -buildUnnamed1422() {
|
| +buildUnnamed1412() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed1422(core.Map<core.String, core.String> o) {
|
| +checkUnnamed1412(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'));
|
| }
|
|
|
| -buildUnnamed1423() {
|
| +buildUnnamed1413() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1423(core.List<core.String> o) {
|
| +checkUnnamed1413(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'));
|
| @@ -125,21 +124,21 @@ buildBuild() {
|
| o.createTime = "foo";
|
| o.finishTime = "foo";
|
| o.id = "foo";
|
| - o.images = buildUnnamed1419();
|
| + o.images = buildUnnamed1409();
|
| o.logUrl = "foo";
|
| o.logsBucket = "foo";
|
| o.options = buildBuildOptions();
|
| o.projectId = "foo";
|
| o.results = buildResults();
|
| - o.secrets = buildUnnamed1420();
|
| + o.secrets = buildUnnamed1410();
|
| o.source = buildSource();
|
| o.sourceProvenance = buildSourceProvenance();
|
| o.startTime = "foo";
|
| o.status = "foo";
|
| o.statusDetail = "foo";
|
| - o.steps = buildUnnamed1421();
|
| - o.substitutions = buildUnnamed1422();
|
| - o.tags = buildUnnamed1423();
|
| + o.steps = buildUnnamed1411();
|
| + o.substitutions = buildUnnamed1412();
|
| + o.tags = buildUnnamed1413();
|
| o.timeout = "foo";
|
| }
|
| buildCounterBuild--;
|
| @@ -153,21 +152,21 @@ checkBuild(api.Build o) {
|
| unittest.expect(o.createTime, unittest.equals('foo'));
|
| unittest.expect(o.finishTime, unittest.equals('foo'));
|
| unittest.expect(o.id, unittest.equals('foo'));
|
| - checkUnnamed1419(o.images);
|
| + checkUnnamed1409(o.images);
|
| unittest.expect(o.logUrl, unittest.equals('foo'));
|
| unittest.expect(o.logsBucket, unittest.equals('foo'));
|
| checkBuildOptions(o.options);
|
| unittest.expect(o.projectId, unittest.equals('foo'));
|
| checkResults(o.results);
|
| - checkUnnamed1420(o.secrets);
|
| + checkUnnamed1410(o.secrets);
|
| checkSource(o.source);
|
| checkSourceProvenance(o.sourceProvenance);
|
| unittest.expect(o.startTime, unittest.equals('foo'));
|
| unittest.expect(o.status, unittest.equals('foo'));
|
| unittest.expect(o.statusDetail, unittest.equals('foo'));
|
| - checkUnnamed1421(o.steps);
|
| - checkUnnamed1422(o.substitutions);
|
| - checkUnnamed1423(o.tags);
|
| + checkUnnamed1411(o.steps);
|
| + checkUnnamed1412(o.substitutions);
|
| + checkUnnamed1413(o.tags);
|
| unittest.expect(o.timeout, unittest.equals('foo'));
|
| }
|
| buildCounterBuild--;
|
| @@ -192,14 +191,14 @@ checkBuildOperationMetadata(api.BuildOperationMetadata o) {
|
| buildCounterBuildOperationMetadata--;
|
| }
|
|
|
| -buildUnnamed1424() {
|
| +buildUnnamed1414() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1424(core.List<core.String> o) {
|
| +checkUnnamed1414(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'));
|
| @@ -211,7 +210,7 @@ buildBuildOptions() {
|
| buildCounterBuildOptions++;
|
| if (buildCounterBuildOptions < 3) {
|
| o.requestedVerifyOption = "foo";
|
| - o.sourceProvenanceHash = buildUnnamed1424();
|
| + o.sourceProvenanceHash = buildUnnamed1414();
|
| o.substitutionOption = "foo";
|
| }
|
| buildCounterBuildOptions--;
|
| @@ -222,72 +221,72 @@ checkBuildOptions(api.BuildOptions o) {
|
| buildCounterBuildOptions++;
|
| if (buildCounterBuildOptions < 3) {
|
| unittest.expect(o.requestedVerifyOption, unittest.equals('foo'));
|
| - checkUnnamed1424(o.sourceProvenanceHash);
|
| + checkUnnamed1414(o.sourceProvenanceHash);
|
| unittest.expect(o.substitutionOption, unittest.equals('foo'));
|
| }
|
| buildCounterBuildOptions--;
|
| }
|
|
|
| -buildUnnamed1425() {
|
| +buildUnnamed1415() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1425(core.List<core.String> o) {
|
| +checkUnnamed1415(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'));
|
| }
|
|
|
| -buildUnnamed1426() {
|
| +buildUnnamed1416() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1426(core.List<core.String> o) {
|
| +checkUnnamed1416(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'));
|
| }
|
|
|
| -buildUnnamed1427() {
|
| +buildUnnamed1417() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1427(core.List<core.String> o) {
|
| +checkUnnamed1417(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'));
|
| }
|
|
|
| -buildUnnamed1428() {
|
| +buildUnnamed1418() {
|
| var o = new core.List<api.Volume>();
|
| o.add(buildVolume());
|
| o.add(buildVolume());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1428(core.List<api.Volume> o) {
|
| +checkUnnamed1418(core.List<api.Volume> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkVolume(o[0]);
|
| checkVolume(o[1]);
|
| }
|
|
|
| -buildUnnamed1429() {
|
| +buildUnnamed1419() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1429(core.List<core.String> o) {
|
| +checkUnnamed1419(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'));
|
| @@ -298,15 +297,15 @@ buildBuildStep() {
|
| var o = new api.BuildStep();
|
| buildCounterBuildStep++;
|
| if (buildCounterBuildStep < 3) {
|
| - o.args = buildUnnamed1425();
|
| + o.args = buildUnnamed1415();
|
| o.dir = "foo";
|
| o.entrypoint = "foo";
|
| - o.env = buildUnnamed1426();
|
| + o.env = buildUnnamed1416();
|
| o.id = "foo";
|
| o.name = "foo";
|
| - o.secretEnv = buildUnnamed1427();
|
| - o.volumes = buildUnnamed1428();
|
| - o.waitFor = buildUnnamed1429();
|
| + o.secretEnv = buildUnnamed1417();
|
| + o.volumes = buildUnnamed1418();
|
| + o.waitFor = buildUnnamed1419();
|
| }
|
| buildCounterBuildStep--;
|
| return o;
|
| @@ -315,27 +314,27 @@ buildBuildStep() {
|
| checkBuildStep(api.BuildStep o) {
|
| buildCounterBuildStep++;
|
| if (buildCounterBuildStep < 3) {
|
| - checkUnnamed1425(o.args);
|
| + checkUnnamed1415(o.args);
|
| unittest.expect(o.dir, unittest.equals('foo'));
|
| unittest.expect(o.entrypoint, unittest.equals('foo'));
|
| - checkUnnamed1426(o.env);
|
| + checkUnnamed1416(o.env);
|
| unittest.expect(o.id, unittest.equals('foo'));
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed1427(o.secretEnv);
|
| - checkUnnamed1428(o.volumes);
|
| - checkUnnamed1429(o.waitFor);
|
| + checkUnnamed1417(o.secretEnv);
|
| + checkUnnamed1418(o.volumes);
|
| + checkUnnamed1419(o.waitFor);
|
| }
|
| buildCounterBuildStep--;
|
| }
|
|
|
| -buildUnnamed1430() {
|
| +buildUnnamed1420() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed1430(core.Map<core.String, core.String> o) {
|
| +checkUnnamed1420(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'));
|
| @@ -352,7 +351,7 @@ buildBuildTrigger() {
|
| o.disabled = true;
|
| o.filename = "foo";
|
| o.id = "foo";
|
| - o.substitutions = buildUnnamed1430();
|
| + o.substitutions = buildUnnamed1420();
|
| o.triggerTemplate = buildRepoSource();
|
| }
|
| buildCounterBuildTrigger--;
|
| @@ -368,7 +367,7 @@ checkBuildTrigger(api.BuildTrigger o) {
|
| unittest.expect(o.disabled, unittest.isTrue);
|
| unittest.expect(o.filename, unittest.equals('foo'));
|
| unittest.expect(o.id, unittest.equals('foo'));
|
| - checkUnnamed1430(o.substitutions);
|
| + checkUnnamed1420(o.substitutions);
|
| checkRepoSource(o.triggerTemplate);
|
| }
|
| buildCounterBuildTrigger--;
|
| @@ -399,16 +398,14 @@ core.int buildCounterCancelBuildRequest = 0;
|
| buildCancelBuildRequest() {
|
| var o = new api.CancelBuildRequest();
|
| buildCounterCancelBuildRequest++;
|
| - if (buildCounterCancelBuildRequest < 3) {
|
| - }
|
| + if (buildCounterCancelBuildRequest < 3) {}
|
| buildCounterCancelBuildRequest--;
|
| return o;
|
| }
|
|
|
| checkCancelBuildRequest(api.CancelBuildRequest o) {
|
| buildCounterCancelBuildRequest++;
|
| - if (buildCounterCancelBuildRequest < 3) {
|
| - }
|
| + if (buildCounterCancelBuildRequest < 3) {}
|
| buildCounterCancelBuildRequest--;
|
| }
|
|
|
| @@ -416,16 +413,14 @@ core.int buildCounterCancelOperationRequest = 0;
|
| buildCancelOperationRequest() {
|
| var o = new api.CancelOperationRequest();
|
| buildCounterCancelOperationRequest++;
|
| - if (buildCounterCancelOperationRequest < 3) {
|
| - }
|
| + if (buildCounterCancelOperationRequest < 3) {}
|
| buildCounterCancelOperationRequest--;
|
| return o;
|
| }
|
|
|
| checkCancelOperationRequest(api.CancelOperationRequest o) {
|
| buildCounterCancelOperationRequest++;
|
| - if (buildCounterCancelOperationRequest < 3) {
|
| - }
|
| + if (buildCounterCancelOperationRequest < 3) {}
|
| buildCounterCancelOperationRequest--;
|
| }
|
|
|
| @@ -433,27 +428,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--;
|
| }
|
|
|
| -buildUnnamed1431() {
|
| +buildUnnamed1421() {
|
| var o = new core.List<api.Hash>();
|
| o.add(buildHash());
|
| o.add(buildHash());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1431(core.List<api.Hash> o) {
|
| +checkUnnamed1421(core.List<api.Hash> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkHash(o[0]);
|
| checkHash(o[1]);
|
| @@ -464,7 +457,7 @@ buildFileHashes() {
|
| var o = new api.FileHashes();
|
| buildCounterFileHashes++;
|
| if (buildCounterFileHashes < 3) {
|
| - o.fileHash = buildUnnamed1431();
|
| + o.fileHash = buildUnnamed1421();
|
| }
|
| buildCounterFileHashes--;
|
| return o;
|
| @@ -473,7 +466,7 @@ buildFileHashes() {
|
| checkFileHashes(api.FileHashes o) {
|
| buildCounterFileHashes++;
|
| if (buildCounterFileHashes < 3) {
|
| - checkUnnamed1431(o.fileHash);
|
| + checkUnnamed1421(o.fileHash);
|
| }
|
| buildCounterFileHashes--;
|
| }
|
| @@ -499,14 +492,14 @@ checkHash(api.Hash o) {
|
| buildCounterHash--;
|
| }
|
|
|
| -buildUnnamed1432() {
|
| +buildUnnamed1422() {
|
| var o = new core.List<api.BuildTrigger>();
|
| o.add(buildBuildTrigger());
|
| o.add(buildBuildTrigger());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1432(core.List<api.BuildTrigger> o) {
|
| +checkUnnamed1422(core.List<api.BuildTrigger> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBuildTrigger(o[0]);
|
| checkBuildTrigger(o[1]);
|
| @@ -517,7 +510,7 @@ buildListBuildTriggersResponse() {
|
| var o = new api.ListBuildTriggersResponse();
|
| buildCounterListBuildTriggersResponse++;
|
| if (buildCounterListBuildTriggersResponse < 3) {
|
| - o.triggers = buildUnnamed1432();
|
| + o.triggers = buildUnnamed1422();
|
| }
|
| buildCounterListBuildTriggersResponse--;
|
| return o;
|
| @@ -526,19 +519,19 @@ buildListBuildTriggersResponse() {
|
| checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) {
|
| buildCounterListBuildTriggersResponse++;
|
| if (buildCounterListBuildTriggersResponse < 3) {
|
| - checkUnnamed1432(o.triggers);
|
| + checkUnnamed1422(o.triggers);
|
| }
|
| buildCounterListBuildTriggersResponse--;
|
| }
|
|
|
| -buildUnnamed1433() {
|
| +buildUnnamed1423() {
|
| var o = new core.List<api.Build>();
|
| o.add(buildBuild());
|
| o.add(buildBuild());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1433(core.List<api.Build> o) {
|
| +checkUnnamed1423(core.List<api.Build> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBuild(o[0]);
|
| checkBuild(o[1]);
|
| @@ -549,7 +542,7 @@ buildListBuildsResponse() {
|
| var o = new api.ListBuildsResponse();
|
| buildCounterListBuildsResponse++;
|
| if (buildCounterListBuildsResponse < 3) {
|
| - o.builds = buildUnnamed1433();
|
| + o.builds = buildUnnamed1423();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListBuildsResponse--;
|
| @@ -559,20 +552,20 @@ buildListBuildsResponse() {
|
| checkListBuildsResponse(api.ListBuildsResponse o) {
|
| buildCounterListBuildsResponse++;
|
| if (buildCounterListBuildsResponse < 3) {
|
| - checkUnnamed1433(o.builds);
|
| + checkUnnamed1423(o.builds);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListBuildsResponse--;
|
| }
|
|
|
| -buildUnnamed1434() {
|
| +buildUnnamed1424() {
|
| var o = new core.List<api.Operation>();
|
| o.add(buildOperation());
|
| o.add(buildOperation());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1434(core.List<api.Operation> o) {
|
| +checkUnnamed1424(core.List<api.Operation> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkOperation(o[0]);
|
| checkOperation(o[1]);
|
| @@ -584,7 +577,7 @@ buildListOperationsResponse() {
|
| buildCounterListOperationsResponse++;
|
| if (buildCounterListOperationsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.operations = buildUnnamed1434();
|
| + o.operations = buildUnnamed1424();
|
| }
|
| buildCounterListOperationsResponse--;
|
| return o;
|
| @@ -594,35 +587,67 @@ checkListOperationsResponse(api.ListOperationsResponse o) {
|
| buildCounterListOperationsResponse++;
|
| if (buildCounterListOperationsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed1434(o.operations);
|
| + checkUnnamed1424(o.operations);
|
| }
|
| buildCounterListOperationsResponse--;
|
| }
|
|
|
| -buildUnnamed1435() {
|
| +buildUnnamed1425() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed1435(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed1425(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'));
|
| }
|
|
|
| -buildUnnamed1436() {
|
| +buildUnnamed1426() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed1436(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed1426(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo'));
|
| - var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLength(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo'));
|
| + var casted3 = (o["x"]) as core.Map;
|
| + unittest.expect(casted3, unittest.hasLength(3));
|
| + unittest.expect(casted3["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted3["bool"], unittest.equals(true));
|
| + unittest.expect(casted3["string"], unittest.equals('foo'));
|
| + var casted4 = (o["y"]) as core.Map;
|
| + unittest.expect(casted4, unittest.hasLength(3));
|
| + unittest.expect(casted4["list"], unittest.equals([1, 2, 3]));
|
| + unittest.expect(casted4["bool"], unittest.equals(true));
|
| + unittest.expect(casted4["string"], unittest.equals('foo'));
|
| }
|
|
|
| core.int buildCounterOperation = 0;
|
| @@ -632,9 +657,9 @@ buildOperation() {
|
| if (buildCounterOperation < 3) {
|
| o.done = true;
|
| o.error = buildStatus();
|
| - o.metadata = buildUnnamed1435();
|
| + o.metadata = buildUnnamed1425();
|
| o.name = "foo";
|
| - o.response = buildUnnamed1436();
|
| + o.response = buildUnnamed1426();
|
| }
|
| buildCounterOperation--;
|
| return o;
|
| @@ -645,9 +670,9 @@ checkOperation(api.Operation o) {
|
| if (buildCounterOperation < 3) {
|
| unittest.expect(o.done, unittest.isTrue);
|
| checkStatus(o.error);
|
| - checkUnnamed1435(o.metadata);
|
| + checkUnnamed1425(o.metadata);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed1436(o.response);
|
| + checkUnnamed1426(o.response);
|
| }
|
| buildCounterOperation--;
|
| }
|
| @@ -679,27 +704,27 @@ checkRepoSource(api.RepoSource o) {
|
| buildCounterRepoSource--;
|
| }
|
|
|
| -buildUnnamed1437() {
|
| +buildUnnamed1427() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed1437(core.List<core.String> o) {
|
| +checkUnnamed1427(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'));
|
| }
|
|
|
| -buildUnnamed1438() {
|
| +buildUnnamed1428() {
|
| var o = new core.List<api.BuiltImage>();
|
| o.add(buildBuiltImage());
|
| o.add(buildBuiltImage());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1438(core.List<api.BuiltImage> o) {
|
| +checkUnnamed1428(core.List<api.BuiltImage> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBuiltImage(o[0]);
|
| checkBuiltImage(o[1]);
|
| @@ -710,8 +735,8 @@ buildResults() {
|
| var o = new api.Results();
|
| buildCounterResults++;
|
| if (buildCounterResults < 3) {
|
| - o.buildStepImages = buildUnnamed1437();
|
| - o.images = buildUnnamed1438();
|
| + o.buildStepImages = buildUnnamed1427();
|
| + o.images = buildUnnamed1428();
|
| }
|
| buildCounterResults--;
|
| return o;
|
| @@ -720,20 +745,20 @@ buildResults() {
|
| checkResults(api.Results o) {
|
| buildCounterResults++;
|
| if (buildCounterResults < 3) {
|
| - checkUnnamed1437(o.buildStepImages);
|
| - checkUnnamed1438(o.images);
|
| + checkUnnamed1427(o.buildStepImages);
|
| + checkUnnamed1428(o.images);
|
| }
|
| buildCounterResults--;
|
| }
|
|
|
| -buildUnnamed1439() {
|
| +buildUnnamed1429() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed1439(core.Map<core.String, core.String> o) {
|
| +checkUnnamed1429(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'));
|
| @@ -745,7 +770,7 @@ buildSecret() {
|
| buildCounterSecret++;
|
| if (buildCounterSecret < 3) {
|
| o.kmsKeyName = "foo";
|
| - o.secretEnv = buildUnnamed1439();
|
| + o.secretEnv = buildUnnamed1429();
|
| }
|
| buildCounterSecret--;
|
| return o;
|
| @@ -755,7 +780,7 @@ checkSecret(api.Secret o) {
|
| buildCounterSecret++;
|
| if (buildCounterSecret < 3) {
|
| unittest.expect(o.kmsKeyName, unittest.equals('foo'));
|
| - checkUnnamed1439(o.secretEnv);
|
| + checkUnnamed1429(o.secretEnv);
|
| }
|
| buildCounterSecret--;
|
| }
|
| @@ -781,14 +806,14 @@ checkSource(api.Source o) {
|
| buildCounterSource--;
|
| }
|
|
|
| -buildUnnamed1440() {
|
| +buildUnnamed1430() {
|
| var o = new core.Map<core.String, api.FileHashes>();
|
| o["x"] = buildFileHashes();
|
| o["y"] = buildFileHashes();
|
| return o;
|
| }
|
|
|
| -checkUnnamed1440(core.Map<core.String, api.FileHashes> o) {
|
| +checkUnnamed1430(core.Map<core.String, api.FileHashes> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkFileHashes(o["x"]);
|
| checkFileHashes(o["y"]);
|
| @@ -799,7 +824,7 @@ buildSourceProvenance() {
|
| var o = new api.SourceProvenance();
|
| buildCounterSourceProvenance++;
|
| if (buildCounterSourceProvenance < 3) {
|
| - o.fileHashes = buildUnnamed1440();
|
| + o.fileHashes = buildUnnamed1430();
|
| o.resolvedRepoSource = buildRepoSource();
|
| o.resolvedStorageSource = buildStorageSource();
|
| }
|
| @@ -810,37 +835,53 @@ buildSourceProvenance() {
|
| checkSourceProvenance(api.SourceProvenance o) {
|
| buildCounterSourceProvenance++;
|
| if (buildCounterSourceProvenance < 3) {
|
| - checkUnnamed1440(o.fileHashes);
|
| + checkUnnamed1430(o.fileHashes);
|
| checkRepoSource(o.resolvedRepoSource);
|
| checkStorageSource(o.resolvedStorageSource);
|
| }
|
| buildCounterSourceProvenance--;
|
| }
|
|
|
| -buildUnnamed1441() {
|
| +buildUnnamed1431() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed1441(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed1431(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'));
|
| }
|
|
|
| -buildUnnamed1442() {
|
| +buildUnnamed1432() {
|
| var o = new core.List<core.Map<core.String, core.Object>>();
|
| - o.add(buildUnnamed1441());
|
| - o.add(buildUnnamed1441());
|
| + o.add(buildUnnamed1431());
|
| + o.add(buildUnnamed1431());
|
| return o;
|
| }
|
|
|
| -checkUnnamed1442(core.List<core.Map<core.String, core.Object>> o) {
|
| +checkUnnamed1432(core.List<core.Map<core.String, core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed1441(o[0]);
|
| - checkUnnamed1441(o[1]);
|
| + checkUnnamed1431(o[0]);
|
| + checkUnnamed1431(o[1]);
|
| }
|
|
|
| core.int buildCounterStatus = 0;
|
| @@ -849,7 +890,7 @@ buildStatus() {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| o.code = 42;
|
| - o.details = buildUnnamed1442();
|
| + o.details = buildUnnamed1432();
|
| o.message = "foo";
|
| }
|
| buildCounterStatus--;
|
| @@ -860,7 +901,7 @@ checkStatus(api.Status o) {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| unittest.expect(o.code, unittest.equals(42));
|
| - checkUnnamed1442(o.details);
|
| + checkUnnamed1432(o.details);
|
| unittest.expect(o.message, unittest.equals('foo'));
|
| }
|
| buildCounterStatus--;
|
| @@ -910,7 +951,6 @@ checkVolume(api.Volume o) {
|
| buildCounterVolume--;
|
| }
|
|
|
| -
|
| main() {
|
| unittest.group("obj-schema-Build", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -920,7 +960,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-BuildOperationMetadata", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBuildOperationMetadata();
|
| @@ -929,7 +968,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-BuildOptions", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBuildOptions();
|
| @@ -938,7 +976,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-BuildStep", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBuildStep();
|
| @@ -947,7 +984,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-BuildTrigger", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBuildTrigger();
|
| @@ -956,7 +992,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-BuiltImage", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildBuiltImage();
|
| @@ -965,7 +1000,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-CancelBuildRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildCancelBuildRequest();
|
| @@ -974,7 +1008,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-CancelOperationRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildCancelOperationRequest();
|
| @@ -983,7 +1016,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -992,7 +1024,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-FileHashes", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildFileHashes();
|
| @@ -1001,7 +1032,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Hash", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildHash();
|
| @@ -1010,7 +1040,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListBuildTriggersResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListBuildTriggersResponse();
|
| @@ -1019,7 +1048,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListBuildsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListBuildsResponse();
|
| @@ -1028,7 +1056,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListOperationsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListOperationsResponse();
|
| @@ -1037,7 +1064,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Operation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOperation();
|
| @@ -1046,7 +1072,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-RepoSource", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildRepoSource();
|
| @@ -1055,7 +1080,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Results", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildResults();
|
| @@ -1064,7 +1088,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Secret", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSecret();
|
| @@ -1073,7 +1096,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Source", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSource();
|
| @@ -1082,7 +1104,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SourceProvenance", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSourceProvenance();
|
| @@ -1091,7 +1112,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Status", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildStatus();
|
| @@ -1100,7 +1120,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-StorageSource", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildStorageSource();
|
| @@ -1109,7 +1128,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-Volume", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildVolume();
|
| @@ -1118,10 +1136,8 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-OperationsResourceApi", () {
|
| unittest.test("method--cancel", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations;
|
| var arg_request = buildCancelOperationRequest();
|
| @@ -1134,9 +1150,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;
|
|
|
| @@ -1150,27 +1168,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(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.cancel(arg_request, arg_name).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .cancel(arg_request, arg_name)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations;
|
| var arg_name = "foo";
|
| @@ -1179,9 +1199,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;
|
|
|
| @@ -1195,16 +1217,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));
|
| @@ -1215,21 +1238,22 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations;
|
| 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;
|
|
|
| @@ -1243,36 +1267,42 @@ 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(buildListOperationsResponse());
|
| 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.ListOperationsResponse response) {
|
| + res
|
| + .list(arg_name,
|
| + pageToken: arg_pageToken,
|
| + pageSize: arg_pageSize,
|
| + filter: arg_filter)
|
| + .then(unittest.expectAsync1(((api.ListOperationsResponse response) {
|
| checkListOperationsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsBuildsResourceApi", () {
|
| unittest.test("method--cancel", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.builds;
|
| + api.ProjectsBuildsResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.builds;
|
| var arg_request = buildCancelBuildRequest();
|
| var arg_projectId = "foo";
|
| var arg_id = "foo";
|
| @@ -1284,23 +1314,29 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/builds/", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("/builds/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("/builds/"));
|
| pathOffset += 8;
|
| index = path.indexOf(":cancel", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_id"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equals(":cancel"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 7),
|
| + unittest.equals(":cancel"));
|
| pathOffset += 7;
|
|
|
| var query = (req.url).query;
|
| @@ -1313,29 +1349,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(buildBuild());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.cancel(arg_request, arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build response) {
|
| + res
|
| + .cancel(arg_request, arg_projectId, arg_id)
|
| + .then(unittest.expectAsync1(((api.Build response) {
|
| checkBuild(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.builds;
|
| + api.ProjectsBuildsResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.builds;
|
| var arg_request = buildBuild();
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1346,16 +1385,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/builds", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equals("/builds"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 7),
|
| + unittest.equals("/builds"));
|
| pathOffset += 7;
|
|
|
| var query = (req.url).query;
|
| @@ -1368,29 +1411,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(buildOperation());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Operation response) {
|
| + res
|
| + .create(arg_request, arg_projectId)
|
| + .then(unittest.expectAsync1(((api.Operation response) {
|
| checkOperation(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.builds;
|
| + api.ProjectsBuildsResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.builds;
|
| var arg_projectId = "foo";
|
| var arg_id = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1398,16 +1444,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/builds/", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("/builds/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("/builds/"));
|
| pathOffset += 8;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1423,29 +1473,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(buildBuild());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build response) {
|
| + res
|
| + .get(arg_projectId, arg_id)
|
| + .then(unittest.expectAsync1(((api.Build response) {
|
| checkBuild(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.builds;
|
| + api.ProjectsBuildsResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.builds;
|
| var arg_projectId = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| @@ -1455,16 +1508,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/builds", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equals("/builds"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 7),
|
| + unittest.equals("/builds"));
|
| pathOffset += 7;
|
|
|
| var query = (req.url).query;
|
| @@ -1477,36 +1534,42 @@ 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));
|
| 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(buildListBuildsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_projectId, pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync1(((api.ListBuildsResponse response) {
|
| + res
|
| + .list(arg_projectId,
|
| + pageToken: arg_pageToken,
|
| + pageSize: arg_pageSize,
|
| + filter: arg_filter)
|
| + .then(unittest.expectAsync1(((api.ListBuildsResponse response) {
|
| checkListBuildsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsTriggersResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects.triggers;
|
| + api.ProjectsTriggersResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.triggers;
|
| var arg_request = buildBuildTrigger();
|
| var arg_projectId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1517,16 +1580,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/triggers", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/triggers"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 9),
|
| + unittest.equals("/triggers"));
|
| pathOffset += 9;
|
|
|
| var query = (req.url).query;
|
| @@ -1539,29 +1606,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(buildBuildTrigger());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_projectId).then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| + res
|
| + .create(arg_request, arg_projectId)
|
| + .then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| checkBuildTrigger(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects.triggers;
|
| + api.ProjectsTriggersResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.triggers;
|
| var arg_projectId = "foo";
|
| var arg_triggerId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1569,16 +1639,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/triggers/", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/triggers/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 10),
|
| + unittest.equals("/triggers/"));
|
| pathOffset += 10;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1594,29 +1668,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.delete(arg_projectId, arg_triggerId).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_projectId, arg_triggerId)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects.triggers;
|
| + api.ProjectsTriggersResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.triggers;
|
| var arg_projectId = "foo";
|
| var arg_triggerId = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1624,16 +1701,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/triggers/", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/triggers/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 10),
|
| + unittest.equals("/triggers/"));
|
| pathOffset += 10;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1649,45 +1730,52 @@ 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(buildBuildTrigger());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_projectId, arg_triggerId).then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| + res
|
| + .get(arg_projectId, arg_triggerId)
|
| + .then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| checkBuildTrigger(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects.triggers;
|
| + api.ProjectsTriggersResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.triggers;
|
| var arg_projectId = "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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/triggers", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equals("/triggers"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 9),
|
| + unittest.equals("/triggers"));
|
| pathOffset += 9;
|
|
|
| var query = (req.url).query;
|
| @@ -1700,29 +1788,31 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListBuildTriggersResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_projectId).then(unittest.expectAsync1(((api.ListBuildTriggersResponse response) {
|
| + res.list(arg_projectId).then(
|
| + unittest.expectAsync1(((api.ListBuildTriggersResponse response) {
|
| checkListBuildTriggersResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--patch", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects.triggers;
|
| + api.ProjectsTriggersResourceApi res =
|
| + new api.CloudbuildApi(mock).projects.triggers;
|
| var arg_request = buildBuildTrigger();
|
| var arg_projectId = "foo";
|
| var arg_triggerId = "foo";
|
| @@ -1734,16 +1824,20 @@ 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 + 12), unittest.equals("v1/projects/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 12),
|
| + unittest.equals("v1/projects/"));
|
| pathOffset += 12;
|
| index = path.indexOf("/triggers/", pathOffset);
|
| unittest.expect(index >= 0, unittest.isTrue);
|
| - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| + subPart =
|
| + core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
|
| pathOffset = index;
|
| unittest.expect(subPart, unittest.equals("$arg_projectId"));
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.equals("/triggers/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 10),
|
| + unittest.equals("/triggers/"));
|
| pathOffset += 10;
|
| subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
|
| pathOffset = path.length;
|
| @@ -1759,27 +1853,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(buildBuildTrigger());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| + res
|
| + .patch(arg_request, arg_projectId, arg_triggerId)
|
| + .then(unittest.expectAsync1(((api.BuildTrigger response) {
|
| checkBuildTrigger(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|