Index: generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart |
diff --git a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart |
index c4d708796cd734825ef62b5e6d1ad20847b6a5a7..fbf006a4ba45615347e0cb53467ab38346eff6f3 100644 |
--- a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart |
+++ b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart |
@@ -1,12 +1,10 @@ |
library googleapis_beta.proximitybeacon.v1beta1.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/proximitybeacon/v1beta1.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,8 +44,8 @@ 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); |
} |
@@ -93,14 +92,14 @@ checkAttachmentInfo(api.AttachmentInfo o) { |
buildCounterAttachmentInfo--; |
} |
-buildUnnamed3459() { |
+buildUnnamed3464() { |
var o = new core.Map<core.String, core.String>(); |
o["x"] = "foo"; |
o["y"] = "foo"; |
return o; |
} |
-checkUnnamed3459(core.Map<core.String, core.String> o) { |
+checkUnnamed3464(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')); |
@@ -119,7 +118,7 @@ buildBeacon() { |
o.indoorLevel = buildIndoorLevel(); |
o.latLng = buildLatLng(); |
o.placeId = "foo"; |
- o.properties = buildUnnamed3459(); |
+ o.properties = buildUnnamed3464(); |
o.provisioningKey = "foo"; |
o.status = "foo"; |
} |
@@ -138,7 +137,7 @@ checkBeacon(api.Beacon o) { |
checkIndoorLevel(o.indoorLevel); |
checkLatLng(o.latLng); |
unittest.expect(o.placeId, unittest.equals('foo')); |
- checkUnnamed3459(o.properties); |
+ checkUnnamed3464(o.properties); |
unittest.expect(o.provisioningKey, unittest.equals('foo')); |
unittest.expect(o.status, unittest.equals('foo')); |
} |
@@ -170,14 +169,14 @@ checkBeaconAttachment(api.BeaconAttachment o) { |
buildCounterBeaconAttachment--; |
} |
-buildUnnamed3460() { |
+buildUnnamed3465() { |
var o = new core.List<api.AttachmentInfo>(); |
o.add(buildAttachmentInfo()); |
o.add(buildAttachmentInfo()); |
return o; |
} |
-checkUnnamed3460(core.List<api.AttachmentInfo> o) { |
+checkUnnamed3465(core.List<api.AttachmentInfo> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAttachmentInfo(o[0]); |
checkAttachmentInfo(o[1]); |
@@ -189,7 +188,7 @@ buildBeaconInfo() { |
buildCounterBeaconInfo++; |
if (buildCounterBeaconInfo < 3) { |
o.advertisedId = buildAdvertisedId(); |
- o.attachments = buildUnnamed3460(); |
+ o.attachments = buildUnnamed3465(); |
o.beaconName = "foo"; |
} |
buildCounterBeaconInfo--; |
@@ -200,7 +199,7 @@ checkBeaconInfo(api.BeaconInfo o) { |
buildCounterBeaconInfo++; |
if (buildCounterBeaconInfo < 3) { |
checkAdvertisedId(o.advertisedId); |
- checkUnnamed3460(o.attachments); |
+ checkUnnamed3465(o.attachments); |
unittest.expect(o.beaconName, unittest.equals('foo')); |
} |
buildCounterBeaconInfo--; |
@@ -248,14 +247,14 @@ checkDeleteAttachmentsResponse(api.DeleteAttachmentsResponse o) { |
buildCounterDeleteAttachmentsResponse--; |
} |
-buildUnnamed3461() { |
+buildUnnamed3466() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed3461(core.List<core.String> o) { |
+checkUnnamed3466(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')); |
@@ -266,7 +265,7 @@ buildDiagnostics() { |
var o = new api.Diagnostics(); |
buildCounterDiagnostics++; |
if (buildCounterDiagnostics < 3) { |
- o.alerts = buildUnnamed3461(); |
+ o.alerts = buildUnnamed3466(); |
o.beaconName = "foo"; |
o.estimatedLowBatteryDate = buildDate(); |
} |
@@ -277,7 +276,7 @@ buildDiagnostics() { |
checkDiagnostics(api.Diagnostics o) { |
buildCounterDiagnostics++; |
if (buildCounterDiagnostics < 3) { |
- checkUnnamed3461(o.alerts); |
+ checkUnnamed3466(o.alerts); |
unittest.expect(o.beaconName, unittest.equals('foo')); |
checkDate(o.estimatedLowBatteryDate); |
} |
@@ -288,16 +287,14 @@ 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--; |
} |
@@ -353,27 +350,27 @@ checkEphemeralIdRegistrationParams(api.EphemeralIdRegistrationParams o) { |
buildCounterEphemeralIdRegistrationParams--; |
} |
-buildUnnamed3462() { |
+buildUnnamed3467() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed3462(core.List<core.String> o) { |
+checkUnnamed3467(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')); |
} |
-buildUnnamed3463() { |
+buildUnnamed3468() { |
var o = new core.List<api.Observation>(); |
o.add(buildObservation()); |
o.add(buildObservation()); |
return o; |
} |
-checkUnnamed3463(core.List<api.Observation> o) { |
+checkUnnamed3468(core.List<api.Observation> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkObservation(o[0]); |
checkObservation(o[1]); |
@@ -384,8 +381,8 @@ buildGetInfoForObservedBeaconsRequest() { |
var o = new api.GetInfoForObservedBeaconsRequest(); |
buildCounterGetInfoForObservedBeaconsRequest++; |
if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
- o.namespacedTypes = buildUnnamed3462(); |
- o.observations = buildUnnamed3463(); |
+ o.namespacedTypes = buildUnnamed3467(); |
+ o.observations = buildUnnamed3468(); |
} |
buildCounterGetInfoForObservedBeaconsRequest--; |
return o; |
@@ -394,20 +391,20 @@ buildGetInfoForObservedBeaconsRequest() { |
checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { |
buildCounterGetInfoForObservedBeaconsRequest++; |
if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
- checkUnnamed3462(o.namespacedTypes); |
- checkUnnamed3463(o.observations); |
+ checkUnnamed3467(o.namespacedTypes); |
+ checkUnnamed3468(o.observations); |
} |
buildCounterGetInfoForObservedBeaconsRequest--; |
} |
-buildUnnamed3464() { |
+buildUnnamed3469() { |
var o = new core.List<api.BeaconInfo>(); |
o.add(buildBeaconInfo()); |
o.add(buildBeaconInfo()); |
return o; |
} |
-checkUnnamed3464(core.List<api.BeaconInfo> o) { |
+checkUnnamed3469(core.List<api.BeaconInfo> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkBeaconInfo(o[0]); |
checkBeaconInfo(o[1]); |
@@ -418,16 +415,17 @@ buildGetInfoForObservedBeaconsResponse() { |
var o = new api.GetInfoForObservedBeaconsResponse(); |
buildCounterGetInfoForObservedBeaconsResponse++; |
if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
- o.beacons = buildUnnamed3464(); |
+ o.beacons = buildUnnamed3469(); |
} |
buildCounterGetInfoForObservedBeaconsResponse--; |
return o; |
} |
-checkGetInfoForObservedBeaconsResponse(api.GetInfoForObservedBeaconsResponse o) { |
+checkGetInfoForObservedBeaconsResponse( |
+ api.GetInfoForObservedBeaconsResponse o) { |
buildCounterGetInfoForObservedBeaconsResponse++; |
if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
- checkUnnamed3464(o.beacons); |
+ checkUnnamed3469(o.beacons); |
} |
buildCounterGetInfoForObservedBeaconsResponse--; |
} |
@@ -472,14 +470,14 @@ checkLatLng(api.LatLng o) { |
buildCounterLatLng--; |
} |
-buildUnnamed3465() { |
+buildUnnamed3470() { |
var o = new core.List<api.BeaconAttachment>(); |
o.add(buildBeaconAttachment()); |
o.add(buildBeaconAttachment()); |
return o; |
} |
-checkUnnamed3465(core.List<api.BeaconAttachment> o) { |
+checkUnnamed3470(core.List<api.BeaconAttachment> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkBeaconAttachment(o[0]); |
checkBeaconAttachment(o[1]); |
@@ -490,7 +488,7 @@ buildListBeaconAttachmentsResponse() { |
var o = new api.ListBeaconAttachmentsResponse(); |
buildCounterListBeaconAttachmentsResponse++; |
if (buildCounterListBeaconAttachmentsResponse < 3) { |
- o.attachments = buildUnnamed3465(); |
+ o.attachments = buildUnnamed3470(); |
} |
buildCounterListBeaconAttachmentsResponse--; |
return o; |
@@ -499,19 +497,19 @@ buildListBeaconAttachmentsResponse() { |
checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { |
buildCounterListBeaconAttachmentsResponse++; |
if (buildCounterListBeaconAttachmentsResponse < 3) { |
- checkUnnamed3465(o.attachments); |
+ checkUnnamed3470(o.attachments); |
} |
buildCounterListBeaconAttachmentsResponse--; |
} |
-buildUnnamed3466() { |
+buildUnnamed3471() { |
var o = new core.List<api.Beacon>(); |
o.add(buildBeacon()); |
o.add(buildBeacon()); |
return o; |
} |
-checkUnnamed3466(core.List<api.Beacon> o) { |
+checkUnnamed3471(core.List<api.Beacon> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkBeacon(o[0]); |
checkBeacon(o[1]); |
@@ -522,7 +520,7 @@ buildListBeaconsResponse() { |
var o = new api.ListBeaconsResponse(); |
buildCounterListBeaconsResponse++; |
if (buildCounterListBeaconsResponse < 3) { |
- o.beacons = buildUnnamed3466(); |
+ o.beacons = buildUnnamed3471(); |
o.nextPageToken = "foo"; |
o.totalCount = "foo"; |
} |
@@ -533,21 +531,21 @@ buildListBeaconsResponse() { |
checkListBeaconsResponse(api.ListBeaconsResponse o) { |
buildCounterListBeaconsResponse++; |
if (buildCounterListBeaconsResponse < 3) { |
- checkUnnamed3466(o.beacons); |
+ checkUnnamed3471(o.beacons); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
unittest.expect(o.totalCount, unittest.equals('foo')); |
} |
buildCounterListBeaconsResponse--; |
} |
-buildUnnamed3467() { |
+buildUnnamed3472() { |
var o = new core.List<api.Diagnostics>(); |
o.add(buildDiagnostics()); |
o.add(buildDiagnostics()); |
return o; |
} |
-checkUnnamed3467(core.List<api.Diagnostics> o) { |
+checkUnnamed3472(core.List<api.Diagnostics> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkDiagnostics(o[0]); |
checkDiagnostics(o[1]); |
@@ -558,7 +556,7 @@ buildListDiagnosticsResponse() { |
var o = new api.ListDiagnosticsResponse(); |
buildCounterListDiagnosticsResponse++; |
if (buildCounterListDiagnosticsResponse < 3) { |
- o.diagnostics = buildUnnamed3467(); |
+ o.diagnostics = buildUnnamed3472(); |
o.nextPageToken = "foo"; |
} |
buildCounterListDiagnosticsResponse--; |
@@ -568,20 +566,20 @@ buildListDiagnosticsResponse() { |
checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { |
buildCounterListDiagnosticsResponse++; |
if (buildCounterListDiagnosticsResponse < 3) { |
- checkUnnamed3467(o.diagnostics); |
+ checkUnnamed3472(o.diagnostics); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
} |
buildCounterListDiagnosticsResponse--; |
} |
-buildUnnamed3468() { |
+buildUnnamed3473() { |
var o = new core.List<api.Namespace>(); |
o.add(buildNamespace()); |
o.add(buildNamespace()); |
return o; |
} |
-checkUnnamed3468(core.List<api.Namespace> o) { |
+checkUnnamed3473(core.List<api.Namespace> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkNamespace(o[0]); |
checkNamespace(o[1]); |
@@ -592,7 +590,7 @@ buildListNamespacesResponse() { |
var o = new api.ListNamespacesResponse(); |
buildCounterListNamespacesResponse++; |
if (buildCounterListNamespacesResponse < 3) { |
- o.namespaces = buildUnnamed3468(); |
+ o.namespaces = buildUnnamed3473(); |
} |
buildCounterListNamespacesResponse--; |
return o; |
@@ -601,7 +599,7 @@ buildListNamespacesResponse() { |
checkListNamespacesResponse(api.ListNamespacesResponse o) { |
buildCounterListNamespacesResponse++; |
if (buildCounterListNamespacesResponse < 3) { |
- checkUnnamed3468(o.namespaces); |
+ checkUnnamed3473(o.namespaces); |
} |
buildCounterListNamespacesResponse--; |
} |
@@ -650,7 +648,6 @@ checkObservation(api.Observation o) { |
buildCounterObservation--; |
} |
- |
main() { |
unittest.group("obj-schema-AdvertisedId", () { |
unittest.test("to-json--from-json", () { |
@@ -660,7 +657,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-AttachmentInfo", () { |
unittest.test("to-json--from-json", () { |
var o = buildAttachmentInfo(); |
@@ -669,7 +665,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Beacon", () { |
unittest.test("to-json--from-json", () { |
var o = buildBeacon(); |
@@ -678,7 +673,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-BeaconAttachment", () { |
unittest.test("to-json--from-json", () { |
var o = buildBeaconAttachment(); |
@@ -687,7 +681,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-BeaconInfo", () { |
unittest.test("to-json--from-json", () { |
var o = buildBeaconInfo(); |
@@ -696,7 +689,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Date", () { |
unittest.test("to-json--from-json", () { |
var o = buildDate(); |
@@ -705,7 +697,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-DeleteAttachmentsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildDeleteAttachmentsResponse(); |
@@ -714,7 +705,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Diagnostics", () { |
unittest.test("to-json--from-json", () { |
var o = buildDiagnostics(); |
@@ -723,7 +713,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Empty", () { |
unittest.test("to-json--from-json", () { |
var o = buildEmpty(); |
@@ -732,7 +721,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-EphemeralIdRegistration", () { |
unittest.test("to-json--from-json", () { |
var o = buildEphemeralIdRegistration(); |
@@ -741,7 +729,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-EphemeralIdRegistrationParams", () { |
unittest.test("to-json--from-json", () { |
var o = buildEphemeralIdRegistrationParams(); |
@@ -750,7 +737,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-GetInfoForObservedBeaconsRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildGetInfoForObservedBeaconsRequest(); |
@@ -759,7 +745,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-GetInfoForObservedBeaconsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildGetInfoForObservedBeaconsResponse(); |
@@ -768,7 +753,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-IndoorLevel", () { |
unittest.test("to-json--from-json", () { |
var o = buildIndoorLevel(); |
@@ -777,7 +761,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-LatLng", () { |
unittest.test("to-json--from-json", () { |
var o = buildLatLng(); |
@@ -786,7 +769,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListBeaconAttachmentsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListBeaconAttachmentsResponse(); |
@@ -795,7 +777,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListBeaconsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListBeaconsResponse(); |
@@ -804,7 +785,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListDiagnosticsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListDiagnosticsResponse(); |
@@ -813,7 +793,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListNamespacesResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListNamespacesResponse(); |
@@ -822,7 +801,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Namespace", () { |
unittest.test("to-json--from-json", () { |
var o = buildNamespace(); |
@@ -831,7 +809,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Observation", () { |
unittest.test("to-json--from-json", () { |
var o = buildObservation(); |
@@ -840,12 +817,11 @@ main() { |
}); |
}); |
- |
unittest.group("resource-BeaconinfoResourceApi", () { |
unittest.test("method--getforobserved", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconinfoResourceApi res = new api.ProximitybeaconApi(mock).beaconinfo; |
+ api.BeaconinfoResourceApi res = |
+ new api.ProximitybeaconApi(mock).beaconinfo; |
var arg_request = buildGetInfoForObservedBeaconsRequest(); |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var obj = new api.GetInfoForObservedBeaconsRequest.fromJson(json); |
@@ -855,9 +831,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 + 33), unittest.equals("v1beta1/beaconinfo:getforobserved")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 33), |
+ unittest.equals("v1beta1/beaconinfo:getforobserved")); |
pathOffset += 33; |
var query = (req.url).query; |
@@ -870,31 +848,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
- var resp = convert.JSON.encode(buildGetInfoForObservedBeaconsResponse()); |
+ var resp = |
+ convert.JSON.encode(buildGetInfoForObservedBeaconsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.getforobserved(arg_request).then(unittest.expectAsync1(((api.GetInfoForObservedBeaconsResponse response) { |
+ res.getforobserved(arg_request).then(unittest |
+ .expectAsync1(((api.GetInfoForObservedBeaconsResponse response) { |
checkGetInfoForObservedBeaconsResponse(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-BeaconsResourceApi", () { |
unittest.test("method--activate", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_beaconName = "foo"; |
@@ -904,9 +882,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -920,28 +900,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
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.activate(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Empty response) { |
+ res |
+ .activate(arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Empty response) { |
checkEmpty(response); |
}))); |
}); |
unittest.test("method--deactivate", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_beaconName = "foo"; |
@@ -951,9 +934,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -967,28 +952,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
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.deactivate(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Empty response) { |
+ res |
+ .deactivate(arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Empty response) { |
checkEmpty(response); |
}))); |
}); |
unittest.test("method--decommission", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_beaconName = "foo"; |
@@ -998,9 +986,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1014,28 +1004,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
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.decommission(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Empty response) { |
+ res |
+ .decommission(arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Empty response) { |
checkEmpty(response); |
}))); |
}); |
unittest.test("method--delete", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_beaconName = "foo"; |
@@ -1045,9 +1038,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1061,28 +1056,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
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_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Empty response) { |
+ res |
+ .delete(arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Empty response) { |
checkEmpty(response); |
}))); |
}); |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_beaconName = "foo"; |
@@ -1092,9 +1090,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1108,42 +1108,47 @@ 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["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildBeacon()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.get(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Beacon response) { |
+ res |
+ .get(arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Beacon response) { |
checkBeacon(response); |
}))); |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
- var arg_projectId = "foo"; |
var arg_pageToken = "foo"; |
var arg_pageSize = 42; |
var arg_q = "foo"; |
+ var arg_projectId = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.equals("v1beta1/beacons")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 15), |
+ unittest.equals("v1beta1/beacons")); |
pathOffset += 15; |
var query = (req.url).query; |
@@ -1156,31 +1161,40 @@ 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["projectId"].first, unittest.equals(arg_projectId)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListBeaconsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(projectId: arg_projectId, pageToken: arg_pageToken, pageSize: arg_pageSize, q: arg_q).then(unittest.expectAsync1(((api.ListBeaconsResponse response) { |
+ res |
+ .list( |
+ pageToken: arg_pageToken, |
+ pageSize: arg_pageSize, |
+ q: arg_q, |
+ projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.ListBeaconsResponse response) { |
checkListBeaconsResponse(response); |
}))); |
}); |
unittest.test("method--register", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_request = buildBeacon(); |
@@ -1193,9 +1207,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 + 24), unittest.equals("v1beta1/beacons:register")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 24), |
+ unittest.equals("v1beta1/beacons:register")); |
pathOffset += 24; |
var query = (req.url).query; |
@@ -1208,28 +1224,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildBeacon()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.register(arg_request, projectId: arg_projectId).then(unittest.expectAsync1(((api.Beacon response) { |
+ res |
+ .register(arg_request, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Beacon response) { |
checkBeacon(response); |
}))); |
}); |
unittest.test("method--update", () { |
- |
var mock = new HttpServerMock(); |
api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
var arg_request = buildBeacon(); |
@@ -1243,9 +1262,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1259,34 +1280,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["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildBeacon()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.update(arg_request, arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Beacon response) { |
+ res |
+ .update(arg_request, arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Beacon response) { |
checkBeacon(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-BeaconsAttachmentsResourceApi", () { |
unittest.test("method--batchDelete", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; |
+ api.BeaconsAttachmentsResourceApi res = |
+ new api.ProximitybeaconApi(mock).beacons.attachments; |
var arg_beaconName = "foo"; |
var arg_projectId = "foo"; |
var arg_namespacedType = "foo"; |
@@ -1295,9 +1318,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1311,31 +1336,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(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_namespacedType)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
+ unittest.expect(queryMap["namespacedType"].first, |
+ unittest.equals(arg_namespacedType)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildDeleteAttachmentsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.batchDelete(arg_beaconName, projectId: arg_projectId, namespacedType: arg_namespacedType).then(unittest.expectAsync1(((api.DeleteAttachmentsResponse response) { |
+ res |
+ .batchDelete(arg_beaconName, |
+ projectId: arg_projectId, namespacedType: arg_namespacedType) |
+ .then( |
+ unittest.expectAsync1(((api.DeleteAttachmentsResponse response) { |
checkDeleteAttachmentsResponse(response); |
}))); |
}); |
unittest.test("method--create", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; |
+ api.BeaconsAttachmentsResourceApi res = |
+ new api.ProximitybeaconApi(mock).beacons.attachments; |
var arg_request = buildBeaconAttachment(); |
var arg_beaconName = "foo"; |
var arg_projectId = "foo"; |
@@ -1347,9 +1379,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1363,30 +1397,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])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildBeaconAttachment()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.create(arg_request, arg_beaconName, projectId: arg_projectId).then(unittest.expectAsync1(((api.BeaconAttachment response) { |
+ res |
+ .create(arg_request, arg_beaconName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.BeaconAttachment response) { |
checkBeaconAttachment(response); |
}))); |
}); |
unittest.test("method--delete", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; |
+ api.BeaconsAttachmentsResourceApi res = |
+ new api.ProximitybeaconApi(mock).beacons.attachments; |
var arg_attachmentName = "foo"; |
var arg_projectId = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1394,9 +1432,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1410,41 +1450,47 @@ 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["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
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_attachmentName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Empty response) { |
+ res |
+ .delete(arg_attachmentName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Empty response) { |
checkEmpty(response); |
}))); |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; |
+ api.BeaconsAttachmentsResourceApi res = |
+ new api.ProximitybeaconApi(mock).beacons.attachments; |
var arg_beaconName = "foo"; |
- var arg_projectId = "foo"; |
var arg_namespacedType = "foo"; |
+ var arg_projectId = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1458,48 +1504,55 @@ 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["projectId"].first, unittest.equals(arg_projectId)); |
- unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_namespacedType)); |
- |
+ unittest.expect(queryMap["namespacedType"].first, |
+ unittest.equals(arg_namespacedType)); |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListBeaconAttachmentsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_beaconName, projectId: arg_projectId, namespacedType: arg_namespacedType).then(unittest.expectAsync1(((api.ListBeaconAttachmentsResponse response) { |
+ res |
+ .list(arg_beaconName, |
+ namespacedType: arg_namespacedType, projectId: arg_projectId) |
+ .then(unittest |
+ .expectAsync1(((api.ListBeaconAttachmentsResponse response) { |
checkListBeaconAttachmentsResponse(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-BeaconsDiagnosticsResourceApi", () { |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.BeaconsDiagnosticsResourceApi res = new api.ProximitybeaconApi(mock).beacons.diagnostics; |
+ api.BeaconsDiagnosticsResourceApi res = |
+ new api.ProximitybeaconApi(mock).beacons.diagnostics; |
var arg_beaconName = "foo"; |
+ var arg_pageToken = "foo"; |
var arg_alertFilter = "foo"; |
var arg_pageSize = 42; |
var arg_projectId = "foo"; |
- var arg_pageToken = "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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1513,46 +1566,57 @@ 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["alertFilter"].first, unittest.equals(arg_alertFilter)); |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect( |
+ queryMap["alertFilter"].first, unittest.equals(arg_alertFilter)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListDiagnosticsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_beaconName, alertFilter: arg_alertFilter, pageSize: arg_pageSize, projectId: arg_projectId, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListDiagnosticsResponse response) { |
+ res |
+ .list(arg_beaconName, |
+ pageToken: arg_pageToken, |
+ alertFilter: arg_alertFilter, |
+ pageSize: arg_pageSize, |
+ projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.ListDiagnosticsResponse response) { |
checkListDiagnosticsResponse(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-NamespacesResourceApi", () { |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespaces; |
+ api.NamespacesResourceApi res = |
+ new api.ProximitybeaconApi(mock).namespaces; |
var arg_projectId = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("v1beta1/namespaces")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 18), |
+ unittest.equals("v1beta1/namespaces")); |
pathOffset += 18; |
var query = (req.url).query; |
@@ -1565,30 +1629,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])); |
} |
} |
- unittest.expect(queryMap["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListNamespacesResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(projectId: arg_projectId).then(unittest.expectAsync1(((api.ListNamespacesResponse response) { |
+ res |
+ .list(projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.ListNamespacesResponse response) { |
checkListNamespacesResponse(response); |
}))); |
}); |
unittest.test("method--update", () { |
- |
var mock = new HttpServerMock(); |
- api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespaces; |
+ api.NamespacesResourceApi res = |
+ new api.ProximitybeaconApi(mock).namespaces; |
var arg_request = buildNamespace(); |
var arg_namespaceName = "foo"; |
var arg_projectId = "foo"; |
@@ -1600,9 +1668,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("v1beta1/")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 8), |
+ unittest.equals("v1beta1/")); |
pathOffset += 8; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1616,32 +1686,33 @@ 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["projectId"].first, unittest.equals(arg_projectId)); |
- |
+ unittest.expect( |
+ queryMap["projectId"].first, unittest.equals(arg_projectId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildNamespace()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.update(arg_request, arg_namespaceName, projectId: arg_projectId).then(unittest.expectAsync1(((api.Namespace response) { |
+ res |
+ .update(arg_request, arg_namespaceName, projectId: arg_projectId) |
+ .then(unittest.expectAsync1(((api.Namespace response) { |
checkNamespace(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-V1beta1ResourceApi", () { |
unittest.test("method--getEidparams", () { |
- |
var mock = new HttpServerMock(); |
api.V1beta1ResourceApi res = new api.ProximitybeaconApi(mock).v1beta1; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1649,9 +1720,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 + 17), unittest.equals("v1beta1/eidparams")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 17), |
+ unittest.equals("v1beta1/eidparams")); |
pathOffset += 17; |
var query = (req.url).query; |
@@ -1664,27 +1737,25 @@ 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(buildEphemeralIdRegistrationParams()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.getEidparams().then(unittest.expectAsync1(((api.EphemeralIdRegistrationParams response) { |
+ res.getEidparams().then( |
+ unittest.expectAsync1(((api.EphemeralIdRegistrationParams response) { |
checkEphemeralIdRegistrationParams(response); |
}))); |
}); |
- |
}); |
- |
- |
} |
- |