mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Consistent api interfaces (#5530)
* Converted CategoryInterface to kotlin * Converted DepictsInterface to kotlin * Convert the MediaDetailInterface to kotlin * Convert MediaInterface to kotlin * Convert ReviewInterface to kotlin * Convert the UserInterface to kotlin * Convert the WikiBaseInterface to kotlin * Convert WikidataInterface to kotlin * Convert WikidataMediaInterface to kotlin * Convert UploadInterface to kotlin
This commit is contained in:
parent
c6cb97e199
commit
f9090b0c2c
20 changed files with 535 additions and 524 deletions
|
|
@ -33,7 +33,7 @@ class UserClientTest{
|
|||
Mockito.`when`(mwQueryResult.userInfo()).thenReturn(userInfo)
|
||||
val mockResponse = Mockito.mock(MwQueryResponse::class.java)
|
||||
Mockito.`when`(mockResponse.query()).thenReturn(mwQueryResult)
|
||||
Mockito.`when`(userInterface!!.userBlockInfo)
|
||||
Mockito.`when`(userInterface!!.getUserBlockInfo())
|
||||
.thenReturn(Observable.just(mockResponse))
|
||||
|
||||
val isBanned = userClient!!.isUserBlockedFromCommons.blockingGet()
|
||||
|
|
@ -51,7 +51,7 @@ class UserClientTest{
|
|||
Mockito.`when`(mwQueryResult.userInfo()).thenReturn(userInfo)
|
||||
val mockResponse = Mockito.mock(MwQueryResponse::class.java)
|
||||
Mockito.`when`(mockResponse.query()).thenReturn(mwQueryResult)
|
||||
Mockito.`when`(userInterface!!.userBlockInfo)
|
||||
Mockito.`when`(userInterface!!.getUserBlockInfo())
|
||||
.thenReturn(Observable.just(mockResponse))
|
||||
|
||||
val isBanned = userClient!!.isUserBlockedFromCommons.blockingGet()
|
||||
|
|
@ -66,7 +66,7 @@ class UserClientTest{
|
|||
Mockito.`when`(mwQueryResult.userInfo()).thenReturn(userInfo)
|
||||
val mockResponse = Mockito.mock(MwQueryResponse::class.java)
|
||||
Mockito.`when`(mockResponse.query()).thenReturn(mwQueryResult)
|
||||
Mockito.`when`(userInterface!!.userBlockInfo)
|
||||
Mockito.`when`(userInterface!!.getUserBlockInfo())
|
||||
.thenReturn(Observable.just(mockResponse))
|
||||
|
||||
val isBanned = userClient!!.isUserBlockedFromCommons.blockingGet()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue