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.
Showing posts with label usage. Show all posts
Showing posts with label usage. Show all posts
Tuesday, September 23, 2008
Subscribe to:
Posts (Atom)