https://kotlinlang.org logo
#mockk
Title
# mockk
a

Alessandro Tagliapietra

08/27/2019, 6:41 AM
Hello everyone, I'm using
mockkObject
to mock an object, since it's an object that makes external requests, is it possible to have the mocked version return an error if a method isn't mocked?
m

Mike

08/27/2019, 11:49 AM
I thought that was the default behaviour, hence the existence of relaxedMock.
a

Alessandro Tagliapietra

08/27/2019, 7:29 PM
Not in my case, if I only have
mockkObject(Client)
all the calls go through
maybe that's the case only for
mockk
as
mockkObject
doesn't have the relaxed option
m

Mike

08/27/2019, 8:25 PM
Ahhh, yes. Missed that you're mocking an object and not a class. Sorry about that.
39 Views