diff --git a/app/src/test/kotlin/fr/free/nrw/commons/nearby/NearbyParentFragmentPresenterTest.kt b/app/src/test/kotlin/fr/free/nrw/commons/nearby/NearbyParentFragmentPresenterTest.kt index 6f64de113..84fb0b947 100644 --- a/app/src/test/kotlin/fr/free/nrw/commons/nearby/NearbyParentFragmentPresenterTest.kt +++ b/app/src/test/kotlin/fr/free/nrw/commons/nearby/NearbyParentFragmentPresenterTest.kt @@ -295,11 +295,11 @@ class NearbyParentFragmentPresenterTest { @Test fun testSearchCloseToCurrentLocationWhenFar() { whenever(nearbyParentFragmentView.lastMapFocus).thenReturn(LatLng(2.0, 1.0, 0.0F)) - whenever(nearbyParentFragmentView.mapFocus).thenReturn(LatLng(2.0, 1.0, 0.0F)) - // 111.19 km real distance, return false if 148306.444306 > currentLocationSearchRadius + whenever(nearbyParentFragmentView.mapFocus).thenReturn(LatLng(2.0, 1.02, 0.0F)) NearbyController.currentLocationSearchRadius = 148306.0 - val isClose = nearbyPresenter?.searchCloseToCurrentLocation() - assertFalse(isClose!!.equals(false)) + // 111.19 km real distance, return false if 148306.444306 > currentLocationSearchRadius + val isClose = nearbyPresenter.searchCloseToCurrentLocation() + assertFalse(isClose) } /**