mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
#3847 Convert Media and Contribution to Kotlin Data Classes - convert to data classes - compose a contribution with a media (#3848)
Co-authored-by: Vivek Maskara <maskaravivek@gmail.com>
This commit is contained in:
parent
3361155fad
commit
cc2f14dab8
34 changed files with 334 additions and 741 deletions
|
|
@ -1,10 +1,10 @@
|
|||
package fr.free.nrw.commons.review
|
||||
|
||||
import com.nhaarman.mockitokotlin2.whenever
|
||||
import fr.free.nrw.commons.Media
|
||||
import fr.free.nrw.commons.media.MediaClient
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Single
|
||||
import junit.framework.Assert.assertNotNull
|
||||
import junit.framework.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
|
|
@ -61,7 +61,7 @@ class ReviewHelperTest {
|
|||
.thenReturn(Observable.just(mockResponse))
|
||||
|
||||
val media = mock(Media::class.java)
|
||||
media.filename="File:Test.jpg"
|
||||
whenever(media.filename).thenReturn("Test file.jpg")
|
||||
`when`(mediaClient?.getMedia(ArgumentMatchers.anyString()))
|
||||
.thenReturn(Single.just(media))
|
||||
}
|
||||
|
|
@ -126,4 +126,4 @@ class ReviewHelperTest {
|
|||
|
||||
assertTrue(firstRevisionOfFile is MwQueryPage.Revision)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue