Skip to content

Commit f2402b9

Browse files
committed
Copy google_play_services_availability_test.dart
1 parent 68b9ff3 commit f2402b9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import 'package:flutter_test/flutter_test.dart';
2+
import 'package:google_api_availability_platform_interface/google_api_availability_platform_interface.dart';
3+
4+
void main() {
5+
group('$GooglePlayServicesAvailability', () {
6+
test('has the right amount of availability states', () {
7+
const values = GooglePlayServicesAvailability.values;
8+
9+
expect(values.length, 8);
10+
});
11+
12+
test('check if corresponding status gets received when calling constructor',
13+
() {
14+
const values = GooglePlayServicesAvailability.values;
15+
16+
for (var i = 0; i < values.length; i++) {
17+
expect(values[i], GooglePlayServicesAvailability.byValue(i));
18+
}
19+
});
20+
21+
test('check if toString method returns the corresponding name', () {
22+
var playServicesAvailability =
23+
const GooglePlayServicesAvailability.private(0);
24+
25+
expect(playServicesAvailability.toString(),
26+
'GooglePlayServicesAvailability.success');
27+
});
28+
});
29+
}

0 commit comments

Comments
 (0)