Convert DepictSearchResponse to kotlin

This commit is contained in:
Paul Hawke 2024-12-03 21:03:17 -06:00
parent 3777f18bf9
commit a3bad03e3c
3 changed files with 13 additions and 25 deletions

View file

@ -105,7 +105,7 @@ class AboutActivityTest {
fun testLaunchTranslate() {
Espresso.onView(ViewMatchers.withId(R.id.about_translate)).perform(ViewActions.click())
Espresso.onView(ViewMatchers.withId(android.R.id.button1)).perform(ViewActions.click())
val langCode = CommonsApplication.instance.languageLookUpTable!!.codes[0]
val langCode = CommonsApplication.instance.languageLookUpTable!!.getCodes()[0]
Intents.intended(
CoreMatchers.allOf(
IntentMatchers.hasAction(Intent.ACTION_VIEW),

View file

@ -1,24 +0,0 @@
package fr.free.nrw.commons.wikidata.model;
import java.util.List;
/**
* Model class for API response obtained from search for depictions
*/
public class DepictSearchResponse {
private final List<DepictSearchItem> search;
/**
* Constructor to initialise value of the search object
*/
public DepictSearchResponse(List<DepictSearchItem> search) {
this.search = search;
}
/**
* @return List<DepictSearchItem> for the DepictSearchResponse
*/
public List<DepictSearchItem> getSearch() {
return search;
}
}

View file

@ -0,0 +1,12 @@
package fr.free.nrw.commons.wikidata.model
/**
* Model class for API response obtained from search for depictions
*/
class DepictSearchResponse(
/**
* @return List<DepictSearchItem> for the DepictSearchResponse
</DepictSearchItem>
*/
val search: List<DepictSearchItem>
)