Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine committed Dec 11, 2024
1 parent 207198e commit 6d1b2f9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import com.wire.android.config.CoroutineTestExtension
import com.wire.android.feature.analytics.AnonymousAnalyticsManager
import com.wire.android.feature.analytics.model.AnalyticsEvent
import com.wire.kalium.logic.NetworkFailure
import com.wire.kalium.logic.feature.server.GetTeamUrlUseCase
import com.wire.kalium.logic.feature.user.GetSelfUserUseCase
import com.wire.kalium.logic.feature.user.migration.MigrateFromPersonalToTeamFailure
import com.wire.kalium.logic.feature.user.migration.MigrateFromPersonalToTeamResult
import com.wire.kalium.logic.feature.user.migration.MigrateFromPersonalToTeamUseCase
Expand Down Expand Up @@ -251,13 +253,21 @@ class TeamMigrationViewModelTest {
@MockK
lateinit var migrateFromPersonalToTeam: MigrateFromPersonalToTeamUseCase

@MockK
lateinit var getSelfUser: GetSelfUserUseCase

@MockK
lateinit var getTeamUrl: GetTeamUrlUseCase

init {
MockKAnnotations.init(this, relaxUnitFun = true)
}

fun arrange() = this to TeamMigrationViewModel(
anonymousAnalyticsManager = anonymousAnalyticsManager,
migrateFromPersonalToTeam = migrateFromPersonalToTeam,
getSelfUser = getSelfUser,
getTeamUrl = getTeamUrl
).also { viewModel ->
viewModel.teamMigrationState.teamNameTextState.setTextAndPlaceCursorAtEnd(TEAM_NAME)
}
Expand Down

0 comments on commit 6d1b2f9

Please sign in to comment.