Configuration: Mockito 1.5, TestNG 5.8 jdk15, maven-surefire 2.4.2
Don't use mockito matchers (anyInt, anyString, ...) to 'mock' arguments for non-mocked/stubbed method calls. Using matchers this way can cause unpredictable test failures, as the state of matchers is being tracked statically (simpliest explanation I could come up with without digging into source). You might get an InvalidUseOfMatchersException in a test case different to the one matchers were used in.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment