Skip to content

Commit d21c63f

Browse files
parneet-gurayasivaraam
authored andcommitted
CommonsApplication migrate to kotlin & some lint fixes (#5879)
* convert to kotlin Signed-off-by: parneet-guraya <[email protected]> * use lateinit instead of nullable types Signed-off-by: parneet-guraya <[email protected]> * instance property access fix Signed-off-by: parneet-guraya <[email protected]> * refactor constants name with uppercased ones Signed-off-by: parneet-guraya <[email protected]> * remove unused Signed-off-by: parneet-guraya <[email protected]> * fix imports in test Signed-off-by: parneet-guraya <[email protected]> * use mockk for kotlin to fix tests Signed-off-by: parneet-guraya <[email protected]> --------- Signed-off-by: parneet-guraya <[email protected]>
1 parent 6adedd9 commit d21c63f

File tree

10 files changed

+436
-445
lines changed

10 files changed

+436
-445
lines changed

app/src/androidTest/java/fr/free/nrw/commons/AboutActivityTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class AboutActivityTest {
105105
fun testLaunchTranslate() {
106106
Espresso.onView(ViewMatchers.withId(R.id.about_translate)).perform(ViewActions.click())
107107
Espresso.onView(ViewMatchers.withId(android.R.id.button1)).perform(ViewActions.click())
108-
val langCode = CommonsApplication.getInstance().languageLookUpTable.codes[0]
108+
val langCode = CommonsApplication.instance.languageLookUpTable!!.codes[0]
109109
Intents.intended(
110110
CoreMatchers.allOf(
111111
IntentMatchers.hasAction(Intent.ACTION_VIEW),

0 commit comments

Comments
 (0)