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, get error when using mockkstatic for stub static function
using io.mockk 1.11.0
having some class with @JvmStatic function
class LogUtil {
@JvmStatic
fun logData(jsonStr: String) {
val jsonObj = getDataJson(jsonStr)
if (jsonObj == nul...
lannyf
Votes: 0
Answers: 1
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
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
mockito, in koltin how to verify a static method
Having a kotlin singleton static method
internal object TestSingleton {
@JvmStatic
fun staticMethod1 (str: String) {
println("+++ === +++ TestSingleton.staticMethod(), $str")...
lannyf
Votes: 0
Answers: 1