Index: generated/googleapis/test/doubleclickbidmanager/v1_test.dart |
diff --git a/generated/googleapis/test/doubleclickbidmanager/v1_test.dart b/generated/googleapis/test/doubleclickbidmanager/v1_test.dart |
index b150c711ed1f8a98346fa0147221e159c904181f..6a1e0a00af6bb58ffcdf62e86f3bd9eee18cc234 100644 |
--- a/generated/googleapis/test/doubleclickbidmanager/v1_test.dart |
+++ b/generated/googleapis/test/doubleclickbidmanager/v1_test.dart |
@@ -51,14 +51,14 @@ http.StreamedResponse stringResponse( |
return new http.StreamedResponse(stream, status, headers: headers); |
} |
-buildUnnamed1329() { |
+buildUnnamed1350() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1329(core.List<core.String> o) { |
+checkUnnamed1350(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')); |
@@ -70,7 +70,7 @@ buildDownloadLineItemsRequest() { |
buildCounterDownloadLineItemsRequest++; |
if (buildCounterDownloadLineItemsRequest < 3) { |
o.fileSpec = "foo"; |
- o.filterIds = buildUnnamed1329(); |
+ o.filterIds = buildUnnamed1350(); |
o.filterType = "foo"; |
o.format = "foo"; |
} |
@@ -82,7 +82,7 @@ checkDownloadLineItemsRequest(api.DownloadLineItemsRequest o) { |
buildCounterDownloadLineItemsRequest++; |
if (buildCounterDownloadLineItemsRequest < 3) { |
unittest.expect(o.fileSpec, unittest.equals('foo')); |
- checkUnnamed1329(o.filterIds); |
+ checkUnnamed1350(o.filterIds); |
unittest.expect(o.filterType, unittest.equals('foo')); |
unittest.expect(o.format, unittest.equals('foo')); |
} |
@@ -108,6 +108,82 @@ checkDownloadLineItemsResponse(api.DownloadLineItemsResponse o) { |
buildCounterDownloadLineItemsResponse--; |
} |
+buildUnnamed1351() { |
+ var o = new core.List<core.String>(); |
+ o.add("foo"); |
+ o.add("foo"); |
+ return o; |
+} |
+ |
+checkUnnamed1351(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')); |
+} |
+ |
+buildUnnamed1352() { |
+ var o = new core.List<core.String>(); |
+ o.add("foo"); |
+ o.add("foo"); |
+ return o; |
+} |
+ |
+checkUnnamed1352(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')); |
+} |
+ |
+core.int buildCounterDownloadRequest = 0; |
+buildDownloadRequest() { |
+ var o = new api.DownloadRequest(); |
+ buildCounterDownloadRequest++; |
+ if (buildCounterDownloadRequest < 3) { |
+ o.fileTypes = buildUnnamed1351(); |
+ o.filterIds = buildUnnamed1352(); |
+ o.filterType = "foo"; |
+ o.version = "foo"; |
+ } |
+ buildCounterDownloadRequest--; |
+ return o; |
+} |
+ |
+checkDownloadRequest(api.DownloadRequest o) { |
+ buildCounterDownloadRequest++; |
+ if (buildCounterDownloadRequest < 3) { |
+ checkUnnamed1351(o.fileTypes); |
+ checkUnnamed1352(o.filterIds); |
+ unittest.expect(o.filterType, unittest.equals('foo')); |
+ unittest.expect(o.version, unittest.equals('foo')); |
+ } |
+ buildCounterDownloadRequest--; |
+} |
+ |
+core.int buildCounterDownloadResponse = 0; |
+buildDownloadResponse() { |
+ var o = new api.DownloadResponse(); |
+ buildCounterDownloadResponse++; |
+ if (buildCounterDownloadResponse < 3) { |
+ o.adGroups = "foo"; |
+ o.ads = "foo"; |
+ o.insertionOrders = "foo"; |
+ o.lineItems = "foo"; |
+ } |
+ buildCounterDownloadResponse--; |
+ return o; |
+} |
+ |
+checkDownloadResponse(api.DownloadResponse o) { |
+ buildCounterDownloadResponse++; |
+ if (buildCounterDownloadResponse < 3) { |
+ unittest.expect(o.adGroups, unittest.equals('foo')); |
+ unittest.expect(o.ads, unittest.equals('foo')); |
+ unittest.expect(o.insertionOrders, unittest.equals('foo')); |
+ unittest.expect(o.lineItems, unittest.equals('foo')); |
+ } |
+ buildCounterDownloadResponse--; |
+} |
+ |
core.int buildCounterFilterPair = 0; |
buildFilterPair() { |
var o = new api.FilterPair(); |
@@ -129,14 +205,14 @@ checkFilterPair(api.FilterPair o) { |
buildCounterFilterPair--; |
} |
-buildUnnamed1330() { |
+buildUnnamed1353() { |
var o = new core.List<api.Query>(); |
o.add(buildQuery()); |
o.add(buildQuery()); |
return o; |
} |
-checkUnnamed1330(core.List<api.Query> o) { |
+checkUnnamed1353(core.List<api.Query> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkQuery(o[0]); |
checkQuery(o[1]); |
@@ -148,7 +224,7 @@ buildListQueriesResponse() { |
buildCounterListQueriesResponse++; |
if (buildCounterListQueriesResponse < 3) { |
o.kind = "foo"; |
- o.queries = buildUnnamed1330(); |
+ o.queries = buildUnnamed1353(); |
} |
buildCounterListQueriesResponse--; |
return o; |
@@ -158,19 +234,19 @@ checkListQueriesResponse(api.ListQueriesResponse o) { |
buildCounterListQueriesResponse++; |
if (buildCounterListQueriesResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed1330(o.queries); |
+ checkUnnamed1353(o.queries); |
} |
buildCounterListQueriesResponse--; |
} |
-buildUnnamed1331() { |
+buildUnnamed1354() { |
var o = new core.List<api.Report>(); |
o.add(buildReport()); |
o.add(buildReport()); |
return o; |
} |
-checkUnnamed1331(core.List<api.Report> o) { |
+checkUnnamed1354(core.List<api.Report> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkReport(o[0]); |
checkReport(o[1]); |
@@ -182,7 +258,7 @@ buildListReportsResponse() { |
buildCounterListReportsResponse++; |
if (buildCounterListReportsResponse < 3) { |
o.kind = "foo"; |
- o.reports = buildUnnamed1331(); |
+ o.reports = buildUnnamed1354(); |
} |
buildCounterListReportsResponse--; |
return o; |
@@ -192,112 +268,45 @@ checkListReportsResponse(api.ListReportsResponse o) { |
buildCounterListReportsResponse++; |
if (buildCounterListReportsResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed1331(o.reports); |
+ checkUnnamed1354(o.reports); |
} |
buildCounterListReportsResponse--; |
} |
-core.int buildCounterNote = 0; |
-buildNote() { |
- var o = new api.Note(); |
- buildCounterNote++; |
- if (buildCounterNote < 3) { |
- o.id = "foo"; |
- o.message = "foo"; |
- o.source = "foo"; |
- o.timestamp = "foo"; |
- o.username = "foo"; |
- } |
- buildCounterNote--; |
- return o; |
-} |
- |
-checkNote(api.Note o) { |
- buildCounterNote++; |
- if (buildCounterNote < 3) { |
- unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.message, unittest.equals('foo')); |
- unittest.expect(o.source, unittest.equals('foo')); |
- unittest.expect(o.timestamp, unittest.equals('foo')); |
- unittest.expect(o.username, unittest.equals('foo')); |
- } |
- buildCounterNote--; |
-} |
- |
-buildUnnamed1332() { |
- var o = new core.List<api.Note>(); |
- o.add(buildNote()); |
- o.add(buildNote()); |
- return o; |
-} |
- |
-checkUnnamed1332(core.List<api.Note> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkNote(o[0]); |
- checkNote(o[1]); |
-} |
- |
-core.int buildCounterNotifyProposalChangeRequest = 0; |
-buildNotifyProposalChangeRequest() { |
- var o = new api.NotifyProposalChangeRequest(); |
- buildCounterNotifyProposalChangeRequest++; |
- if (buildCounterNotifyProposalChangeRequest < 3) { |
- o.action = "foo"; |
- o.href = "foo"; |
- o.id = "foo"; |
- o.notes = buildUnnamed1332(); |
- o.token = "foo"; |
- } |
- buildCounterNotifyProposalChangeRequest--; |
- return o; |
-} |
- |
-checkNotifyProposalChangeRequest(api.NotifyProposalChangeRequest o) { |
- buildCounterNotifyProposalChangeRequest++; |
- if (buildCounterNotifyProposalChangeRequest < 3) { |
- unittest.expect(o.action, unittest.equals('foo')); |
- unittest.expect(o.href, unittest.equals('foo')); |
- unittest.expect(o.id, unittest.equals('foo')); |
- checkUnnamed1332(o.notes); |
- unittest.expect(o.token, unittest.equals('foo')); |
- } |
- buildCounterNotifyProposalChangeRequest--; |
-} |
- |
-buildUnnamed1333() { |
+buildUnnamed1355() { |
var o = new core.List<api.FilterPair>(); |
o.add(buildFilterPair()); |
o.add(buildFilterPair()); |
return o; |
} |
-checkUnnamed1333(core.List<api.FilterPair> o) { |
+checkUnnamed1355(core.List<api.FilterPair> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkFilterPair(o[0]); |
checkFilterPair(o[1]); |
} |
-buildUnnamed1334() { |
+buildUnnamed1356() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1334(core.List<core.String> o) { |
+checkUnnamed1356(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')); |
} |
-buildUnnamed1335() { |
+buildUnnamed1357() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1335(core.List<core.String> o) { |
+checkUnnamed1357(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')); |
@@ -308,10 +317,10 @@ buildParameters() { |
var o = new api.Parameters(); |
buildCounterParameters++; |
if (buildCounterParameters < 3) { |
- o.filters = buildUnnamed1333(); |
- o.groupBys = buildUnnamed1334(); |
+ o.filters = buildUnnamed1355(); |
+ o.groupBys = buildUnnamed1356(); |
o.includeInviteData = true; |
- o.metrics = buildUnnamed1335(); |
+ o.metrics = buildUnnamed1357(); |
o.type = "foo"; |
} |
buildCounterParameters--; |
@@ -321,10 +330,10 @@ buildParameters() { |
checkParameters(api.Parameters o) { |
buildCounterParameters++; |
if (buildCounterParameters < 3) { |
- checkUnnamed1333(o.filters); |
- checkUnnamed1334(o.groupBys); |
+ checkUnnamed1355(o.filters); |
+ checkUnnamed1356(o.groupBys); |
unittest.expect(o.includeInviteData, unittest.isTrue); |
- checkUnnamed1335(o.metrics); |
+ checkUnnamed1357(o.metrics); |
unittest.expect(o.type, unittest.equals('foo')); |
} |
buildCounterParameters--; |
@@ -363,14 +372,14 @@ checkQuery(api.Query o) { |
buildCounterQuery--; |
} |
-buildUnnamed1336() { |
+buildUnnamed1358() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1336(core.List<core.String> o) { |
+checkUnnamed1358(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')); |
@@ -390,7 +399,7 @@ buildQueryMetadata() { |
o.reportCount = 42; |
o.running = true; |
o.sendNotification = true; |
- o.shareEmailAddress = buildUnnamed1336(); |
+ o.shareEmailAddress = buildUnnamed1358(); |
o.title = "foo"; |
} |
buildCounterQueryMetadata--; |
@@ -409,7 +418,7 @@ checkQueryMetadata(api.QueryMetadata o) { |
unittest.expect(o.reportCount, unittest.equals(42)); |
unittest.expect(o.running, unittest.isTrue); |
unittest.expect(o.sendNotification, unittest.isTrue); |
- checkUnnamed1336(o.shareEmailAddress); |
+ checkUnnamed1358(o.shareEmailAddress); |
unittest.expect(o.title, unittest.equals('foo')); |
} |
buildCounterQueryMetadata--; |
@@ -553,14 +562,14 @@ checkReportStatus(api.ReportStatus o) { |
buildCounterReportStatus--; |
} |
-buildUnnamed1337() { |
+buildUnnamed1359() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1337(core.List<core.String> o) { |
+checkUnnamed1359(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')); |
@@ -574,7 +583,7 @@ buildRowStatus() { |
o.changed = true; |
o.entityId = "foo"; |
o.entityName = "foo"; |
- o.errors = buildUnnamed1337(); |
+ o.errors = buildUnnamed1359(); |
o.persisted = true; |
o.rowNumber = 42; |
} |
@@ -588,7 +597,7 @@ checkRowStatus(api.RowStatus o) { |
unittest.expect(o.changed, unittest.isTrue); |
unittest.expect(o.entityId, unittest.equals('foo')); |
unittest.expect(o.entityName, unittest.equals('foo')); |
- checkUnnamed1337(o.errors); |
+ checkUnnamed1359(o.errors); |
unittest.expect(o.persisted, unittest.isTrue); |
unittest.expect(o.rowNumber, unittest.equals(42)); |
} |
@@ -662,27 +671,27 @@ checkUploadLineItemsResponse(api.UploadLineItemsResponse o) { |
buildCounterUploadLineItemsResponse--; |
} |
-buildUnnamed1338() { |
+buildUnnamed1360() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1338(core.List<core.String> o) { |
+checkUnnamed1360(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')); |
} |
-buildUnnamed1339() { |
+buildUnnamed1361() { |
var o = new core.List<api.RowStatus>(); |
o.add(buildRowStatus()); |
o.add(buildRowStatus()); |
return o; |
} |
-checkUnnamed1339(core.List<api.RowStatus> o) { |
+checkUnnamed1361(core.List<api.RowStatus> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkRowStatus(o[0]); |
checkRowStatus(o[1]); |
@@ -693,8 +702,8 @@ buildUploadStatus() { |
var o = new api.UploadStatus(); |
buildCounterUploadStatus++; |
if (buildCounterUploadStatus < 3) { |
- o.errors = buildUnnamed1338(); |
- o.rowStatus = buildUnnamed1339(); |
+ o.errors = buildUnnamed1360(); |
+ o.rowStatus = buildUnnamed1361(); |
} |
buildCounterUploadStatus--; |
return o; |
@@ -703,8 +712,8 @@ buildUploadStatus() { |
checkUploadStatus(api.UploadStatus o) { |
buildCounterUploadStatus++; |
if (buildCounterUploadStatus < 3) { |
- checkUnnamed1338(o.errors); |
- checkUnnamed1339(o.rowStatus); |
+ checkUnnamed1360(o.errors); |
+ checkUnnamed1361(o.rowStatus); |
} |
buildCounterUploadStatus--; |
} |
@@ -729,6 +738,24 @@ main() { |
}); |
+ unittest.group("obj-schema-DownloadRequest", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildDownloadRequest(); |
+ var od = new api.DownloadRequest.fromJson(o.toJson()); |
+ checkDownloadRequest(od); |
+ }); |
+ }); |
+ |
+ |
+ unittest.group("obj-schema-DownloadResponse", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildDownloadResponse(); |
+ var od = new api.DownloadResponse.fromJson(o.toJson()); |
+ checkDownloadResponse(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-FilterPair", () { |
unittest.test("to-json--from-json", () { |
var o = buildFilterPair(); |
@@ -756,24 +783,6 @@ main() { |
}); |
- unittest.group("obj-schema-Note", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildNote(); |
- var od = new api.Note.fromJson(o.toJson()); |
- checkNote(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-NotifyProposalChangeRequest", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildNotifyProposalChangeRequest(); |
- var od = new api.NotifyProposalChangeRequest.fromJson(o.toJson()); |
- checkNotifyProposalChangeRequest(od); |
- }); |
- }); |
- |
- |
unittest.group("obj-schema-Parameters", () { |
unittest.test("to-json--from-json", () { |
var o = buildParameters(); |
@@ -1304,15 +1313,15 @@ main() { |
}); |
- unittest.group("resource-RubiconResourceApi", () { |
- unittest.test("method--notifyproposalchange", () { |
+ unittest.group("resource-SdfResourceApi", () { |
+ unittest.test("method--download", () { |
var mock = new HttpServerMock(); |
- api.RubiconResourceApi res = new api.DoubleclickbidmanagerApi(mock).rubicon; |
- var arg_request = buildNotifyProposalChangeRequest(); |
+ api.SdfResourceApi res = new api.DoubleclickbidmanagerApi(mock).sdf; |
+ var arg_request = buildDownloadRequest(); |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
- var obj = new api.NotifyProposalChangeRequest.fromJson(json); |
- checkNotifyProposalChangeRequest(obj); |
+ var obj = new api.DownloadRequest.fromJson(json); |
+ checkDownloadRequest(obj); |
var path = (req.url).path; |
var pathOffset = 0; |
@@ -1322,8 +1331,8 @@ main() { |
pathOffset += 1; |
unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.equals("doubleclickbidmanager/v1/")); |
pathOffset += 25; |
- unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.equals("rubicon/notifyproposalchange")); |
- pathOffset += 28; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("sdf/download")); |
+ pathOffset += 12; |
var query = (req.url).query; |
var queryOffset = 0; |
@@ -1346,10 +1355,12 @@ main() { |
var h = { |
"content-type" : "application/json; charset=utf-8", |
}; |
- var resp = ""; |
+ var resp = convert.JSON.encode(buildDownloadResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.notifyproposalchange(arg_request).then(unittest.expectAsync((_) {})); |
+ res.download(arg_request).then(unittest.expectAsync(((api.DownloadResponse response) { |
+ checkDownloadResponse(response); |
+ }))); |
}); |
}); |