You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Mock
private val manager = mock(Manager::class)
@Mock
private val repository = mock(repository::class)
private lateinit var viewModel: viewModel
@BeforeTest
override fun setUp() {
super.setUp()
loginViewModel = LoginViewModel(
manager,
repository
)
}
manager is an expect class, repository is a class in common also the viewModel.
repository and manager are injected by koin.
When I tried to mock manager I got this error
A mock for the type BiometricsManager was not generated.
Make sure the property holding the mock is annotated with @Mock:
@Mock
private val myMock = mock(classOf<BiometricsManager>())
io.mockative.NoSuchMockException: A mock for the type BiometricsManager was not generated.
Make sure the property holding the mock is annotated with @Mock:
@Mock
private val myMock = mock(classOf<BiometricsManager>())
there is a way how can I mock this expect class?
The text was updated successfully, but these errors were encountered:
Can you provide an example of the expect / actual classes you're trying to test, and which source sets (e.g. commonMain, iosMain) they reside in respectively?
I have this code
manager is an expect class, repository is a class in common also the viewModel.
repository and manager are injected by koin.
When I tried to mock manager I got this error
there is a way how can I mock this expect class?
The text was updated successfully, but these errors were encountered: