Fixed the migrations warning under Kotlin header #13282 (#6060)

* Fixed  Migration warnings under Kotlin header

* suppresses Lint

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Sonal Yadav 2024-12-22 19:44:20 +05:30 committed by GitHub
parent f1e8e48769
commit b55c61ddb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 28 additions and 20 deletions

View file

@ -68,7 +68,7 @@ class BookmarkLocationControllerTest {
@Test
fun loadBookmarkedLocations() {
val bookmarkedLocations =
bookmarkLocationsController!!.loadFavoritesLocations()
bookmarkLocationsController.loadFavoritesLocations()
Assert.assertEquals(2, bookmarkedLocations.size.toLong())
}
}

View file

@ -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)
}

View file

@ -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!!)
}