Tuesday, 15 March 2011

java - How to use Mockito to show all invocations on a mock -



java - How to use Mockito to show all invocations on a mock -

i have unit test failing , i'm unsure why. want able see invocations on mock occur in scheme under test. not behavior want tests always, test need tweak able figure out what's wrong.

however, seems kind of hack. is possible natively in mockito, without having utilize thread.currentthread().getstacktrace()?

this not preferred, because stack trace includes other invocations used internally mockito.

this feature builtin since mockito 1.9.5. utilize

mock(classtomock.class, withsettings().verboselogging())

java unit-testing debugging junit mockito

No comments:

Post a Comment