Replace string-based static mocks with function references (#706)

This commit is contained in:
Brian Yencho
2024-01-22 07:59:59 -06:00
committed by Álison Fernandes
parent 0bfb9a24dc
commit 49ff8a761d
13 changed files with 39 additions and 74 deletions

View File

@@ -44,12 +44,12 @@ class MainViewModelTest : BaseViewModelTest() {
@BeforeEach
fun setUp() {
mockkStatic(CAPTCHA_UTILS_PATH)
mockkStatic(Intent::getCaptchaCallbackTokenResult)
}
@AfterEach
fun tearDown() {
unmockkStatic(CAPTCHA_UTILS_PATH)
unmockkStatic(Intent::getCaptchaCallbackTokenResult)
}
@Test
@@ -154,8 +154,6 @@ class MainViewModelTest : BaseViewModelTest() {
)
companion object {
private const val CAPTCHA_UTILS_PATH =
"com.x8bit.bitwarden.data.auth.repository.util.CaptchaUtilsKt"
private const val USER_ID = "userID"
private val DEFAULT_USER_STATE = UserState(
activeUserId = USER_ID,