Move EventStateTestUtil to core:ui:compose:testing
This commit is contained in:
parent
f3d096fed4
commit
c2d067f968
6 changed files with 8 additions and 6 deletions
|
@ -8,6 +8,8 @@ android {
|
|||
|
||||
dependencies {
|
||||
api(projects.core.testing)
|
||||
api(libs.turbine)
|
||||
api(libs.assertk)
|
||||
|
||||
implementation(projects.core.ui.compose.theme)
|
||||
implementation(libs.androidx.compose.material)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package app.k9mail.feature.account.setup.testing
|
||||
package app.k9mail.core.ui.compose.testing.mvi
|
||||
|
||||
import app.cash.turbine.testIn
|
||||
import app.k9mail.core.ui.compose.common.mvi.UnidirectionalViewModel
|
||||
|
@ -6,7 +6,7 @@ import assertk.assertions.assertThatAndTurbinesConsumed
|
|||
import assertk.assertions.isEqualTo
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
internal suspend fun <STATE, EVENT, EFFECT> eventStateTest(
|
||||
suspend fun <STATE, EVENT, EFFECT> eventStateTest(
|
||||
viewModel: UnidirectionalViewModel<STATE, EVENT, EFFECT>,
|
||||
initialState: STATE,
|
||||
event: EVENT,
|
|
@ -5,10 +5,10 @@ import app.k9mail.autodiscovery.api.AutoDiscoveryResult
|
|||
import app.k9mail.core.common.domain.usecase.validation.ValidationError
|
||||
import app.k9mail.core.common.domain.usecase.validation.ValidationResult
|
||||
import app.k9mail.core.ui.compose.testing.MainDispatcherRule
|
||||
import app.k9mail.core.ui.compose.testing.mvi.eventStateTest
|
||||
import app.k9mail.feature.account.setup.domain.entity.AutoDiscoverySettingsFixture
|
||||
import app.k9mail.feature.account.setup.domain.input.BooleanInputField
|
||||
import app.k9mail.feature.account.setup.domain.input.StringInputField
|
||||
import app.k9mail.feature.account.setup.testing.eventStateTest
|
||||
import app.k9mail.feature.account.setup.ui.autodiscovery.AccountAutoDiscoveryContract.ConfigStep
|
||||
import app.k9mail.feature.account.setup.ui.autodiscovery.AccountAutoDiscoveryContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.autodiscovery.AccountAutoDiscoveryContract.Error
|
||||
|
|
|
@ -4,6 +4,7 @@ import app.cash.turbine.testIn
|
|||
import app.k9mail.core.common.domain.usecase.validation.ValidationError
|
||||
import app.k9mail.core.common.domain.usecase.validation.ValidationResult
|
||||
import app.k9mail.core.ui.compose.testing.MainDispatcherRule
|
||||
import app.k9mail.core.ui.compose.testing.mvi.eventStateTest
|
||||
import app.k9mail.feature.account.setup.domain.entity.AuthenticationType
|
||||
import app.k9mail.feature.account.setup.domain.entity.ConnectionSecurity
|
||||
import app.k9mail.feature.account.setup.domain.entity.IncomingProtocolType
|
||||
|
@ -11,7 +12,6 @@ import app.k9mail.feature.account.setup.domain.entity.toImapDefaultPort
|
|||
import app.k9mail.feature.account.setup.domain.entity.toPop3DefaultPort
|
||||
import app.k9mail.feature.account.setup.domain.input.NumberInputField
|
||||
import app.k9mail.feature.account.setup.domain.input.StringInputField
|
||||
import app.k9mail.feature.account.setup.testing.eventStateTest
|
||||
import app.k9mail.feature.account.setup.ui.incoming.AccountIncomingConfigContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.incoming.AccountIncomingConfigContract.Error
|
||||
import app.k9mail.feature.account.setup.ui.incoming.AccountIncomingConfigContract.Event
|
||||
|
|
|
@ -4,10 +4,10 @@ import app.cash.turbine.testIn
|
|||
import app.k9mail.core.common.domain.usecase.validation.ValidationError
|
||||
import app.k9mail.core.common.domain.usecase.validation.ValidationResult
|
||||
import app.k9mail.core.ui.compose.testing.MainDispatcherRule
|
||||
import app.k9mail.core.ui.compose.testing.mvi.eventStateTest
|
||||
import app.k9mail.feature.account.setup.domain.entity.EmailCheckFrequency
|
||||
import app.k9mail.feature.account.setup.domain.entity.EmailDisplayCount
|
||||
import app.k9mail.feature.account.setup.domain.input.StringInputField
|
||||
import app.k9mail.feature.account.setup.testing.eventStateTest
|
||||
import app.k9mail.feature.account.setup.ui.options.AccountOptionsContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.options.AccountOptionsContract.Event
|
||||
import app.k9mail.feature.account.setup.ui.options.AccountOptionsContract.State
|
||||
|
|
|
@ -4,12 +4,12 @@ import app.cash.turbine.testIn
|
|||
import app.k9mail.core.common.domain.usecase.validation.ValidationError
|
||||
import app.k9mail.core.common.domain.usecase.validation.ValidationResult
|
||||
import app.k9mail.core.ui.compose.testing.MainDispatcherRule
|
||||
import app.k9mail.core.ui.compose.testing.mvi.eventStateTest
|
||||
import app.k9mail.feature.account.setup.domain.entity.AuthenticationType
|
||||
import app.k9mail.feature.account.setup.domain.entity.ConnectionSecurity
|
||||
import app.k9mail.feature.account.setup.domain.entity.toSmtpDefaultPort
|
||||
import app.k9mail.feature.account.setup.domain.input.NumberInputField
|
||||
import app.k9mail.feature.account.setup.domain.input.StringInputField
|
||||
import app.k9mail.feature.account.setup.testing.eventStateTest
|
||||
import app.k9mail.feature.account.setup.ui.outgoing.AccountOutgoingConfigContract.Effect
|
||||
import app.k9mail.feature.account.setup.ui.outgoing.AccountOutgoingConfigContract.Error
|
||||
import app.k9mail.feature.account.setup.ui.outgoing.AccountOutgoingConfigContract.Event
|
||||
|
|
Loading…
Reference in a new issue