From 6d1b2f9578a2a5920e56829c00f670e6ebc4bc43 Mon Sep 17 00:00:00 2001 From: ohassine Date: Mon, 9 Dec 2024 17:32:49 +0100 Subject: [PATCH] feat: test --- .../teammigration/TeamMigrationViewModelTest.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/test/kotlin/com/wire/android/ui/userprofile/teammigration/TeamMigrationViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/userprofile/teammigration/TeamMigrationViewModelTest.kt index 42a7a926e0..e76498855e 100644 --- a/app/src/test/kotlin/com/wire/android/ui/userprofile/teammigration/TeamMigrationViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/userprofile/teammigration/TeamMigrationViewModelTest.kt @@ -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 @@ -251,6 +253,12 @@ class TeamMigrationViewModelTest { @MockK lateinit var migrateFromPersonalToTeam: MigrateFromPersonalToTeamUseCase + @MockK + lateinit var getSelfUser: GetSelfUserUseCase + + @MockK + lateinit var getTeamUrl: GetTeamUrlUseCase + init { MockKAnnotations.init(this, relaxUnitFun = true) } @@ -258,6 +266,8 @@ class TeamMigrationViewModelTest { fun arrange() = this to TeamMigrationViewModel( anonymousAnalyticsManager = anonymousAnalyticsManager, migrateFromPersonalToTeam = migrateFromPersonalToTeam, + getSelfUser = getSelfUser, + getTeamUrl = getTeamUrl ).also { viewModel -> viewModel.teamMigrationState.teamNameTextState.setTextAndPlaceCursorAtEnd(TEAM_NAME) }