Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
It seems like JMockit leaves mocked classes behind after test completes #365
I'm using JMockit 1.29 and JUnit 4.11 (with Hamcrest 1.3).
I have a project with about 3000 test methods, most of them in JUnit 3 style test classes (extends TestCase). When trying to add new, independent, tests based on JMockit I see random breakage of some of the old tests. When I get into the debugger I see JMockit interfering. I realize that the JMockit tests do not support Junit3 style API, but the old style test doesn't use anything JMockit related.
The attached file mixing-old-new.zip has a reproducible example. It has a JMockit test, a TestCase test and a domain object that is mocked in the former, not in the latter.