I am writing unit tests for a class that handles location services.
A simple method in my class looks like this :
static requestPermissions() async {
// geo locator permission
LocationPermission geoPermission = await Geolocator.checkPermission();
if (geoPermission == LocationPermission.denied ||
geoPermission == LocationPermission.deniedForever) {
//LocationPermission permission = await Geolocator.requestPermission();
}
}
how can i write a test for this function.