Skip to content

Commit

Permalink
test(map): add missing override in mock geolocation service
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTexanCodeur committed May 27, 2024
1 parent 8d68dd2 commit 582e2f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/end2end/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void main() {
when(geoLocationService.getPositionStream()).thenAnswer(
(_) => Stream.value(startLocation),
);
when(geoLocationService.checkLocationServices()).thenAnswer(
(_) => Future.value(null),
);

firestorePostGenerator = FirestorePostGenerator();
});
Expand Down
8 changes: 8 additions & 0 deletions test/mocks/services/mock_geo_location_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ class MockGeolocationService extends Mock implements GeolocationService {
returnValue: Stream.value(userPosition0),
);
}

@override
Future<Exception?> checkLocationServices() {
return super.noSuchMethod(
Invocation.method(#checkLocationServices, []),
returnValue: Future.value(null),
);
}
}
3 changes: 3 additions & 0 deletions test/views/pages/map/dynamic_map_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ void main() {
when(geoLocationService.getPositionStream()).thenAnswer(
(_) => Stream.value(userPosition0),
);
when(geoLocationService.checkLocationServices()).thenAnswer(
(_) => Future.value(null),
);

postGenerator = FirestorePostGenerator();
});
Expand Down

0 comments on commit 582e2f0

Please sign in to comment.