Issue
I am running a few tests right now in which I mock one of my interfaces like this:
interface = mock(InterfaceView.class);
I then try to verify one of my methods off of this interface but continually get an error:
verify(interface).someMethod(objList);
The error I get here is Wanted but not invoked: interface.someMethod(...) , Actually, there were zero interactions with this mock.
Solution
mockito is actually telling you that your expectation was not met. You implemented your test to expect a call to that method (that's what verify does, unless you parametrize it to verify that never gets called), but your tested instance does not call it with the given parameters.
Answered By - albert_nil
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.