forked from github/wulkanowy-mirror
Services refactor (#168)
This commit is contained in:

committed by
Rafał Borcz

parent
ab71dd3fde
commit
70879945f2
@ -2,6 +2,7 @@ package io.github.wulkanowy.ui.modules.main
|
||||
|
||||
import io.github.wulkanowy.data.ErrorHandler
|
||||
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
||||
import io.github.wulkanowy.services.job.ServiceHelper
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.mockito.Mock
|
||||
@ -17,6 +18,9 @@ class MainPresenterTest {
|
||||
@Mock
|
||||
lateinit var prefRepository: PreferencesRepository
|
||||
|
||||
@Mock
|
||||
lateinit var serviceHelper: ServiceHelper
|
||||
|
||||
@Mock
|
||||
lateinit var mainView: MainView
|
||||
|
||||
@ -27,8 +31,8 @@ class MainPresenterTest {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
clearInvocations(mainView)
|
||||
|
||||
presenter = MainPresenter(errorHandler, prefRepository)
|
||||
presenter.onAttachView(mainView)
|
||||
presenter = MainPresenter(errorHandler, prefRepository, serviceHelper)
|
||||
presenter.onAttachView(mainView, -1)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user