mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Merge remote-tracking branch 'origin/2.11-release'
This commit is contained in:
commit
1a60fec5da
9 changed files with 96 additions and 17 deletions
|
|
@ -57,7 +57,9 @@ class CategoriesPresenterTest {
|
|||
fun searchForCategoriesTest() {
|
||||
Mockito.`when`(repository?.sortBySimilarity(ArgumentMatchers.anyString())).thenReturn(Comparator<CategoryItem> { _, _ -> 1 })
|
||||
Mockito.`when`(repository?.selectedCategories).thenReturn(categoryItems)
|
||||
Mockito.`when`(repository?.searchAll(ArgumentMatchers.anyString(), ArgumentMatchers.anyList())).thenReturn(Observable.empty())
|
||||
Mockito.`when`(repository?.searchAll(ArgumentMatchers.anyString(), ArgumentMatchers.anyList())).thenReturn(testObservable)
|
||||
Mockito.`when`(repository?.searchCategories(ArgumentMatchers.anyString(), ArgumentMatchers.anyList())).thenReturn(testObservable)
|
||||
Mockito.`when`(repository?.getDefaultCategories(ArgumentMatchers.anyList())).thenReturn(testObservable)
|
||||
categoriesPresenter?.searchForCategories("test")
|
||||
verify(view)?.showProgress(true)
|
||||
verify(view)?.showError(null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue