Index: generated/googleapis/test/mirror/v1_test.dart |
diff --git a/generated/googleapis/test/mirror/v1_test.dart b/generated/googleapis/test/mirror/v1_test.dart |
index af551e799baf3a04a3211e297a5e21b5e392fd79..0334cd2a94081d5a2afc796c189d8c3c41f98edf 100644 |
--- a/generated/googleapis/test/mirror/v1_test.dart |
+++ b/generated/googleapis/test/mirror/v1_test.dart |
@@ -8,48 +8,83 @@ import "dart:convert" as convert; |
import 'package:http/http.dart' as http; |
import 'package:http/testing.dart' as http_testing; |
import 'package:unittest/unittest.dart' as unittest; |
-import 'package:googleapis/common/common.dart' as common; |
-import 'package:googleapis/src/common_internal.dart' as common_internal; |
-import '../common/common_internal_test.dart' as common_test; |
import 'package:googleapis/mirror/v1.dart' as api; |
+class HttpServerMock extends http.BaseClient { |
+ core.Function _callback; |
+ core.bool _expectJson; |
+ void register(core.Function callback, core.bool expectJson) { |
+ _callback = callback; |
+ _expectJson = expectJson; |
+ } |
+ |
+ async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
+ if (_expectJson) { |
+ return request.finalize() |
+ .transform(convert.UTF8.decoder) |
+ .join('') |
+ .then((core.String jsonString) { |
+ if (jsonString.isEmpty) { |
+ return _callback(request, null); |
+ } else { |
+ return _callback(request, convert.JSON.decode(jsonString)); |
+ } |
+ }); |
+ } else { |
+ var stream = request.finalize(); |
+ if (stream == null) { |
+ return _callback(request, []); |
+ } else { |
+ return stream.toBytes().then((data) { |
+ return _callback(request, data); |
+ }); |
+ } |
+ } |
+ } |
+} |
+ |
+http.StreamedResponse stringResponse( |
+ core.int status, core.Map headers, core.String body) { |
+ var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
+ return new http.StreamedResponse(stream, status, headers: headers); |
+} |
-buildUnnamed1069() { |
+buildUnnamed1215() { |
var o = new core.List<api.AuthToken>(); |
o.add(buildAuthToken()); |
o.add(buildAuthToken()); |
return o; |
} |
-checkUnnamed1069(core.List<api.AuthToken> o) { |
+checkUnnamed1215(core.List<api.AuthToken> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAuthToken(o[0]); |
checkAuthToken(o[1]); |
} |
-buildUnnamed1070() { |
+buildUnnamed1216() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1070(core.List<core.String> o) { |
+checkUnnamed1216(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')); |
} |
-buildUnnamed1071() { |
+buildUnnamed1217() { |
var o = new core.List<api.UserData>(); |
o.add(buildUserData()); |
o.add(buildUserData()); |
return o; |
} |
-checkUnnamed1071(core.List<api.UserData> o) { |
+checkUnnamed1217(core.List<api.UserData> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkUserData(o[0]); |
checkUserData(o[1]); |
@@ -60,10 +95,10 @@ buildAccount() { |
var o = new api.Account(); |
buildCounterAccount++; |
if (buildCounterAccount < 3) { |
- o.authTokens = buildUnnamed1069(); |
- o.features = buildUnnamed1070(); |
+ o.authTokens = buildUnnamed1215(); |
+ o.features = buildUnnamed1216(); |
o.password = "foo"; |
- o.userData = buildUnnamed1071(); |
+ o.userData = buildUnnamed1217(); |
} |
buildCounterAccount--; |
return o; |
@@ -72,10 +107,10 @@ buildAccount() { |
checkAccount(api.Account o) { |
buildCounterAccount++; |
if (buildCounterAccount < 3) { |
- checkUnnamed1069(o.authTokens); |
- checkUnnamed1070(o.features); |
+ checkUnnamed1215(o.authTokens); |
+ checkUnnamed1216(o.features); |
unittest.expect(o.password, unittest.equals('foo')); |
- checkUnnamed1071(o.userData); |
+ checkUnnamed1217(o.userData); |
} |
buildCounterAccount--; |
} |
@@ -105,14 +140,14 @@ checkAttachment(api.Attachment o) { |
buildCounterAttachment--; |
} |
-buildUnnamed1072() { |
+buildUnnamed1218() { |
var o = new core.List<api.Attachment>(); |
o.add(buildAttachment()); |
o.add(buildAttachment()); |
return o; |
} |
-checkUnnamed1072(core.List<api.Attachment> o) { |
+checkUnnamed1218(core.List<api.Attachment> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAttachment(o[0]); |
checkAttachment(o[1]); |
@@ -123,7 +158,7 @@ buildAttachmentsListResponse() { |
var o = new api.AttachmentsListResponse(); |
buildCounterAttachmentsListResponse++; |
if (buildCounterAttachmentsListResponse < 3) { |
- o.items = buildUnnamed1072(); |
+ o.items = buildUnnamed1218(); |
o.kind = "foo"; |
} |
buildCounterAttachmentsListResponse--; |
@@ -133,7 +168,7 @@ buildAttachmentsListResponse() { |
checkAttachmentsListResponse(api.AttachmentsListResponse o) { |
buildCounterAttachmentsListResponse++; |
if (buildCounterAttachmentsListResponse < 3) { |
- checkUnnamed1072(o.items); |
+ checkUnnamed1218(o.items); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterAttachmentsListResponse--; |
@@ -179,53 +214,53 @@ checkCommand(api.Command o) { |
buildCounterCommand--; |
} |
-buildUnnamed1073() { |
+buildUnnamed1219() { |
var o = new core.List<api.Command>(); |
o.add(buildCommand()); |
o.add(buildCommand()); |
return o; |
} |
-checkUnnamed1073(core.List<api.Command> o) { |
+checkUnnamed1219(core.List<api.Command> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkCommand(o[0]); |
checkCommand(o[1]); |
} |
-buildUnnamed1074() { |
+buildUnnamed1220() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1074(core.List<core.String> o) { |
+checkUnnamed1220(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')); |
} |
-buildUnnamed1075() { |
+buildUnnamed1221() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1075(core.List<core.String> o) { |
+checkUnnamed1221(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')); |
} |
-buildUnnamed1076() { |
+buildUnnamed1222() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1076(core.List<core.String> o) { |
+checkUnnamed1222(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')); |
@@ -236,15 +271,15 @@ buildContact() { |
var o = new api.Contact(); |
buildCounterContact++; |
if (buildCounterContact < 3) { |
- o.acceptCommands = buildUnnamed1073(); |
- o.acceptTypes = buildUnnamed1074(); |
+ o.acceptCommands = buildUnnamed1219(); |
+ o.acceptTypes = buildUnnamed1220(); |
o.displayName = "foo"; |
o.id = "foo"; |
- o.imageUrls = buildUnnamed1075(); |
+ o.imageUrls = buildUnnamed1221(); |
o.kind = "foo"; |
o.phoneNumber = "foo"; |
o.priority = 42; |
- o.sharingFeatures = buildUnnamed1076(); |
+ o.sharingFeatures = buildUnnamed1222(); |
o.source = "foo"; |
o.speakableName = "foo"; |
o.type = "foo"; |
@@ -256,15 +291,15 @@ buildContact() { |
checkContact(api.Contact o) { |
buildCounterContact++; |
if (buildCounterContact < 3) { |
- checkUnnamed1073(o.acceptCommands); |
- checkUnnamed1074(o.acceptTypes); |
+ checkUnnamed1219(o.acceptCommands); |
+ checkUnnamed1220(o.acceptTypes); |
unittest.expect(o.displayName, unittest.equals('foo')); |
unittest.expect(o.id, unittest.equals('foo')); |
- checkUnnamed1075(o.imageUrls); |
+ checkUnnamed1221(o.imageUrls); |
unittest.expect(o.kind, unittest.equals('foo')); |
unittest.expect(o.phoneNumber, unittest.equals('foo')); |
unittest.expect(o.priority, unittest.equals(42)); |
- checkUnnamed1076(o.sharingFeatures); |
+ checkUnnamed1222(o.sharingFeatures); |
unittest.expect(o.source, unittest.equals('foo')); |
unittest.expect(o.speakableName, unittest.equals('foo')); |
unittest.expect(o.type, unittest.equals('foo')); |
@@ -272,14 +307,14 @@ checkContact(api.Contact o) { |
buildCounterContact--; |
} |
-buildUnnamed1077() { |
+buildUnnamed1223() { |
var o = new core.List<api.Contact>(); |
o.add(buildContact()); |
o.add(buildContact()); |
return o; |
} |
-checkUnnamed1077(core.List<api.Contact> o) { |
+checkUnnamed1223(core.List<api.Contact> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkContact(o[0]); |
checkContact(o[1]); |
@@ -290,7 +325,7 @@ buildContactsListResponse() { |
var o = new api.ContactsListResponse(); |
buildCounterContactsListResponse++; |
if (buildCounterContactsListResponse < 3) { |
- o.items = buildUnnamed1077(); |
+ o.items = buildUnnamed1223(); |
o.kind = "foo"; |
} |
buildCounterContactsListResponse--; |
@@ -300,7 +335,7 @@ buildContactsListResponse() { |
checkContactsListResponse(api.ContactsListResponse o) { |
buildCounterContactsListResponse++; |
if (buildCounterContactsListResponse < 3) { |
- checkUnnamed1077(o.items); |
+ checkUnnamed1223(o.items); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterContactsListResponse--; |
@@ -339,14 +374,14 @@ checkLocation(api.Location o) { |
buildCounterLocation--; |
} |
-buildUnnamed1078() { |
+buildUnnamed1224() { |
var o = new core.List<api.Location>(); |
o.add(buildLocation()); |
o.add(buildLocation()); |
return o; |
} |
-checkUnnamed1078(core.List<api.Location> o) { |
+checkUnnamed1224(core.List<api.Location> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkLocation(o[0]); |
checkLocation(o[1]); |
@@ -357,7 +392,7 @@ buildLocationsListResponse() { |
var o = new api.LocationsListResponse(); |
buildCounterLocationsListResponse++; |
if (buildCounterLocationsListResponse < 3) { |
- o.items = buildUnnamed1078(); |
+ o.items = buildUnnamed1224(); |
o.kind = "foo"; |
} |
buildCounterLocationsListResponse--; |
@@ -367,20 +402,20 @@ buildLocationsListResponse() { |
checkLocationsListResponse(api.LocationsListResponse o) { |
buildCounterLocationsListResponse++; |
if (buildCounterLocationsListResponse < 3) { |
- checkUnnamed1078(o.items); |
+ checkUnnamed1224(o.items); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterLocationsListResponse--; |
} |
-buildUnnamed1079() { |
+buildUnnamed1225() { |
var o = new core.List<api.MenuValue>(); |
o.add(buildMenuValue()); |
o.add(buildMenuValue()); |
return o; |
} |
-checkUnnamed1079(core.List<api.MenuValue> o) { |
+checkUnnamed1225(core.List<api.MenuValue> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkMenuValue(o[0]); |
checkMenuValue(o[1]); |
@@ -396,7 +431,7 @@ buildMenuItem() { |
o.id = "foo"; |
o.payload = "foo"; |
o.removeWhenSelected = true; |
- o.values = buildUnnamed1079(); |
+ o.values = buildUnnamed1225(); |
} |
buildCounterMenuItem--; |
return o; |
@@ -410,7 +445,7 @@ checkMenuItem(api.MenuItem o) { |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.payload, unittest.equals('foo')); |
unittest.expect(o.removeWhenSelected, unittest.isTrue); |
- checkUnnamed1079(o.values); |
+ checkUnnamed1225(o.values); |
} |
buildCounterMenuItem--; |
} |
@@ -438,14 +473,14 @@ checkMenuValue(api.MenuValue o) { |
buildCounterMenuValue--; |
} |
-buildUnnamed1080() { |
+buildUnnamed1226() { |
var o = new core.List<api.UserAction>(); |
o.add(buildUserAction()); |
o.add(buildUserAction()); |
return o; |
} |
-checkUnnamed1080(core.List<api.UserAction> o) { |
+checkUnnamed1226(core.List<api.UserAction> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkUserAction(o[0]); |
checkUserAction(o[1]); |
@@ -459,7 +494,7 @@ buildNotification() { |
o.collection = "foo"; |
o.itemId = "foo"; |
o.operation = "foo"; |
- o.userActions = buildUnnamed1080(); |
+ o.userActions = buildUnnamed1226(); |
o.userToken = "foo"; |
o.verifyToken = "foo"; |
} |
@@ -473,7 +508,7 @@ checkNotification(api.Notification o) { |
unittest.expect(o.collection, unittest.equals('foo')); |
unittest.expect(o.itemId, unittest.equals('foo')); |
unittest.expect(o.operation, unittest.equals('foo')); |
- checkUnnamed1080(o.userActions); |
+ checkUnnamed1226(o.userActions); |
unittest.expect(o.userToken, unittest.equals('foo')); |
unittest.expect(o.verifyToken, unittest.equals('foo')); |
} |
@@ -524,14 +559,14 @@ checkSetting(api.Setting o) { |
buildCounterSetting--; |
} |
-buildUnnamed1081() { |
+buildUnnamed1227() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1081(core.List<core.String> o) { |
+checkUnnamed1227(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')); |
@@ -547,7 +582,7 @@ buildSubscription() { |
o.id = "foo"; |
o.kind = "foo"; |
o.notification = buildNotification(); |
- o.operation = buildUnnamed1081(); |
+ o.operation = buildUnnamed1227(); |
o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
o.userToken = "foo"; |
o.verifyToken = "foo"; |
@@ -564,7 +599,7 @@ checkSubscription(api.Subscription o) { |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.kind, unittest.equals('foo')); |
checkNotification(o.notification); |
- checkUnnamed1081(o.operation); |
+ checkUnnamed1227(o.operation); |
unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
unittest.expect(o.userToken, unittest.equals('foo')); |
unittest.expect(o.verifyToken, unittest.equals('foo')); |
@@ -572,14 +607,14 @@ checkSubscription(api.Subscription o) { |
buildCounterSubscription--; |
} |
-buildUnnamed1082() { |
+buildUnnamed1228() { |
var o = new core.List<api.Subscription>(); |
o.add(buildSubscription()); |
o.add(buildSubscription()); |
return o; |
} |
-checkUnnamed1082(core.List<api.Subscription> o) { |
+checkUnnamed1228(core.List<api.Subscription> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkSubscription(o[0]); |
checkSubscription(o[1]); |
@@ -590,7 +625,7 @@ buildSubscriptionsListResponse() { |
var o = new api.SubscriptionsListResponse(); |
buildCounterSubscriptionsListResponse++; |
if (buildCounterSubscriptionsListResponse < 3) { |
- o.items = buildUnnamed1082(); |
+ o.items = buildUnnamed1228(); |
o.kind = "foo"; |
} |
buildCounterSubscriptionsListResponse--; |
@@ -600,46 +635,46 @@ buildSubscriptionsListResponse() { |
checkSubscriptionsListResponse(api.SubscriptionsListResponse o) { |
buildCounterSubscriptionsListResponse++; |
if (buildCounterSubscriptionsListResponse < 3) { |
- checkUnnamed1082(o.items); |
+ checkUnnamed1228(o.items); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterSubscriptionsListResponse--; |
} |
-buildUnnamed1083() { |
+buildUnnamed1229() { |
var o = new core.List<api.Attachment>(); |
o.add(buildAttachment()); |
o.add(buildAttachment()); |
return o; |
} |
-checkUnnamed1083(core.List<api.Attachment> o) { |
+checkUnnamed1229(core.List<api.Attachment> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAttachment(o[0]); |
checkAttachment(o[1]); |
} |
-buildUnnamed1084() { |
+buildUnnamed1230() { |
var o = new core.List<api.MenuItem>(); |
o.add(buildMenuItem()); |
o.add(buildMenuItem()); |
return o; |
} |
-checkUnnamed1084(core.List<api.MenuItem> o) { |
+checkUnnamed1230(core.List<api.MenuItem> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkMenuItem(o[0]); |
checkMenuItem(o[1]); |
} |
-buildUnnamed1085() { |
+buildUnnamed1231() { |
var o = new core.List<api.Contact>(); |
o.add(buildContact()); |
o.add(buildContact()); |
return o; |
} |
-checkUnnamed1085(core.List<api.Contact> o) { |
+checkUnnamed1231(core.List<api.Contact> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkContact(o[0]); |
checkContact(o[1]); |
@@ -650,7 +685,7 @@ buildTimelineItem() { |
var o = new api.TimelineItem(); |
buildCounterTimelineItem++; |
if (buildCounterTimelineItem < 3) { |
- o.attachments = buildUnnamed1083(); |
+ o.attachments = buildUnnamed1229(); |
o.bundleId = "foo"; |
o.canonicalUrl = "foo"; |
o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
@@ -665,10 +700,10 @@ buildTimelineItem() { |
o.isPinned = true; |
o.kind = "foo"; |
o.location = buildLocation(); |
- o.menuItems = buildUnnamed1084(); |
+ o.menuItems = buildUnnamed1230(); |
o.notification = buildNotificationConfig(); |
o.pinScore = 42; |
- o.recipients = buildUnnamed1085(); |
+ o.recipients = buildUnnamed1231(); |
o.selfLink = "foo"; |
o.sourceItemId = "foo"; |
o.speakableText = "foo"; |
@@ -684,7 +719,7 @@ buildTimelineItem() { |
checkTimelineItem(api.TimelineItem o) { |
buildCounterTimelineItem++; |
if (buildCounterTimelineItem < 3) { |
- checkUnnamed1083(o.attachments); |
+ checkUnnamed1229(o.attachments); |
unittest.expect(o.bundleId, unittest.equals('foo')); |
unittest.expect(o.canonicalUrl, unittest.equals('foo')); |
unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
@@ -699,10 +734,10 @@ checkTimelineItem(api.TimelineItem o) { |
unittest.expect(o.isPinned, unittest.isTrue); |
unittest.expect(o.kind, unittest.equals('foo')); |
checkLocation(o.location); |
- checkUnnamed1084(o.menuItems); |
+ checkUnnamed1230(o.menuItems); |
checkNotificationConfig(o.notification); |
unittest.expect(o.pinScore, unittest.equals(42)); |
- checkUnnamed1085(o.recipients); |
+ checkUnnamed1231(o.recipients); |
unittest.expect(o.selfLink, unittest.equals('foo')); |
unittest.expect(o.sourceItemId, unittest.equals('foo')); |
unittest.expect(o.speakableText, unittest.equals('foo')); |
@@ -714,14 +749,14 @@ checkTimelineItem(api.TimelineItem o) { |
buildCounterTimelineItem--; |
} |
-buildUnnamed1086() { |
+buildUnnamed1232() { |
var o = new core.List<api.TimelineItem>(); |
o.add(buildTimelineItem()); |
o.add(buildTimelineItem()); |
return o; |
} |
-checkUnnamed1086(core.List<api.TimelineItem> o) { |
+checkUnnamed1232(core.List<api.TimelineItem> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkTimelineItem(o[0]); |
checkTimelineItem(o[1]); |
@@ -732,7 +767,7 @@ buildTimelineListResponse() { |
var o = new api.TimelineListResponse(); |
buildCounterTimelineListResponse++; |
if (buildCounterTimelineListResponse < 3) { |
- o.items = buildUnnamed1086(); |
+ o.items = buildUnnamed1232(); |
o.kind = "foo"; |
o.nextPageToken = "foo"; |
} |
@@ -743,7 +778,7 @@ buildTimelineListResponse() { |
checkTimelineListResponse(api.TimelineListResponse o) { |
buildCounterTimelineListResponse++; |
if (buildCounterTimelineListResponse < 3) { |
- checkUnnamed1086(o.items); |
+ checkUnnamed1232(o.items); |
unittest.expect(o.kind, unittest.equals('foo')); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
} |
@@ -977,7 +1012,7 @@ main() { |
unittest.group("resource-AccountsResourceApi", () { |
unittest.test("method--insert", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.AccountsResourceApi res = new api.MirrorApi(mock).accounts; |
var arg_request = buildAccount(); |
var arg_userToken = "foo"; |
@@ -1037,7 +1072,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildAccount()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.insert(arg_request, arg_userToken, arg_accountType, arg_accountName).then(unittest.expectAsync(((api.Account response) { |
checkAccount(response); |
@@ -1050,7 +1085,7 @@ main() { |
unittest.group("resource-ContactsResourceApi", () { |
unittest.test("method--delete", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1090,14 +1125,14 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.delete(arg_id).then(unittest.expectAsync((_) {})); |
}); |
unittest.test("method--get", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1137,7 +1172,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildContact()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.get(arg_id).then(unittest.expectAsync(((api.Contact response) { |
checkContact(response); |
@@ -1146,7 +1181,7 @@ main() { |
unittest.test("method--insert", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
var arg_request = buildContact(); |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1186,7 +1221,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildContact()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.insert(arg_request).then(unittest.expectAsync(((api.Contact response) { |
checkContact(response); |
@@ -1195,7 +1230,7 @@ main() { |
unittest.test("method--list", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
var path = (req.url).path; |
@@ -1231,7 +1266,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildContactsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.list().then(unittest.expectAsync(((api.ContactsListResponse response) { |
checkContactsListResponse(response); |
@@ -1240,7 +1275,7 @@ main() { |
unittest.test("method--patch", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
var arg_request = buildContact(); |
var arg_id = "foo"; |
@@ -1284,7 +1319,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildContact()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.patch(arg_request, arg_id).then(unittest.expectAsync(((api.Contact response) { |
checkContact(response); |
@@ -1293,7 +1328,7 @@ main() { |
unittest.test("method--update", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.ContactsResourceApi res = new api.MirrorApi(mock).contacts; |
var arg_request = buildContact(); |
var arg_id = "foo"; |
@@ -1337,7 +1372,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildContact()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.update(arg_request, arg_id).then(unittest.expectAsync(((api.Contact response) { |
checkContact(response); |
@@ -1350,7 +1385,7 @@ main() { |
unittest.group("resource-LocationsResourceApi", () { |
unittest.test("method--get", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.LocationsResourceApi res = new api.MirrorApi(mock).locations; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1390,7 +1425,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildLocation()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.get(arg_id).then(unittest.expectAsync(((api.Location response) { |
checkLocation(response); |
@@ -1399,7 +1434,7 @@ main() { |
unittest.test("method--list", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.LocationsResourceApi res = new api.MirrorApi(mock).locations; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
var path = (req.url).path; |
@@ -1435,7 +1470,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildLocationsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.list().then(unittest.expectAsync(((api.LocationsListResponse response) { |
checkLocationsListResponse(response); |
@@ -1448,7 +1483,7 @@ main() { |
unittest.group("resource-SettingsResourceApi", () { |
unittest.test("method--get", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.SettingsResourceApi res = new api.MirrorApi(mock).settings; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1488,7 +1523,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildSetting()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.get(arg_id).then(unittest.expectAsync(((api.Setting response) { |
checkSetting(response); |
@@ -1501,7 +1536,7 @@ main() { |
unittest.group("resource-SubscriptionsResourceApi", () { |
unittest.test("method--delete", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.SubscriptionsResourceApi res = new api.MirrorApi(mock).subscriptions; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1541,14 +1576,14 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.delete(arg_id).then(unittest.expectAsync((_) {})); |
}); |
unittest.test("method--insert", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.SubscriptionsResourceApi res = new api.MirrorApi(mock).subscriptions; |
var arg_request = buildSubscription(); |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1588,7 +1623,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildSubscription()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.insert(arg_request).then(unittest.expectAsync(((api.Subscription response) { |
checkSubscription(response); |
@@ -1597,7 +1632,7 @@ main() { |
unittest.test("method--list", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.SubscriptionsResourceApi res = new api.MirrorApi(mock).subscriptions; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
var path = (req.url).path; |
@@ -1633,7 +1668,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildSubscriptionsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.list().then(unittest.expectAsync(((api.SubscriptionsListResponse response) { |
checkSubscriptionsListResponse(response); |
@@ -1642,7 +1677,7 @@ main() { |
unittest.test("method--update", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.SubscriptionsResourceApi res = new api.MirrorApi(mock).subscriptions; |
var arg_request = buildSubscription(); |
var arg_id = "foo"; |
@@ -1686,7 +1721,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildSubscription()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.update(arg_request, arg_id).then(unittest.expectAsync(((api.Subscription response) { |
checkSubscription(response); |
@@ -1699,7 +1734,7 @@ main() { |
unittest.group("resource-TimelineResourceApi", () { |
unittest.test("method--delete", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1739,14 +1774,14 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.delete(arg_id).then(unittest.expectAsync((_) {})); |
}); |
unittest.test("method--get", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_id = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1786,7 +1821,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTimelineItem()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.get(arg_id).then(unittest.expectAsync(((api.TimelineItem response) { |
checkTimelineItem(response); |
@@ -1797,7 +1832,7 @@ main() { |
// TODO: Implement tests for media upload; |
// TODO: Implement tests for media download; |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_request = buildTimelineItem(); |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1837,7 +1872,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTimelineItem()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.insert(arg_request).then(unittest.expectAsync(((api.TimelineItem response) { |
checkTimelineItem(response); |
@@ -1846,7 +1881,7 @@ main() { |
unittest.test("method--list", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_bundleId = "foo"; |
var arg_includeDeleted = true; |
@@ -1896,7 +1931,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTimelineListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.list(bundleId: arg_bundleId, includeDeleted: arg_includeDeleted, maxResults: arg_maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken, pinnedOnly: arg_pinnedOnly, sourceItemId: arg_sourceItemId).then(unittest.expectAsync(((api.TimelineListResponse response) { |
checkTimelineListResponse(response); |
@@ -1905,7 +1940,7 @@ main() { |
unittest.test("method--patch", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_request = buildTimelineItem(); |
var arg_id = "foo"; |
@@ -1949,7 +1984,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTimelineItem()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.patch(arg_request, arg_id).then(unittest.expectAsync(((api.TimelineItem response) { |
checkTimelineItem(response); |
@@ -1960,7 +1995,7 @@ main() { |
// TODO: Implement tests for media upload; |
// TODO: Implement tests for media download; |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineResourceApi res = new api.MirrorApi(mock).timeline; |
var arg_request = buildTimelineItem(); |
var arg_id = "foo"; |
@@ -2004,7 +2039,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTimelineItem()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.update(arg_request, arg_id).then(unittest.expectAsync(((api.TimelineItem response) { |
checkTimelineItem(response); |
@@ -2017,7 +2052,7 @@ main() { |
unittest.group("resource-TimelineAttachmentsResourceApi", () { |
unittest.test("method--delete", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineAttachmentsResourceApi res = new api.MirrorApi(mock).timeline.attachments; |
var arg_itemId = "foo"; |
var arg_attachmentId = "foo"; |
@@ -2065,7 +2100,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = ""; |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.delete(arg_itemId, arg_attachmentId).then(unittest.expectAsync((_) {})); |
}); |
@@ -2074,7 +2109,7 @@ main() { |
// TODO: Implement tests for media upload; |
// TODO: Implement tests for media download; |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineAttachmentsResourceApi res = new api.MirrorApi(mock).timeline.attachments; |
var arg_itemId = "foo"; |
var arg_attachmentId = "foo"; |
@@ -2122,7 +2157,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildAttachment()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.get(arg_itemId, arg_attachmentId).then(unittest.expectAsync(((api.Attachment response) { |
checkAttachment(response); |
@@ -2133,7 +2168,7 @@ main() { |
// TODO: Implement tests for media upload; |
// TODO: Implement tests for media download; |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineAttachmentsResourceApi res = new api.MirrorApi(mock).timeline.attachments; |
var arg_itemId = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -2177,7 +2212,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildAttachment()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.insert(arg_itemId).then(unittest.expectAsync(((api.Attachment response) { |
checkAttachment(response); |
@@ -2186,7 +2221,7 @@ main() { |
unittest.test("method--list", () { |
- var mock = new common_test.HttpServerMock(); |
+ var mock = new HttpServerMock(); |
api.TimelineAttachmentsResourceApi res = new api.MirrorApi(mock).timeline.attachments; |
var arg_itemId = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -2230,7 +2265,7 @@ main() { |
"content-type" : "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildAttachmentsListResponse()); |
- return new async.Future.value(common_test.stringResponse(200, h, resp)); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
res.list(arg_itemId).then(unittest.expectAsync(((api.AttachmentsListResponse response) { |
checkAttachmentsListResponse(response); |