| Index: generated/googleapis_beta/test/logging/v2beta1_test.dart
|
| diff --git a/generated/googleapis_beta/test/logging/v2beta1_test.dart b/generated/googleapis_beta/test/logging/v2beta1_test.dart
|
| index 6b377242d299674457a6477f143f430f16633150..03e7518cd6bee23bcc393153c0ca8f850695b566 100644
|
| --- a/generated/googleapis_beta/test/logging/v2beta1_test.dart
|
| +++ b/generated/googleapis_beta/test/logging/v2beta1_test.dart
|
| @@ -1,12 +1,10 @@
|
| library googleapis_beta.logging.v2beta1.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_beta/logging/v2beta1.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,29 +44,105 @@ 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);
|
| }
|
|
|
| +core.int buildCounterBucketOptions = 0;
|
| +buildBucketOptions() {
|
| + var o = new api.BucketOptions();
|
| + buildCounterBucketOptions++;
|
| + if (buildCounterBucketOptions < 3) {
|
| + o.explicitBuckets = buildExplicit();
|
| + o.exponentialBuckets = buildExponential();
|
| + o.linearBuckets = buildLinear();
|
| + }
|
| + buildCounterBucketOptions--;
|
| + return o;
|
| +}
|
| +
|
| +checkBucketOptions(api.BucketOptions o) {
|
| + buildCounterBucketOptions++;
|
| + if (buildCounterBucketOptions < 3) {
|
| + checkExplicit(o.explicitBuckets);
|
| + checkExponential(o.exponentialBuckets);
|
| + checkLinear(o.linearBuckets);
|
| + }
|
| + buildCounterBucketOptions--;
|
| +}
|
| +
|
| 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--;
|
| }
|
|
|
| +buildUnnamed3487() {
|
| + var o = new core.List<core.double>();
|
| + o.add(42.0);
|
| + o.add(42.0);
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3487(core.List<core.double> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + unittest.expect(o[0], unittest.equals(42.0));
|
| + unittest.expect(o[1], unittest.equals(42.0));
|
| +}
|
| +
|
| +core.int buildCounterExplicit = 0;
|
| +buildExplicit() {
|
| + var o = new api.Explicit();
|
| + buildCounterExplicit++;
|
| + if (buildCounterExplicit < 3) {
|
| + o.bounds = buildUnnamed3487();
|
| + }
|
| + buildCounterExplicit--;
|
| + return o;
|
| +}
|
| +
|
| +checkExplicit(api.Explicit o) {
|
| + buildCounterExplicit++;
|
| + if (buildCounterExplicit < 3) {
|
| + checkUnnamed3487(o.bounds);
|
| + }
|
| + buildCounterExplicit--;
|
| +}
|
| +
|
| +core.int buildCounterExponential = 0;
|
| +buildExponential() {
|
| + var o = new api.Exponential();
|
| + buildCounterExponential++;
|
| + if (buildCounterExponential < 3) {
|
| + o.growthFactor = 42.0;
|
| + o.numFiniteBuckets = 42;
|
| + o.scale = 42.0;
|
| + }
|
| + buildCounterExponential--;
|
| + return o;
|
| +}
|
| +
|
| +checkExponential(api.Exponential o) {
|
| + buildCounterExponential++;
|
| + if (buildCounterExponential < 3) {
|
| + unittest.expect(o.growthFactor, unittest.equals(42.0));
|
| + unittest.expect(o.numFiniteBuckets, unittest.equals(42));
|
| + unittest.expect(o.scale, unittest.equals(42.0));
|
| + }
|
| + buildCounterExponential--;
|
| +}
|
| +
|
| core.int buildCounterHttpRequest = 0;
|
| buildHttpRequest() {
|
| var o = new api.HttpRequest();
|
| @@ -138,27 +213,50 @@ checkLabelDescriptor(api.LabelDescriptor o) {
|
| buildCounterLabelDescriptor--;
|
| }
|
|
|
| -buildUnnamed3482() {
|
| +core.int buildCounterLinear = 0;
|
| +buildLinear() {
|
| + var o = new api.Linear();
|
| + buildCounterLinear++;
|
| + if (buildCounterLinear < 3) {
|
| + o.numFiniteBuckets = 42;
|
| + o.offset = 42.0;
|
| + o.width = 42.0;
|
| + }
|
| + buildCounterLinear--;
|
| + return o;
|
| +}
|
| +
|
| +checkLinear(api.Linear o) {
|
| + buildCounterLinear++;
|
| + if (buildCounterLinear < 3) {
|
| + unittest.expect(o.numFiniteBuckets, unittest.equals(42));
|
| + unittest.expect(o.offset, unittest.equals(42.0));
|
| + unittest.expect(o.width, unittest.equals(42.0));
|
| + }
|
| + buildCounterLinear--;
|
| +}
|
| +
|
| +buildUnnamed3488() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3482(core.List<core.String> o) {
|
| +checkUnnamed3488(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'));
|
| }
|
|
|
| -buildUnnamed3483() {
|
| +buildUnnamed3489() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3483(core.List<core.String> o) {
|
| +checkUnnamed3489(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'));
|
| @@ -173,8 +271,8 @@ buildListLogEntriesRequest() {
|
| o.orderBy = "foo";
|
| o.pageSize = 42;
|
| o.pageToken = "foo";
|
| - o.projectIds = buildUnnamed3482();
|
| - o.resourceNames = buildUnnamed3483();
|
| + o.projectIds = buildUnnamed3488();
|
| + o.resourceNames = buildUnnamed3489();
|
| }
|
| buildCounterListLogEntriesRequest--;
|
| return o;
|
| @@ -187,20 +285,20 @@ checkListLogEntriesRequest(api.ListLogEntriesRequest o) {
|
| unittest.expect(o.orderBy, unittest.equals('foo'));
|
| unittest.expect(o.pageSize, unittest.equals(42));
|
| unittest.expect(o.pageToken, unittest.equals('foo'));
|
| - checkUnnamed3482(o.projectIds);
|
| - checkUnnamed3483(o.resourceNames);
|
| + checkUnnamed3488(o.projectIds);
|
| + checkUnnamed3489(o.resourceNames);
|
| }
|
| buildCounterListLogEntriesRequest--;
|
| }
|
|
|
| -buildUnnamed3484() {
|
| +buildUnnamed3490() {
|
| var o = new core.List<api.LogEntry>();
|
| o.add(buildLogEntry());
|
| o.add(buildLogEntry());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3484(core.List<api.LogEntry> o) {
|
| +checkUnnamed3490(core.List<api.LogEntry> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLogEntry(o[0]);
|
| checkLogEntry(o[1]);
|
| @@ -211,7 +309,7 @@ buildListLogEntriesResponse() {
|
| var o = new api.ListLogEntriesResponse();
|
| buildCounterListLogEntriesResponse++;
|
| if (buildCounterListLogEntriesResponse < 3) {
|
| - o.entries = buildUnnamed3484();
|
| + o.entries = buildUnnamed3490();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListLogEntriesResponse--;
|
| @@ -221,20 +319,20 @@ buildListLogEntriesResponse() {
|
| checkListLogEntriesResponse(api.ListLogEntriesResponse o) {
|
| buildCounterListLogEntriesResponse++;
|
| if (buildCounterListLogEntriesResponse < 3) {
|
| - checkUnnamed3484(o.entries);
|
| + checkUnnamed3490(o.entries);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListLogEntriesResponse--;
|
| }
|
|
|
| -buildUnnamed3485() {
|
| +buildUnnamed3491() {
|
| var o = new core.List<api.LogMetric>();
|
| o.add(buildLogMetric());
|
| o.add(buildLogMetric());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3485(core.List<api.LogMetric> o) {
|
| +checkUnnamed3491(core.List<api.LogMetric> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLogMetric(o[0]);
|
| checkLogMetric(o[1]);
|
| @@ -245,7 +343,7 @@ buildListLogMetricsResponse() {
|
| var o = new api.ListLogMetricsResponse();
|
| buildCounterListLogMetricsResponse++;
|
| if (buildCounterListLogMetricsResponse < 3) {
|
| - o.metrics = buildUnnamed3485();
|
| + o.metrics = buildUnnamed3491();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListLogMetricsResponse--;
|
| @@ -255,20 +353,20 @@ buildListLogMetricsResponse() {
|
| checkListLogMetricsResponse(api.ListLogMetricsResponse o) {
|
| buildCounterListLogMetricsResponse++;
|
| if (buildCounterListLogMetricsResponse < 3) {
|
| - checkUnnamed3485(o.metrics);
|
| + checkUnnamed3491(o.metrics);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListLogMetricsResponse--;
|
| }
|
|
|
| -buildUnnamed3486() {
|
| +buildUnnamed3492() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3486(core.List<core.String> o) {
|
| +checkUnnamed3492(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'));
|
| @@ -279,7 +377,7 @@ buildListLogsResponse() {
|
| var o = new api.ListLogsResponse();
|
| buildCounterListLogsResponse++;
|
| if (buildCounterListLogsResponse < 3) {
|
| - o.logNames = buildUnnamed3486();
|
| + o.logNames = buildUnnamed3492();
|
| o.nextPageToken = "foo";
|
| }
|
| buildCounterListLogsResponse--;
|
| @@ -289,20 +387,20 @@ buildListLogsResponse() {
|
| checkListLogsResponse(api.ListLogsResponse o) {
|
| buildCounterListLogsResponse++;
|
| if (buildCounterListLogsResponse < 3) {
|
| - checkUnnamed3486(o.logNames);
|
| + checkUnnamed3492(o.logNames);
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| buildCounterListLogsResponse--;
|
| }
|
|
|
| -buildUnnamed3487() {
|
| +buildUnnamed3493() {
|
| var o = new core.List<api.MonitoredResourceDescriptor>();
|
| o.add(buildMonitoredResourceDescriptor());
|
| o.add(buildMonitoredResourceDescriptor());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3487(core.List<api.MonitoredResourceDescriptor> o) {
|
| +checkUnnamed3493(core.List<api.MonitoredResourceDescriptor> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkMonitoredResourceDescriptor(o[0]);
|
| checkMonitoredResourceDescriptor(o[1]);
|
| @@ -314,29 +412,30 @@ buildListMonitoredResourceDescriptorsResponse() {
|
| buildCounterListMonitoredResourceDescriptorsResponse++;
|
| if (buildCounterListMonitoredResourceDescriptorsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.resourceDescriptors = buildUnnamed3487();
|
| + o.resourceDescriptors = buildUnnamed3493();
|
| }
|
| buildCounterListMonitoredResourceDescriptorsResponse--;
|
| return o;
|
| }
|
|
|
| -checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescriptorsResponse o) {
|
| +checkListMonitoredResourceDescriptorsResponse(
|
| + api.ListMonitoredResourceDescriptorsResponse o) {
|
| buildCounterListMonitoredResourceDescriptorsResponse++;
|
| if (buildCounterListMonitoredResourceDescriptorsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3487(o.resourceDescriptors);
|
| + checkUnnamed3493(o.resourceDescriptors);
|
| }
|
| buildCounterListMonitoredResourceDescriptorsResponse--;
|
| }
|
|
|
| -buildUnnamed3488() {
|
| +buildUnnamed3494() {
|
| var o = new core.List<api.LogSink>();
|
| o.add(buildLogSink());
|
| o.add(buildLogSink());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3488(core.List<api.LogSink> o) {
|
| +checkUnnamed3494(core.List<api.LogSink> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLogSink(o[0]);
|
| checkLogSink(o[1]);
|
| @@ -348,7 +447,7 @@ buildListSinksResponse() {
|
| buildCounterListSinksResponse++;
|
| if (buildCounterListSinksResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.sinks = buildUnnamed3488();
|
| + o.sinks = buildUnnamed3494();
|
| }
|
| buildCounterListSinksResponse--;
|
| return o;
|
| @@ -358,48 +457,80 @@ checkListSinksResponse(api.ListSinksResponse o) {
|
| buildCounterListSinksResponse++;
|
| if (buildCounterListSinksResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3488(o.sinks);
|
| + checkUnnamed3494(o.sinks);
|
| }
|
| buildCounterListSinksResponse--;
|
| }
|
|
|
| -buildUnnamed3489() {
|
| +buildUnnamed3495() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed3489(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3495(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'));
|
| }
|
|
|
| -buildUnnamed3490() {
|
| +buildUnnamed3496() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed3490(core.Map<core.String, core.String> o) {
|
| +checkUnnamed3496(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'));
|
| }
|
|
|
| -buildUnnamed3491() {
|
| +buildUnnamed3497() {
|
| 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;
|
| }
|
|
|
| -checkUnnamed3491(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed3497(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 buildCounterLogEntry = 0;
|
| @@ -409,11 +540,11 @@ buildLogEntry() {
|
| if (buildCounterLogEntry < 3) {
|
| o.httpRequest = buildHttpRequest();
|
| o.insertId = "foo";
|
| - o.jsonPayload = buildUnnamed3489();
|
| - o.labels = buildUnnamed3490();
|
| + o.jsonPayload = buildUnnamed3495();
|
| + o.labels = buildUnnamed3496();
|
| o.logName = "foo";
|
| o.operation = buildLogEntryOperation();
|
| - o.protoPayload = buildUnnamed3491();
|
| + o.protoPayload = buildUnnamed3497();
|
| o.receiveTimestamp = "foo";
|
| o.resource = buildMonitoredResource();
|
| o.severity = "foo";
|
| @@ -431,11 +562,11 @@ checkLogEntry(api.LogEntry o) {
|
| if (buildCounterLogEntry < 3) {
|
| checkHttpRequest(o.httpRequest);
|
| unittest.expect(o.insertId, unittest.equals('foo'));
|
| - checkUnnamed3489(o.jsonPayload);
|
| - checkUnnamed3490(o.labels);
|
| + checkUnnamed3495(o.jsonPayload);
|
| + checkUnnamed3496(o.labels);
|
| unittest.expect(o.logName, unittest.equals('foo'));
|
| checkLogEntryOperation(o.operation);
|
| - checkUnnamed3491(o.protoPayload);
|
| + checkUnnamed3497(o.protoPayload);
|
| unittest.expect(o.receiveTimestamp, unittest.equals('foo'));
|
| checkMonitoredResource(o.resource);
|
| unittest.expect(o.severity, unittest.equals('foo'));
|
| @@ -520,14 +651,31 @@ checkLogLine(api.LogLine o) {
|
| buildCounterLogLine--;
|
| }
|
|
|
| +buildUnnamed3498() {
|
| + var o = new core.Map<core.String, core.String>();
|
| + o["x"] = "foo";
|
| + o["y"] = "foo";
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3498(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'));
|
| +}
|
| +
|
| core.int buildCounterLogMetric = 0;
|
| buildLogMetric() {
|
| var o = new api.LogMetric();
|
| buildCounterLogMetric++;
|
| if (buildCounterLogMetric < 3) {
|
| + o.bucketOptions = buildBucketOptions();
|
| o.description = "foo";
|
| o.filter = "foo";
|
| + o.labelExtractors = buildUnnamed3498();
|
| + o.metricDescriptor = buildMetricDescriptor();
|
| o.name = "foo";
|
| + o.valueExtractor = "foo";
|
| o.version = "foo";
|
| }
|
| buildCounterLogMetric--;
|
| @@ -537,9 +685,13 @@ buildLogMetric() {
|
| checkLogMetric(api.LogMetric o) {
|
| buildCounterLogMetric++;
|
| if (buildCounterLogMetric < 3) {
|
| + checkBucketOptions(o.bucketOptions);
|
| unittest.expect(o.description, unittest.equals('foo'));
|
| unittest.expect(o.filter, unittest.equals('foo'));
|
| + checkUnnamed3498(o.labelExtractors);
|
| + checkMetricDescriptor(o.metricDescriptor);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| + unittest.expect(o.valueExtractor, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals('foo'));
|
| }
|
| buildCounterLogMetric--;
|
| @@ -578,14 +730,60 @@ checkLogSink(api.LogSink o) {
|
| buildCounterLogSink--;
|
| }
|
|
|
| -buildUnnamed3492() {
|
| +buildUnnamed3499() {
|
| + var o = new core.List<api.LabelDescriptor>();
|
| + o.add(buildLabelDescriptor());
|
| + o.add(buildLabelDescriptor());
|
| + return o;
|
| +}
|
| +
|
| +checkUnnamed3499(core.List<api.LabelDescriptor> o) {
|
| + unittest.expect(o, unittest.hasLength(2));
|
| + checkLabelDescriptor(o[0]);
|
| + checkLabelDescriptor(o[1]);
|
| +}
|
| +
|
| +core.int buildCounterMetricDescriptor = 0;
|
| +buildMetricDescriptor() {
|
| + var o = new api.MetricDescriptor();
|
| + buildCounterMetricDescriptor++;
|
| + if (buildCounterMetricDescriptor < 3) {
|
| + o.description = "foo";
|
| + o.displayName = "foo";
|
| + o.labels = buildUnnamed3499();
|
| + o.metricKind = "foo";
|
| + o.name = "foo";
|
| + o.type = "foo";
|
| + o.unit = "foo";
|
| + o.valueType = "foo";
|
| + }
|
| + buildCounterMetricDescriptor--;
|
| + return o;
|
| +}
|
| +
|
| +checkMetricDescriptor(api.MetricDescriptor o) {
|
| + buildCounterMetricDescriptor++;
|
| + if (buildCounterMetricDescriptor < 3) {
|
| + unittest.expect(o.description, unittest.equals('foo'));
|
| + unittest.expect(o.displayName, unittest.equals('foo'));
|
| + checkUnnamed3499(o.labels);
|
| + unittest.expect(o.metricKind, unittest.equals('foo'));
|
| + unittest.expect(o.name, unittest.equals('foo'));
|
| + unittest.expect(o.type, unittest.equals('foo'));
|
| + unittest.expect(o.unit, unittest.equals('foo'));
|
| + unittest.expect(o.valueType, unittest.equals('foo'));
|
| + }
|
| + buildCounterMetricDescriptor--;
|
| +}
|
| +
|
| +buildUnnamed3500() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed3492(core.Map<core.String, core.String> o) {
|
| +checkUnnamed3500(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'));
|
| @@ -596,7 +794,7 @@ buildMonitoredResource() {
|
| var o = new api.MonitoredResource();
|
| buildCounterMonitoredResource++;
|
| if (buildCounterMonitoredResource < 3) {
|
| - o.labels = buildUnnamed3492();
|
| + o.labels = buildUnnamed3500();
|
| o.type = "foo";
|
| }
|
| buildCounterMonitoredResource--;
|
| @@ -606,20 +804,20 @@ buildMonitoredResource() {
|
| checkMonitoredResource(api.MonitoredResource o) {
|
| buildCounterMonitoredResource++;
|
| if (buildCounterMonitoredResource < 3) {
|
| - checkUnnamed3492(o.labels);
|
| + checkUnnamed3500(o.labels);
|
| unittest.expect(o.type, unittest.equals('foo'));
|
| }
|
| buildCounterMonitoredResource--;
|
| }
|
|
|
| -buildUnnamed3493() {
|
| +buildUnnamed3501() {
|
| var o = new core.List<api.LabelDescriptor>();
|
| o.add(buildLabelDescriptor());
|
| o.add(buildLabelDescriptor());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3493(core.List<api.LabelDescriptor> o) {
|
| +checkUnnamed3501(core.List<api.LabelDescriptor> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLabelDescriptor(o[0]);
|
| checkLabelDescriptor(o[1]);
|
| @@ -632,7 +830,7 @@ buildMonitoredResourceDescriptor() {
|
| if (buildCounterMonitoredResourceDescriptor < 3) {
|
| o.description = "foo";
|
| o.displayName = "foo";
|
| - o.labels = buildUnnamed3493();
|
| + o.labels = buildUnnamed3501();
|
| o.name = "foo";
|
| o.type = "foo";
|
| }
|
| @@ -645,34 +843,34 @@ checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) {
|
| if (buildCounterMonitoredResourceDescriptor < 3) {
|
| unittest.expect(o.description, unittest.equals('foo'));
|
| unittest.expect(o.displayName, unittest.equals('foo'));
|
| - checkUnnamed3493(o.labels);
|
| + checkUnnamed3501(o.labels);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| unittest.expect(o.type, unittest.equals('foo'));
|
| }
|
| buildCounterMonitoredResourceDescriptor--;
|
| }
|
|
|
| -buildUnnamed3494() {
|
| +buildUnnamed3502() {
|
| var o = new core.List<api.LogLine>();
|
| o.add(buildLogLine());
|
| o.add(buildLogLine());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3494(core.List<api.LogLine> o) {
|
| +checkUnnamed3502(core.List<api.LogLine> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLogLine(o[0]);
|
| checkLogLine(o[1]);
|
| }
|
|
|
| -buildUnnamed3495() {
|
| +buildUnnamed3503() {
|
| var o = new core.List<api.SourceReference>();
|
| o.add(buildSourceReference());
|
| o.add(buildSourceReference());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3495(core.List<api.SourceReference> o) {
|
| +checkUnnamed3503(core.List<api.SourceReference> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkSourceReference(o[0]);
|
| checkSourceReference(o[1]);
|
| @@ -695,7 +893,7 @@ buildRequestLog() {
|
| o.instanceIndex = 42;
|
| o.ip = "foo";
|
| o.latency = "foo";
|
| - o.line = buildUnnamed3494();
|
| + o.line = buildUnnamed3502();
|
| o.megaCycles = "foo";
|
| o.method = "foo";
|
| o.moduleId = "foo";
|
| @@ -705,7 +903,7 @@ buildRequestLog() {
|
| o.requestId = "foo";
|
| o.resource = "foo";
|
| o.responseSize = "foo";
|
| - o.sourceReference = buildUnnamed3495();
|
| + o.sourceReference = buildUnnamed3503();
|
| o.startTime = "foo";
|
| o.status = 42;
|
| o.taskName = "foo";
|
| @@ -735,7 +933,7 @@ checkRequestLog(api.RequestLog o) {
|
| unittest.expect(o.instanceIndex, unittest.equals(42));
|
| unittest.expect(o.ip, unittest.equals('foo'));
|
| unittest.expect(o.latency, unittest.equals('foo'));
|
| - checkUnnamed3494(o.line);
|
| + checkUnnamed3502(o.line);
|
| unittest.expect(o.megaCycles, unittest.equals('foo'));
|
| unittest.expect(o.method, unittest.equals('foo'));
|
| unittest.expect(o.moduleId, unittest.equals('foo'));
|
| @@ -745,7 +943,7 @@ checkRequestLog(api.RequestLog o) {
|
| unittest.expect(o.requestId, unittest.equals('foo'));
|
| unittest.expect(o.resource, unittest.equals('foo'));
|
| unittest.expect(o.responseSize, unittest.equals('foo'));
|
| - checkUnnamed3495(o.sourceReference);
|
| + checkUnnamed3503(o.sourceReference);
|
| unittest.expect(o.startTime, unittest.equals('foo'));
|
| unittest.expect(o.status, unittest.equals(42));
|
| unittest.expect(o.taskName, unittest.equals('foo'));
|
| @@ -803,27 +1001,27 @@ checkSourceReference(api.SourceReference o) {
|
| buildCounterSourceReference--;
|
| }
|
|
|
| -buildUnnamed3496() {
|
| +buildUnnamed3504() {
|
| var o = new core.List<api.LogEntry>();
|
| o.add(buildLogEntry());
|
| o.add(buildLogEntry());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3496(core.List<api.LogEntry> o) {
|
| +checkUnnamed3504(core.List<api.LogEntry> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkLogEntry(o[0]);
|
| checkLogEntry(o[1]);
|
| }
|
|
|
| -buildUnnamed3497() {
|
| +buildUnnamed3505() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed3497(core.Map<core.String, core.String> o) {
|
| +checkUnnamed3505(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'));
|
| @@ -834,8 +1032,8 @@ buildWriteLogEntriesRequest() {
|
| var o = new api.WriteLogEntriesRequest();
|
| buildCounterWriteLogEntriesRequest++;
|
| if (buildCounterWriteLogEntriesRequest < 3) {
|
| - o.entries = buildUnnamed3496();
|
| - o.labels = buildUnnamed3497();
|
| + o.entries = buildUnnamed3504();
|
| + o.labels = buildUnnamed3505();
|
| o.logName = "foo";
|
| o.partialSuccess = true;
|
| o.resource = buildMonitoredResource();
|
| @@ -847,8 +1045,8 @@ buildWriteLogEntriesRequest() {
|
| checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) {
|
| buildCounterWriteLogEntriesRequest++;
|
| if (buildCounterWriteLogEntriesRequest < 3) {
|
| - checkUnnamed3496(o.entries);
|
| - checkUnnamed3497(o.labels);
|
| + checkUnnamed3504(o.entries);
|
| + checkUnnamed3505(o.labels);
|
| unittest.expect(o.logName, unittest.equals('foo'));
|
| unittest.expect(o.partialSuccess, unittest.isTrue);
|
| checkMonitoredResource(o.resource);
|
| @@ -860,21 +1058,26 @@ core.int buildCounterWriteLogEntriesResponse = 0;
|
| buildWriteLogEntriesResponse() {
|
| var o = new api.WriteLogEntriesResponse();
|
| buildCounterWriteLogEntriesResponse++;
|
| - if (buildCounterWriteLogEntriesResponse < 3) {
|
| - }
|
| + if (buildCounterWriteLogEntriesResponse < 3) {}
|
| buildCounterWriteLogEntriesResponse--;
|
| return o;
|
| }
|
|
|
| checkWriteLogEntriesResponse(api.WriteLogEntriesResponse o) {
|
| buildCounterWriteLogEntriesResponse++;
|
| - if (buildCounterWriteLogEntriesResponse < 3) {
|
| - }
|
| + if (buildCounterWriteLogEntriesResponse < 3) {}
|
| buildCounterWriteLogEntriesResponse--;
|
| }
|
|
|
| -
|
| main() {
|
| + unittest.group("obj-schema-BucketOptions", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildBucketOptions();
|
| + var od = new api.BucketOptions.fromJson(o.toJson());
|
| + checkBucketOptions(od);
|
| + });
|
| + });
|
| +
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -883,6 +1086,21 @@ main() {
|
| });
|
| });
|
|
|
| + unittest.group("obj-schema-Explicit", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildExplicit();
|
| + var od = new api.Explicit.fromJson(o.toJson());
|
| + checkExplicit(od);
|
| + });
|
| + });
|
| +
|
| + unittest.group("obj-schema-Exponential", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildExponential();
|
| + var od = new api.Exponential.fromJson(o.toJson());
|
| + checkExponential(od);
|
| + });
|
| + });
|
|
|
| unittest.group("obj-schema-HttpRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -892,7 +1110,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LabelDescriptor", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLabelDescriptor();
|
| @@ -901,6 +1118,13 @@ main() {
|
| });
|
| });
|
|
|
| + unittest.group("obj-schema-Linear", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildLinear();
|
| + var od = new api.Linear.fromJson(o.toJson());
|
| + checkLinear(od);
|
| + });
|
| + });
|
|
|
| unittest.group("obj-schema-ListLogEntriesRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -910,7 +1134,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListLogEntriesResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListLogEntriesResponse();
|
| @@ -919,7 +1142,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListLogMetricsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListLogMetricsResponse();
|
| @@ -928,7 +1150,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListLogsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListLogsResponse();
|
| @@ -937,16 +1158,15 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListMonitoredResourceDescriptorsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListMonitoredResourceDescriptorsResponse();
|
| - var od = new api.ListMonitoredResourceDescriptorsResponse.fromJson(o.toJson());
|
| + var od =
|
| + new api.ListMonitoredResourceDescriptorsResponse.fromJson(o.toJson());
|
| checkListMonitoredResourceDescriptorsResponse(od);
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-ListSinksResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListSinksResponse();
|
| @@ -955,7 +1175,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogEntry", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogEntry();
|
| @@ -964,7 +1183,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogEntryOperation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogEntryOperation();
|
| @@ -973,7 +1191,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogEntrySourceLocation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogEntrySourceLocation();
|
| @@ -982,7 +1199,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogLine", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogLine();
|
| @@ -991,7 +1207,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogMetric", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogMetric();
|
| @@ -1000,7 +1215,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-LogSink", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildLogSink();
|
| @@ -1009,6 +1223,13 @@ main() {
|
| });
|
| });
|
|
|
| + unittest.group("obj-schema-MetricDescriptor", () {
|
| + unittest.test("to-json--from-json", () {
|
| + var o = buildMetricDescriptor();
|
| + var od = new api.MetricDescriptor.fromJson(o.toJson());
|
| + checkMetricDescriptor(od);
|
| + });
|
| + });
|
|
|
| unittest.group("obj-schema-MonitoredResource", () {
|
| unittest.test("to-json--from-json", () {
|
| @@ -1018,7 +1239,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-MonitoredResourceDescriptor", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildMonitoredResourceDescriptor();
|
| @@ -1027,7 +1247,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-RequestLog", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildRequestLog();
|
| @@ -1036,7 +1255,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SourceLocation", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSourceLocation();
|
| @@ -1045,7 +1263,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-SourceReference", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSourceReference();
|
| @@ -1054,7 +1271,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-WriteLogEntriesRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildWriteLogEntriesRequest();
|
| @@ -1063,7 +1279,6 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("obj-schema-WriteLogEntriesResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildWriteLogEntriesResponse();
|
| @@ -1072,21 +1287,22 @@ main() {
|
| });
|
| });
|
|
|
| -
|
| unittest.group("resource-BillingAccountsLogsResourceApi", () {
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingAccounts.logs;
|
| + api.BillingAccountsLogsResourceApi res =
|
| + new api.LoggingApi(mock).billingAccounts.logs;
|
| var arg_logName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1100,16 +1316,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));
|
| @@ -1120,20 +1337,22 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingAccounts.logs;
|
| + api.BillingAccountsLogsResourceApi res =
|
| + new api.LoggingApi(mock).billingAccounts.logs;
|
| var arg_parent = "foo";
|
| - var arg_pageSize = 42;
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1147,33 +1366,35 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListLogsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| checkListLogsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-EntriesResourceApi", () {
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.EntriesResourceApi res = new api.LoggingApi(mock).entries;
|
| var arg_request = buildListLogEntriesRequest();
|
| @@ -1185,9 +1406,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 + 20), unittest.equals("v2beta1/entries:list"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 20),
|
| + unittest.equals("v2beta1/entries:list"));
|
| pathOffset += 20;
|
|
|
| var query = (req.url).query;
|
| @@ -1200,27 +1423,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(buildListLogEntriesResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_request).then(unittest.expectAsync1(((api.ListLogEntriesResponse response) {
|
| + res
|
| + .list(arg_request)
|
| + .then(unittest.expectAsync1(((api.ListLogEntriesResponse response) {
|
| checkListLogEntriesResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--write", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.EntriesResourceApi res = new api.LoggingApi(mock).entries;
|
| var arg_request = buildWriteLogEntriesRequest();
|
| @@ -1232,9 +1457,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 + 21), unittest.equals("v2beta1/entries:write"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 21),
|
| + unittest.equals("v2beta1/entries:write"));
|
| pathOffset += 21;
|
|
|
| var query = (req.url).query;
|
| @@ -1247,43 +1474,46 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildWriteLogEntriesResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.write(arg_request).then(unittest.expectAsync1(((api.WriteLogEntriesResponse response) {
|
| + res
|
| + .write(arg_request)
|
| + .then(unittest.expectAsync1(((api.WriteLogEntriesResponse response) {
|
| checkWriteLogEntriesResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () {
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock).monitoredResourceDescriptors;
|
| - var arg_pageSize = 42;
|
| + api.MonitoredResourceDescriptorsResourceApi res =
|
| + new api.LoggingApi(mock).monitoredResourceDescriptors;
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 36), unittest.equals("v2beta1/monitoredResourceDescriptors"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 36),
|
| + unittest.equals("v2beta1/monitoredResourceDescriptors"));
|
| pathOffset += 36;
|
|
|
| var query = (req.url).query;
|
| @@ -1296,44 +1526,50 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResponse());
|
| + var resp = convert.JSON
|
| + .encode(buildListMonitoredResourceDescriptorsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) {
|
| + res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest
|
| + .expectAsync1(
|
| + ((api.ListMonitoredResourceDescriptorsResponse response) {
|
| checkListMonitoredResourceDescriptorsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-OrganizationsLogsResourceApi", () {
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizations.logs;
|
| + api.OrganizationsLogsResourceApi res =
|
| + new api.LoggingApi(mock).organizations.logs;
|
| var arg_logName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1347,16 +1583,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));
|
| @@ -1367,9 +1604,9 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizations.logs;
|
| + api.OrganizationsLogsResourceApi res =
|
| + new api.LoggingApi(mock).organizations.logs;
|
| var arg_parent = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| @@ -1378,9 +1615,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1394,33 +1633,35 @@ 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(buildListLogsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| checkListLogsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsLogsResourceApi", () {
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs;
|
| var arg_logName = "foo";
|
| @@ -1429,9 +1670,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1445,16 +1688,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));
|
| @@ -1465,20 +1709,21 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs;
|
| var arg_parent = "foo";
|
| - var arg_pageSize = 42;
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1492,35 +1737,38 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListLogsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListLogsResponse response) {
|
| checkListLogsResponse(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsMetricsResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics;
|
| + api.ProjectsMetricsResourceApi res =
|
| + new api.LoggingApi(mock).projects.metrics;
|
| var arg_request = buildLogMetric();
|
| var arg_parent = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1531,9 +1779,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1547,38 +1797,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(buildLogMetric());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.LogMetric response) {
|
| + res
|
| + .create(arg_request, arg_parent)
|
| + .then(unittest.expectAsync1(((api.LogMetric response) {
|
| checkLogMetric(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics;
|
| + api.ProjectsMetricsResourceApi res =
|
| + new api.LoggingApi(mock).projects.metrics;
|
| var arg_metricName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1592,38 +1847,43 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.delete(arg_metricName).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_metricName)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics;
|
| + api.ProjectsMetricsResourceApi res =
|
| + new api.LoggingApi(mock).projects.metrics;
|
| var arg_metricName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1637,29 +1897,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(buildLogMetric());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.get(arg_metricName).then(unittest.expectAsync1(((api.LogMetric response) {
|
| + res
|
| + .get(arg_metricName)
|
| + .then(unittest.expectAsync1(((api.LogMetric response) {
|
| checkLogMetric(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics;
|
| + api.ProjectsMetricsResourceApi res =
|
| + new api.LoggingApi(mock).projects.metrics;
|
| var arg_parent = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| @@ -1668,9 +1931,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1684,31 +1949,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(buildListLogMetricsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListLogMetricsResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListLogMetricsResponse response) {
|
| checkListLogMetricsResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--update", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics;
|
| + api.ProjectsMetricsResourceApi res =
|
| + new api.LoggingApi(mock).projects.metrics;
|
| var arg_request = buildLogMetric();
|
| var arg_metricName = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| @@ -1719,9 +1989,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1735,33 +2007,34 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildLogMetric());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_metricName).then(unittest.expectAsync1(((api.LogMetric response) {
|
| + res
|
| + .update(arg_request, arg_metricName)
|
| + .then(unittest.expectAsync1(((api.LogMetric response) {
|
| checkLogMetric(response);
|
| })));
|
| });
|
| -
|
| });
|
|
|
| -
|
| unittest.group("resource-ProjectsSinksResourceApi", () {
|
| unittest.test("method--create", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks;
|
| + api.ProjectsSinksResourceApi res =
|
| + new api.LoggingApi(mock).projects.sinks;
|
| var arg_request = buildLogSink();
|
| var arg_parent = "foo";
|
| var arg_uniqueWriterIdentity = true;
|
| @@ -1773,9 +2046,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1789,39 +2064,46 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals("$arg_uniqueWriterIdentity"));
|
| -
|
| + unittest.expect(queryMap["uniqueWriterIdentity"].first,
|
| + unittest.equals("$arg_uniqueWriterIdentity"));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildLogSink());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriterIdentity).then(unittest.expectAsync1(((api.LogSink response) {
|
| + res
|
| + .create(arg_request, arg_parent,
|
| + uniqueWriterIdentity: arg_uniqueWriterIdentity)
|
| + .then(unittest.expectAsync1(((api.LogSink response) {
|
| checkLogSink(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--delete", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks;
|
| + api.ProjectsSinksResourceApi res =
|
| + new api.LoggingApi(mock).projects.sinks;
|
| var arg_sinkName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1835,38 +2117,43 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
|
|
| -
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildEmpty());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response) {
|
| + res
|
| + .delete(arg_sinkName)
|
| + .then(unittest.expectAsync1(((api.Empty response) {
|
| checkEmpty(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--get", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks;
|
| + api.ProjectsSinksResourceApi res =
|
| + new api.LoggingApi(mock).projects.sinks;
|
| var arg_sinkName = "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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1880,16 +2167,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(buildLogSink());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| @@ -1900,20 +2188,22 @@ main() {
|
| });
|
|
|
| unittest.test("method--list", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks;
|
| + api.ProjectsSinksResourceApi res =
|
| + new api.LoggingApi(mock).projects.sinks;
|
| var arg_parent = "foo";
|
| - var arg_pageSize = 42;
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + unittest.expect(
|
| + path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1927,33 +2217,39 @@ main() {
|
| if (n == null) return null;
|
| throw new core.ArgumentError("Invalid boolean: $n");
|
| }
|
| +
|
| if (query.length > 0) {
|
| for (var part in query.split("&")) {
|
| var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
|
| + core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| -
|
| + unittest.expect(
|
| + queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| + unittest.expect(core.int.parse(queryMap["pageSize"].first),
|
| + unittest.equals(arg_pageSize));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildListSinksResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListSinksResponse response) {
|
| + res
|
| + .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
|
| + .then(unittest.expectAsync1(((api.ListSinksResponse response) {
|
| checkListSinksResponse(response);
|
| })));
|
| });
|
|
|
| unittest.test("method--update", () {
|
| -
|
| var mock = new HttpServerMock();
|
| - api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks;
|
| + api.ProjectsSinksResourceApi res =
|
| + new api.LoggingApi(mock).projects.sinks;
|
| var arg_request = buildLogSink();
|
| var arg_sinkName = "foo";
|
| + var arg_updateMask = "foo";
|
| var arg_uniqueWriterIdentity = true;
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var obj = new api.LogSink.fromJson(json);
|
| @@ -1963,9 +2259,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 + 8), unittest.equals("v2beta1/"));
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 8),
|
| + unittest.equals("v2beta1/"));
|
| pathOffset += 8;
|
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
|
|
| @@ -1979,28 +2277,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]));
|
| }
|
| }
|
| - unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals("$arg_uniqueWriterIdentity"));
|
| -
|
| + unittest.expect(
|
| + queryMap["updateMask"].first, unittest.equals(arg_updateMask));
|
| + unittest.expect(queryMap["uniqueWriterIdentity"].first,
|
| + unittest.equals("$arg_uniqueWriterIdentity"));
|
|
|
| var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| + "content-type": "application/json; charset=utf-8",
|
| };
|
| var resp = convert.JSON.encode(buildLogSink());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWriterIdentity).then(unittest.expectAsync1(((api.LogSink response) {
|
| + res
|
| + .update(arg_request, arg_sinkName,
|
| + updateMask: arg_updateMask,
|
| + uniqueWriterIdentity: arg_uniqueWriterIdentity)
|
| + .then(unittest.expectAsync1(((api.LogSink response) {
|
| checkLogSink(response);
|
| })));
|
| });
|
| -
|
| });
|
| -
|
| -
|
| }
|
| -
|
|
|