mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
* Fixed Migration warnings under Kotlin header * suppresses Lint --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
f1e8e48769
commit
b55c61ddb8
13 changed files with 28 additions and 20 deletions
|
|
@ -68,7 +68,7 @@ class BookmarkLocationControllerTest {
|
|||
@Test
|
||||
fun loadBookmarkedLocations() {
|
||||
val bookmarkedLocations =
|
||||
bookmarkLocationsController!!.loadFavoritesLocations()
|
||||
bookmarkLocationsController.loadFavoritesLocations()
|
||||
Assert.assertEquals(2, bookmarkedLocations.size.toLong())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class JsonKvStoreTest {
|
|||
fun getJson() {
|
||||
whenever(prefs.getString("key", null)).thenReturn(expected)
|
||||
|
||||
val result = store.getJson("key", Person::class.java)
|
||||
val result = store.getJson<Person>("key")
|
||||
|
||||
Assert.assertEquals(testData, result)
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ class JsonKvStoreTest {
|
|||
fun getJsonHandlesMalformedJson() {
|
||||
whenever(prefs.getString("key", null)).thenReturn("junk")
|
||||
|
||||
val result = store.getJson("key", Person::class.java)
|
||||
val result = store.getJson<Person>("key")
|
||||
|
||||
Assert.assertNull(result)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ class NearbyParentFragmentPresenterTest {
|
|||
whenever(nearbyParentFragmentView.mapFocus).thenReturn(LatLng(2.0, 1.0, 0.0F))
|
||||
// 111.19 km real distance, return false if 148306.444306 > currentLocationSearchRadius
|
||||
NearbyController.currentLocationSearchRadius = 148306.0
|
||||
val isClose = nearbyPresenter?.searchCloseToCurrentLocation()
|
||||
val isClose = nearbyPresenter.searchCloseToCurrentLocation()
|
||||
assertFalse(isClose!!.equals(false))
|
||||
}
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ class NearbyParentFragmentPresenterTest {
|
|||
whenever(nearbyParentFragmentView.getCameraTarget()).thenReturn(LatLng(2.0, 1.0, 0.0F))
|
||||
// 111.19 km real distance, return false if 148253.333 > currentLocationSearchRadius
|
||||
NearbyController.currentLocationSearchRadius = 148307.0
|
||||
val isClose = nearbyPresenter?.searchCloseToCurrentLocation()
|
||||
val isClose = nearbyPresenter.searchCloseToCurrentLocation()
|
||||
assertTrue(isClose!!)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue