Hi all, how do I mockk a setter? Gettng complaints...
# mockk
t
Hi all, how do I mockk a setter? Gettng complaints in test because the setter is called at init time of a mocked object.
every {mocked.myProperty } returns "some"
mockes the getter. How do I do the same for the setter?
Somewat solved it by setting the mock to "relaxed". Now Mockk does not require all methods called to be mocked explicitly.
e
You can use
every { mocked.myProperty = any() /* or some other matcher */ } just runs
614 Views