Get rid of HandlerService #3555 (#3671)

* [WIP] Removed HandlerService

* [WIP] Added PublishProcessor for managing queue

* Resolved conflicts after merge
This commit is contained in:
Vitaly V. Pinchuk 2020-04-26 09:17:57 +03:00 committed by GitHub
parent ce089d3f73
commit 1fea1bbf49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 126 deletions

View file

@ -2,10 +2,8 @@ package fr.free.nrw.commons.upload
import android.content.ComponentName
import android.content.Context
import fr.free.nrw.commons.HandlerService
import fr.free.nrw.commons.auth.SessionManager
import fr.free.nrw.commons.contributions.Contribution
import fr.free.nrw.commons.kvstore.BasicKvStore
import fr.free.nrw.commons.kvstore.JsonKvStore
import org.junit.Before
import org.junit.Test
@ -31,7 +29,7 @@ class UploadControllerTest {
fun setup() {
MockitoAnnotations.initMocks(this)
val uploadService = mock(UploadService::class.java)
val binder = mock(HandlerService.HandlerServiceLocalBinder::class.java)
val binder = mock(UploadService.UploadServiceLocalBinder::class.java)
`when`(binder.service).thenReturn(uploadService)
uploadController!!.uploadServiceConnection.onServiceConnected(mock(ComponentName::class.java), binder)
}