Skip to content

Commit 67f2531

Browse files
committed
Fix unit test + add locale
1 parent 056a1eb commit 67f2531

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

‎geocoding/test/geocoding_test.dart‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void main() {
2828
late MockGeocodingPlatform platform;
2929

3030
setUp(() {
31-
platform = MockGeocodingPlatform();
31+
platform = MockGeocodingPlatform(const GeocodingCreationParams());
3232
GeocodingPlatformFactory.instance =
3333
MockGeocodingPlatformFactory(platform);
3434
});
@@ -80,9 +80,13 @@ void main() {
8080
}
8181

8282
class MockGeocodingPlatformFactory extends GeocodingPlatformFactory {
83+
final MockGeocodingPlatform platform;
84+
85+
MockGeocodingPlatformFactory(this.platform);
86+
8387
@override
8488
pi.Geocoding createGeocoding(GeocodingCreationParams params) {
85-
return MockGeocodingPlatform(params);
89+
return platform;
8690
}
8791
}
8892

@@ -118,12 +122,4 @@ class MockGeocodingPlatform extends pi.Geocoding {
118122
lastLocale = locale;
119123
return [mockPlacemark];
120124
}
121-
122-
@override
123-
Future<List<Placemark>> placemarkFromAddress(
124-
String address, {
125-
Locale? locale,
126-
}) async {
127-
return [mockPlacemark];
128-
}
129125
}

0 commit comments

Comments
 (0)