python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Mockk matching and overloaded function withArg
Hello I am trying to find a way to match an overloaded function inside of the verify using withArg
The doc doesnt really point this out
every { getResponse.Ids } returns listOf(121212L)
assert...
Bao Thai
Votes: 0
Answers: 1
I am trying to convert a java unittest case mockito to Kotlin MockK in android
This is the verify block and was working on java
verify(mockTokenError) {}
And later tried to convert to kotlin
verify{mockTokenError()}
also tried
verify{mockTokenError}
none of them works please ...
RockyGlobal
Votes: 0
Answers: 1
MockK's "every" "returns null" not returning "null" but a NetworkInfo object with null and false values
In my unit test I am calling the following:
every { connectivityManager.activeNetworkInfo } returns null
but when I debug I get a NetworkInfo object filled with null and false values
networkInfo ...
jteichert
Votes: 0
Answers: 1
How to check if a method was not invoked with mockk?
I need to check if a method was not invoked in my unit tests. This is an example test I did that checks if the method was invoked and it works perfectly fine:
@Test
fun viewModel_selectDifferentFilter...

Pierre Vieira
Votes: 0
Answers: 1