| Index: generated/googleapis/test/youtubeanalytics/v1_test.dart
|
| diff --git a/generated/googleapis/test/youtubeanalytics/v1_test.dart b/generated/googleapis/test/youtubeanalytics/v1_test.dart
|
| index 25e8afb212509a3da3a44caa1aa9f41cc0dfaeb4..6d82b8794f4a971c04911af5a36fcb31e0455d84 100644
|
| --- a/generated/googleapis/test/youtubeanalytics/v1_test.dart
|
| +++ b/generated/googleapis/test/youtubeanalytics/v1_test.dart
|
| @@ -51,187 +51,6 @@ http.StreamedResponse stringResponse(
|
| return new http.StreamedResponse(stream, status, headers: headers);
|
| }
|
|
|
| -core.int buildCounterBatchReportOutputs = 0;
|
| -buildBatchReportOutputs() {
|
| - var o = new api.BatchReportOutputs();
|
| - buildCounterBatchReportOutputs++;
|
| - if (buildCounterBatchReportOutputs < 3) {
|
| - o.downloadUrl = "foo";
|
| - o.format = "foo";
|
| - o.type = "foo";
|
| - }
|
| - buildCounterBatchReportOutputs--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReportOutputs(api.BatchReportOutputs o) {
|
| - buildCounterBatchReportOutputs++;
|
| - if (buildCounterBatchReportOutputs < 3) {
|
| - unittest.expect(o.downloadUrl, unittest.equals('foo'));
|
| - unittest.expect(o.format, unittest.equals('foo'));
|
| - unittest.expect(o.type, unittest.equals('foo'));
|
| - }
|
| - buildCounterBatchReportOutputs--;
|
| -}
|
| -
|
| -buildUnnamed189() {
|
| - var o = new core.List<api.BatchReportOutputs>();
|
| - o.add(buildBatchReportOutputs());
|
| - o.add(buildBatchReportOutputs());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed189(core.List<api.BatchReportOutputs> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkBatchReportOutputs(o[0]);
|
| - checkBatchReportOutputs(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterBatchReportTimeSpan = 0;
|
| -buildBatchReportTimeSpan() {
|
| - var o = new api.BatchReportTimeSpan();
|
| - buildCounterBatchReportTimeSpan++;
|
| - if (buildCounterBatchReportTimeSpan < 3) {
|
| - o.endTime = core.DateTime.parse("2002-02-27T14:01:02");
|
| - o.startTime = core.DateTime.parse("2002-02-27T14:01:02");
|
| - }
|
| - buildCounterBatchReportTimeSpan--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReportTimeSpan(api.BatchReportTimeSpan o) {
|
| - buildCounterBatchReportTimeSpan++;
|
| - if (buildCounterBatchReportTimeSpan < 3) {
|
| - unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")));
|
| - unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")));
|
| - }
|
| - buildCounterBatchReportTimeSpan--;
|
| -}
|
| -
|
| -core.int buildCounterBatchReport = 0;
|
| -buildBatchReport() {
|
| - var o = new api.BatchReport();
|
| - buildCounterBatchReport++;
|
| - if (buildCounterBatchReport < 3) {
|
| - o.id = "foo";
|
| - o.kind = "foo";
|
| - o.outputs = buildUnnamed189();
|
| - o.reportId = "foo";
|
| - o.timeSpan = buildBatchReportTimeSpan();
|
| - o.timeUpdated = core.DateTime.parse("2002-02-27T14:01:02");
|
| - }
|
| - buildCounterBatchReport--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReport(api.BatchReport o) {
|
| - buildCounterBatchReport++;
|
| - if (buildCounterBatchReport < 3) {
|
| - unittest.expect(o.id, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - checkUnnamed189(o.outputs);
|
| - unittest.expect(o.reportId, unittest.equals('foo'));
|
| - checkBatchReportTimeSpan(o.timeSpan);
|
| - unittest.expect(o.timeUpdated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02")));
|
| - }
|
| - buildCounterBatchReport--;
|
| -}
|
| -
|
| -core.int buildCounterBatchReportDefinition = 0;
|
| -buildBatchReportDefinition() {
|
| - var o = new api.BatchReportDefinition();
|
| - buildCounterBatchReportDefinition++;
|
| - if (buildCounterBatchReportDefinition < 3) {
|
| - o.id = "foo";
|
| - o.kind = "foo";
|
| - o.name = "foo";
|
| - o.status = "foo";
|
| - o.type = "foo";
|
| - }
|
| - buildCounterBatchReportDefinition--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReportDefinition(api.BatchReportDefinition o) {
|
| - buildCounterBatchReportDefinition++;
|
| - if (buildCounterBatchReportDefinition < 3) {
|
| - unittest.expect(o.id, unittest.equals('foo'));
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - unittest.expect(o.name, unittest.equals('foo'));
|
| - unittest.expect(o.status, unittest.equals('foo'));
|
| - unittest.expect(o.type, unittest.equals('foo'));
|
| - }
|
| - buildCounterBatchReportDefinition--;
|
| -}
|
| -
|
| -buildUnnamed190() {
|
| - var o = new core.List<api.BatchReportDefinition>();
|
| - o.add(buildBatchReportDefinition());
|
| - o.add(buildBatchReportDefinition());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed190(core.List<api.BatchReportDefinition> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkBatchReportDefinition(o[0]);
|
| - checkBatchReportDefinition(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterBatchReportDefinitionList = 0;
|
| -buildBatchReportDefinitionList() {
|
| - var o = new api.BatchReportDefinitionList();
|
| - buildCounterBatchReportDefinitionList++;
|
| - if (buildCounterBatchReportDefinitionList < 3) {
|
| - o.items = buildUnnamed190();
|
| - o.kind = "foo";
|
| - }
|
| - buildCounterBatchReportDefinitionList--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReportDefinitionList(api.BatchReportDefinitionList o) {
|
| - buildCounterBatchReportDefinitionList++;
|
| - if (buildCounterBatchReportDefinitionList < 3) {
|
| - checkUnnamed190(o.items);
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - }
|
| - buildCounterBatchReportDefinitionList--;
|
| -}
|
| -
|
| -buildUnnamed191() {
|
| - var o = new core.List<api.BatchReport>();
|
| - o.add(buildBatchReport());
|
| - o.add(buildBatchReport());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed191(core.List<api.BatchReport> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkBatchReport(o[0]);
|
| - checkBatchReport(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterBatchReportList = 0;
|
| -buildBatchReportList() {
|
| - var o = new api.BatchReportList();
|
| - buildCounterBatchReportList++;
|
| - if (buildCounterBatchReportList < 3) {
|
| - o.items = buildUnnamed191();
|
| - o.kind = "foo";
|
| - }
|
| - buildCounterBatchReportList--;
|
| - return o;
|
| -}
|
| -
|
| -checkBatchReportList(api.BatchReportList o) {
|
| - buildCounterBatchReportList++;
|
| - if (buildCounterBatchReportList < 3) {
|
| - checkUnnamed191(o.items);
|
| - unittest.expect(o.kind, unittest.equals('foo'));
|
| - }
|
| - buildCounterBatchReportList--;
|
| -}
|
| -
|
| core.int buildCounterGroupContentDetails = 0;
|
| buildGroupContentDetails() {
|
| var o = new api.GroupContentDetails();
|
| @@ -349,14 +168,14 @@ checkGroupItem(api.GroupItem o) {
|
| buildCounterGroupItem--;
|
| }
|
|
|
| -buildUnnamed192() {
|
| +buildUnnamed193() {
|
| var o = new core.List<api.GroupItem>();
|
| o.add(buildGroupItem());
|
| o.add(buildGroupItem());
|
| return o;
|
| }
|
|
|
| -checkUnnamed192(core.List<api.GroupItem> o) {
|
| +checkUnnamed193(core.List<api.GroupItem> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkGroupItem(o[0]);
|
| checkGroupItem(o[1]);
|
| @@ -368,7 +187,7 @@ buildGroupItemListResponse() {
|
| buildCounterGroupItemListResponse++;
|
| if (buildCounterGroupItemListResponse < 3) {
|
| o.etag = "foo";
|
| - o.items = buildUnnamed192();
|
| + o.items = buildUnnamed193();
|
| o.kind = "foo";
|
| }
|
| buildCounterGroupItemListResponse--;
|
| @@ -379,20 +198,20 @@ checkGroupItemListResponse(api.GroupItemListResponse o) {
|
| buildCounterGroupItemListResponse++;
|
| if (buildCounterGroupItemListResponse < 3) {
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| - checkUnnamed192(o.items);
|
| + checkUnnamed193(o.items);
|
| unittest.expect(o.kind, unittest.equals('foo'));
|
| }
|
| buildCounterGroupItemListResponse--;
|
| }
|
|
|
| -buildUnnamed193() {
|
| +buildUnnamed194() {
|
| var o = new core.List<api.Group>();
|
| o.add(buildGroup());
|
| o.add(buildGroup());
|
| return o;
|
| }
|
|
|
| -checkUnnamed193(core.List<api.Group> o) {
|
| +checkUnnamed194(core.List<api.Group> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkGroup(o[0]);
|
| checkGroup(o[1]);
|
| @@ -404,7 +223,7 @@ buildGroupListResponse() {
|
| buildCounterGroupListResponse++;
|
| if (buildCounterGroupListResponse < 3) {
|
| o.etag = "foo";
|
| - o.items = buildUnnamed193();
|
| + o.items = buildUnnamed194();
|
| o.kind = "foo";
|
| o.nextPageToken = "foo";
|
| }
|
| @@ -416,7 +235,7 @@ checkGroupListResponse(api.GroupListResponse o) {
|
| buildCounterGroupListResponse++;
|
| if (buildCounterGroupListResponse < 3) {
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| - checkUnnamed193(o.items);
|
| + checkUnnamed194(o.items);
|
| unittest.expect(o.kind, unittest.equals('foo'));
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| }
|
| @@ -446,43 +265,43 @@ checkResultTableColumnHeaders(api.ResultTableColumnHeaders o) {
|
| buildCounterResultTableColumnHeaders--;
|
| }
|
|
|
| -buildUnnamed194() {
|
| +buildUnnamed195() {
|
| var o = new core.List<api.ResultTableColumnHeaders>();
|
| o.add(buildResultTableColumnHeaders());
|
| o.add(buildResultTableColumnHeaders());
|
| return o;
|
| }
|
|
|
| -checkUnnamed194(core.List<api.ResultTableColumnHeaders> o) {
|
| +checkUnnamed195(core.List<api.ResultTableColumnHeaders> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkResultTableColumnHeaders(o[0]);
|
| checkResultTableColumnHeaders(o[1]);
|
| }
|
|
|
| -buildUnnamed195() {
|
| +buildUnnamed196() {
|
| var o = new core.List<core.Object>();
|
| o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
|
| o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
|
| return o;
|
| }
|
|
|
| -checkUnnamed195(core.List<core.Object> o) {
|
| +checkUnnamed196(core.List<core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| var casted1 = (o[0]) 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[1]) 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'));
|
| }
|
|
|
| -buildUnnamed196() {
|
| +buildUnnamed197() {
|
| var o = new core.List<core.List<core.Object>>();
|
| - o.add(buildUnnamed195());
|
| - o.add(buildUnnamed195());
|
| + o.add(buildUnnamed196());
|
| + o.add(buildUnnamed196());
|
| return o;
|
| }
|
|
|
| -checkUnnamed196(core.List<core.List<core.Object>> o) {
|
| +checkUnnamed197(core.List<core.List<core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed195(o[0]);
|
| - checkUnnamed195(o[1]);
|
| + checkUnnamed196(o[0]);
|
| + checkUnnamed196(o[1]);
|
| }
|
|
|
| core.int buildCounterResultTable = 0;
|
| @@ -490,9 +309,9 @@ buildResultTable() {
|
| var o = new api.ResultTable();
|
| buildCounterResultTable++;
|
| if (buildCounterResultTable < 3) {
|
| - o.columnHeaders = buildUnnamed194();
|
| + o.columnHeaders = buildUnnamed195();
|
| o.kind = "foo";
|
| - o.rows = buildUnnamed196();
|
| + o.rows = buildUnnamed197();
|
| }
|
| buildCounterResultTable--;
|
| return o;
|
| @@ -501,69 +320,15 @@ buildResultTable() {
|
| checkResultTable(api.ResultTable o) {
|
| buildCounterResultTable++;
|
| if (buildCounterResultTable < 3) {
|
| - checkUnnamed194(o.columnHeaders);
|
| + checkUnnamed195(o.columnHeaders);
|
| unittest.expect(o.kind, unittest.equals('foo'));
|
| - checkUnnamed196(o.rows);
|
| + checkUnnamed197(o.rows);
|
| }
|
| buildCounterResultTable--;
|
| }
|
|
|
|
|
| main() {
|
| - unittest.group("obj-schema-BatchReportOutputs", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReportOutputs();
|
| - var od = new api.BatchReportOutputs.fromJson(o.toJson());
|
| - checkBatchReportOutputs(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BatchReportTimeSpan", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReportTimeSpan();
|
| - var od = new api.BatchReportTimeSpan.fromJson(o.toJson());
|
| - checkBatchReportTimeSpan(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BatchReport", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReport();
|
| - var od = new api.BatchReport.fromJson(o.toJson());
|
| - checkBatchReport(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BatchReportDefinition", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReportDefinition();
|
| - var od = new api.BatchReportDefinition.fromJson(o.toJson());
|
| - checkBatchReportDefinition(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BatchReportDefinitionList", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReportDefinitionList();
|
| - var od = new api.BatchReportDefinitionList.fromJson(o.toJson());
|
| - checkBatchReportDefinitionList(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BatchReportList", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBatchReportList();
|
| - var od = new api.BatchReportList.fromJson(o.toJson());
|
| - checkBatchReportList(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-GroupContentDetails", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGroupContentDetails();
|
| @@ -645,110 +410,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("resource-BatchReportDefinitionsResourceApi", () {
|
| - unittest.test("method--list", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.BatchReportDefinitionsResourceApi res = new api.YoutubeAnalyticsApi(mock).batchReportDefinitions;
|
| - var arg_onBehalfOfContentOwner = "foo";
|
| - mock.register(unittest.expectAsync((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("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("youtube/analytics/v1/"));
|
| - pathOffset += 21;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.equals("batchReportDefinitions"));
|
| - pathOffset += 22;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - 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]));
|
| - }
|
| - }
|
| - unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equals(arg_onBehalfOfContentOwner));
|
| -
|
| -
|
| - var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| - };
|
| - var resp = convert.JSON.encode(buildBatchReportDefinitionList());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.list(arg_onBehalfOfContentOwner).then(unittest.expectAsync(((api.BatchReportDefinitionList response) {
|
| - checkBatchReportDefinitionList(response);
|
| - })));
|
| - });
|
| -
|
| - });
|
| -
|
| -
|
| - unittest.group("resource-BatchReportsResourceApi", () {
|
| - unittest.test("method--list", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.BatchReportsResourceApi res = new api.YoutubeAnalyticsApi(mock).batchReports;
|
| - var arg_batchReportDefinitionId = "foo";
|
| - var arg_onBehalfOfContentOwner = "foo";
|
| - mock.register(unittest.expectAsync((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("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("youtube/analytics/v1/"));
|
| - pathOffset += 21;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("batchReports"));
|
| - pathOffset += 12;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - 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]));
|
| - }
|
| - }
|
| - unittest.expect(queryMap["batchReportDefinitionId"].first, unittest.equals(arg_batchReportDefinitionId));
|
| - unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equals(arg_onBehalfOfContentOwner));
|
| -
|
| -
|
| - var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| - };
|
| - var resp = convert.JSON.encode(buildBatchReportList());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.list(arg_batchReportDefinitionId, arg_onBehalfOfContentOwner).then(unittest.expectAsync(((api.BatchReportList response) {
|
| - checkBatchReportList(response);
|
| - })));
|
| - });
|
| -
|
| - });
|
| -
|
| -
|
| unittest.group("resource-GroupItemsResourceApi", () {
|
| unittest.test("method--delete", () {
|
|
|
|
|