Commit acd89555 by Jan-Derk

Added tests

parent 59c9101b
...@@ -28,7 +28,7 @@ void main() { ...@@ -28,7 +28,7 @@ void main() {
test('encodePermissions should return a list of integers', () { test('encodePermissions should return a list of integers', () {
var permissions = [Permission.accessMediaLocation]; var permissions = [Permission.accessMediaLocation];
List<int> integers = Codec.encodePermissions(permissions); var integers = Codec.encodePermissions(permissions);
expect(integers.first, isA<int>()); expect(integers.first, isA<int>());
}); });
......
...@@ -68,7 +68,7 @@ void main() { ...@@ -68,7 +68,7 @@ void main() {
'Default implementation of requestPermissions should throw unimplemented error', 'Default implementation of requestPermissions should throw unimplemented error',
() { () {
final permissionHandlerPlatform = ExtendsPermissionHandlerPlatform(); final permissionHandlerPlatform = ExtendsPermissionHandlerPlatform();
List<Permission> permission = [Permission.accessMediaLocation]; var permission = <Permission>[Permission.accessMediaLocation];
expect(() { expect(() {
permissionHandlerPlatform.requestPermissions(permission); permissionHandlerPlatform.requestPermissions(permission);
...@@ -97,6 +97,7 @@ class ExtendsPermissionHandlerPlatform extends PermissionHandlerPlatform {} ...@@ -97,6 +97,7 @@ class ExtendsPermissionHandlerPlatform extends PermissionHandlerPlatform {}
class MockPermissionHandlerPlatform extends Mock // ignore: prefer_mixin class MockPermissionHandlerPlatform extends Mock // ignore: prefer_mixin
with with
// ignore: prefer_mixin
MockPlatformInterfaceMixin MockPlatformInterfaceMixin
implements implements
PermissionHandlerPlatform {} PermissionHandlerPlatform {}
...@@ -18,7 +18,9 @@ void main() { ...@@ -18,7 +18,9 @@ void main() {
expect(values[4], PermissionStatus.permanentlyDenied); expect(values[4], PermissionStatus.permanentlyDenied);
}); });
test( test(
// ignore: lines_longer_than_80_chars
'statusByValue should return right index int that corresponds with the right PermissionStatus', 'statusByValue should return right index int that corresponds with the right PermissionStatus',
() { () {
expect(PermissionStatusValue.statusByValue(0), PermissionStatus.granted); expect(PermissionStatusValue.statusByValue(0), PermissionStatus.granted);
......
...@@ -17,6 +17,7 @@ void main() { ...@@ -17,6 +17,7 @@ void main() {
}); });
test( test(
// ignore: lines_longer_than_80_chars
'statusByValue should return right index int that corresponds with the right PermissionStatus', 'statusByValue should return right index int that corresponds with the right PermissionStatus',
() { () {
expect(ServiceStatusValue.statusByValue(0), ServiceStatus.disabled); expect(ServiceStatusValue.statusByValue(0), ServiceStatus.disabled);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment