Closed BenoitDuffez closed 6 years ago
Fixed it by replacing anyArray<CustomerSite>().toList()
with any()
. No idea why this changes how the mocks are called, because I did that change (from any()
) because it complained about the type not being able to capture what the actual code is calling.
Hello, I'm rather new to Kotlin and unit testing using mockito, se please bear with me and point me to the correct information if what I ask is dumb or badly explained.
I have the following test which passes:
However if I run the whole test suite in that class, Mockito warns me:
Line 175 is highlighted. This is weird because the actual code under test is:
I have run it step by step, the
setSitesSyncSuccess
method from the customers repository mock is called. I have checked also that thecustomersRepository
object is indeed the mock created in the test.What's weirder is that when translated to java, the test passes and I don't have the warning from Mockito:
Is it related to this lib?