mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Convert explore package to kotlin (#6389)
* Convert WikidataItemDetailsActivity to kotlin * Convert RecentSearchesDao to kotlin * Convert RecentSearchesFragment to kotlin * Convert ExploreListRootFragment to kotlin * Convert the ParentViewPager to kotlin * Convert ExploreMapRootFragment to kotlin * Convert SearchActivity to kotlin * Convert ExploreFragment to kotlin * Convert ExploreMapCalls and ExploreMapContract to kotlin * Convert ExploreMapController to kotlin * Convert the map presenter to kotlin * Convert the ExploreMapFragment to kotlin * Fix import issue
This commit is contained in:
parent
516039c91d
commit
6f36cae767
37 changed files with 3218 additions and 3499 deletions
|
|
@ -88,14 +88,14 @@ class ExploreFragmentUnitTest {
|
|||
@Throws(Exception::class)
|
||||
fun testSetScrollCaseTrue() {
|
||||
fragment.setScroll(true)
|
||||
Assert.assertEquals(viewPager.isCanScroll, true)
|
||||
Assert.assertEquals(viewPager.canScroll, true)
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testSetScrollCaseFalse() {
|
||||
fragment.setScroll(false)
|
||||
Assert.assertEquals(viewPager.isCanScroll, false)
|
||||
Assert.assertEquals(viewPager.canScroll, false)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@ import fr.free.nrw.commons.TestCommonsApplication
|
|||
import fr.free.nrw.commons.explore.models.RecentSearch
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesContentProvider.Companion.BASE_URI
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesContentProvider.Companion.uriForId
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.ALL_FIELDS
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.COLUMN_ID
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.COLUMN_LAST_USED
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.COLUMN_NAME
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.CREATE_TABLE_STATEMENT
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.DROP_TABLE_STATEMENT
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.onCreate
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.onDelete
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao.Table.onUpdate
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.ALL_FIELDS
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.COLUMN_ID
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.COLUMN_LAST_USED
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.COLUMN_NAME
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.CREATE_TABLE_STATEMENT
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.DROP_TABLE_STATEMENT
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.onCreate
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.onDelete
|
||||
import fr.free.nrw.commons.explore.recentsearches.RecentSearchesTable.onUpdate
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Assert.assertNull
|
||||
|
|
|
|||
|
|
@ -123,18 +123,4 @@ class RecentSearchesFragmentUnitTest {
|
|||
method.isAccessible = true
|
||||
method.invoke(fragment, context, 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testSetDeletePositiveButton() {
|
||||
val method: Method =
|
||||
RecentSearchesFragment::class.java.getDeclaredMethod(
|
||||
"setDeletePositiveButton",
|
||||
Context::class.java,
|
||||
DialogInterface::class.java,
|
||||
Int::class.java,
|
||||
)
|
||||
method.isAccessible = true
|
||||
method.invoke(fragment, context, dialog, 0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue