forked from github/wulkanowy-mirror
Refactor packages hierarchy (#170)
This commit is contained in:

committed by
Mikołaj Pich

parent
837bce7286
commit
0211a7f0a0
@ -1,13 +0,0 @@
|
||||
package io.github.wulkanowy
|
||||
|
||||
import io.github.wulkanowy.utils.schedulers.SchedulersManager
|
||||
import io.reactivex.Scheduler
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
|
||||
class TestSchedulers : SchedulersManager {
|
||||
|
||||
override fun backgroundThread(): Scheduler = Schedulers.trampoline()
|
||||
|
||||
override fun mainThread(): Scheduler = Schedulers.trampoline()
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package io.github.wulkanowy
|
||||
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Scheduler
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
|
||||
class TestSchedulersProvider : SchedulersProvider() {
|
||||
|
||||
override val backgroundThread: Scheduler
|
||||
get() = Schedulers.trampoline()
|
||||
|
||||
override val mainThread: Scheduler
|
||||
get() = Schedulers.trampoline()
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package io.github.wulkanowy.ui.login
|
||||
package io.github.wulkanowy.ui.modules.login
|
||||
|
||||
import org.junit.Assert.assertNotEquals
|
||||
import org.junit.Before
|
@ -1,9 +1,9 @@
|
||||
package io.github.wulkanowy.ui.login.form
|
||||
package io.github.wulkanowy.ui.modules.login.form
|
||||
|
||||
import io.github.wulkanowy.TestSchedulers
|
||||
import io.github.wulkanowy.TestSchedulersProvider
|
||||
import io.github.wulkanowy.data.db.entities.Student
|
||||
import io.github.wulkanowy.data.repositories.SessionRepository
|
||||
import io.github.wulkanowy.ui.login.LoginErrorHandler
|
||||
import io.github.wulkanowy.ui.modules.login.LoginErrorHandler
|
||||
import io.reactivex.Single
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
@ -29,7 +29,7 @@ class LoginFormPresenterTest {
|
||||
fun initPresenter() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
clearInvocations(repository, loginFormView)
|
||||
presenter = LoginFormPresenter(TestSchedulers(), errorHandler, repository)
|
||||
presenter = LoginFormPresenter(TestSchedulersProvider(), errorHandler, repository)
|
||||
presenter.onAttachView(loginFormView)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.github.wulkanowy.ui.login.options
|
||||
package io.github.wulkanowy.ui.modules.login.options
|
||||
|
||||
import io.github.wulkanowy.TestSchedulers
|
||||
import io.github.wulkanowy.TestSchedulersProvider
|
||||
import io.github.wulkanowy.data.ErrorHandler
|
||||
import io.github.wulkanowy.data.db.entities.Student
|
||||
import io.github.wulkanowy.data.repositories.SessionRepository
|
||||
@ -33,7 +33,7 @@ class LoginOptionsPresenterTest {
|
||||
fun initPresenter() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
clearInvocations(repository, loginOptionsView)
|
||||
presenter = LoginOptionsPresenter(errorHandler, repository, TestSchedulers())
|
||||
presenter = LoginOptionsPresenter(errorHandler, repository, TestSchedulersProvider())
|
||||
presenter.onAttachView(loginOptionsView)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package io.github.wulkanowy.ui.main
|
||||
package io.github.wulkanowy.ui.modules.main
|
||||
|
||||
import io.github.wulkanowy.data.ErrorHandler
|
||||
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
@ -1,4 +1,4 @@
|
||||
package io.github.wulkanowy.ui.splash
|
||||
package io.github.wulkanowy.ui.modules.splash
|
||||
|
||||
import io.github.wulkanowy.data.ErrorHandler
|
||||
import io.github.wulkanowy.data.repositories.SessionRepository
|
Reference in New Issue
Block a user