Skip to content

Commit

Permalink
Fix TotalFollowersUseCaseTest
Browse files Browse the repository at this point in the history
`TotalFollowersUseCaseTest` has been updated to align with the changes made in the previous commit.
  • Loading branch information
irfano committed Jan 14, 2024
1 parent 42bacaf commit cfc97a5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Test
import org.mockito.Mock
import org.mockito.kotlin.any
import org.mockito.kotlin.whenever
import org.wordpress.android.BaseUnitTest
import org.wordpress.android.R
Expand All @@ -24,6 +25,7 @@ import org.wordpress.android.ui.stats.refresh.lists.sections.BlockListItem.Type.
import org.wordpress.android.ui.stats.refresh.lists.sections.BlockListItem.ValueWithChartItem
import org.wordpress.android.ui.stats.refresh.utils.ActionCardHandler
import org.wordpress.android.ui.stats.refresh.utils.StatsSiteProvider
import org.wordpress.android.ui.stats.refresh.utils.StatsUtils
import org.wordpress.android.util.analytics.AnalyticsTrackerWrapper
import org.wordpress.android.viewmodel.ResourceProvider

Expand All @@ -50,6 +52,9 @@ class TotalFollowersUseCaseTest : BaseUnitTest() {
@Mock
lateinit var useCaseMode: UseCaseMode

@Mock
lateinit var statsUtils: StatsUtils

@Mock
lateinit var actionCardHandler: ActionCardHandler
private lateinit var useCase: TotalFollowersUseCase
Expand All @@ -66,9 +71,11 @@ class TotalFollowersUseCaseTest : BaseUnitTest() {
totalStatsMapper,
analyticsTrackerWrapper,
actionCardHandler,
useCaseMode
useCaseMode,
statsUtils
)
whenever(statsSiteProvider.siteModel).thenReturn(site)
whenever(statsUtils.toFormattedString(any<Int>(), any())).then { (it.arguments[0] as Int).toString() }
}

@Test
Expand Down

0 comments on commit cfc97a5

Please sign in to comment.