mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Convert DepictSearchResponse to kotlin
This commit is contained in:
		
							parent
							
								
									3777f18bf9
								
							
						
					
					
						commit
						a3bad03e3c
					
				
					 3 changed files with 13 additions and 25 deletions
				
			
		|  | @ -105,7 +105,7 @@ class AboutActivityTest { | ||||||
|     fun testLaunchTranslate() { |     fun testLaunchTranslate() { | ||||||
|         Espresso.onView(ViewMatchers.withId(R.id.about_translate)).perform(ViewActions.click()) |         Espresso.onView(ViewMatchers.withId(R.id.about_translate)).perform(ViewActions.click()) | ||||||
|         Espresso.onView(ViewMatchers.withId(android.R.id.button1)).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( |         Intents.intended( | ||||||
|             CoreMatchers.allOf( |             CoreMatchers.allOf( | ||||||
|                 IntentMatchers.hasAction(Intent.ACTION_VIEW), |                 IntentMatchers.hasAction(Intent.ACTION_VIEW), | ||||||
|  |  | ||||||
|  | @ -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; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  | @ -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> | ||||||
|  | ) | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Paul Hawke
						Paul Hawke