mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
* added copy to subsequent media button * minor change Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
ff96f5047e
commit
a479dd5bb1
7 changed files with 54 additions and 44 deletions
|
|
@ -164,30 +164,19 @@ class UploadMediaPresenterTest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test fetch previous image title when there was one
|
||||
* Test fetch image title when there was one
|
||||
*/
|
||||
@Test
|
||||
fun fetchPreviousImageAndTitleTestPositive() {
|
||||
fun fetchImageAndTitleTest() {
|
||||
whenever(repository.uploads).thenReturn(listOf(uploadItem))
|
||||
whenever(repository.getPreviousUploadItem(ArgumentMatchers.anyInt()))
|
||||
whenever(repository.getUploadItem(ArgumentMatchers.anyInt()))
|
||||
.thenReturn(uploadItem)
|
||||
whenever(uploadItem.uploadMediaDetails).thenReturn(listOf())
|
||||
|
||||
uploadMediaPresenter.fetchPreviousTitleAndDescription(0)
|
||||
uploadMediaPresenter.fetchTitleAndDescription(0)
|
||||
verify(view).updateMediaDetails(ArgumentMatchers.any())
|
||||
}
|
||||
|
||||
/**
|
||||
* Test fetch previous image title when there was none
|
||||
*/
|
||||
@Test
|
||||
fun fetchPreviousImageAndTitleTestNegative() {
|
||||
whenever(repository.getPreviousUploadItem(ArgumentMatchers.anyInt()))
|
||||
.thenReturn(null)
|
||||
uploadMediaPresenter.fetchPreviousTitleAndDescription(0)
|
||||
verify(view).showMessage(ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())
|
||||
}
|
||||
|
||||
/**
|
||||
* Test bad image invalid location
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue