Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
acd89555
Commit
acd89555
authored
Mar 15, 2021
by
Jan-Derk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests
parent
59c9101b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
permission_handler_platform_interface/test/src/method_channel/utils/coded_test.dart
+1
-1
permission_handler_platform_interface/test/src/permission_handler_platform_interface_test.dart
+2
-1
permission_handler_platform_interface/test/src/permission_status_test.dart
+2
-0
permission_handler_platform_interface/test/src/service_status_test.dart
+1
-0
No files found.
permission_handler_platform_interface/test/src/method_channel/utils/coded_test.dart
View file @
acd89555
...
@@ -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
>());
});
});
...
...
permission_handler_platform_interface/test/src/permission_handler_platform_interface_test.dart
View file @
acd89555
...
@@ -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
{}
permission_handler_platform_interface/test/src/permission_status_test.dart
View file @
acd89555
...
@@ -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
);
...
...
permission_handler_platform_interface/test/src/service_status_test.dart
View file @
acd89555
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment