Reputation: 35
Is it a bug in Eclipse? I have tried to refresh the project, restart Eclipse and system. Confused.
Upvotes: 0
Views: 58
Reputation: 719551
Is it a bug in Eclipse?
Nope. It is a bug in the project setup. It looks like the project's maven dependency for junit is incorrect.
You are using the wrong Junit JAR file for the test code you are trying to compile. The junit.framework.TestCase
class is from Junit 3, but you are using the JAR file for Junit 4.7. In Junit 4.x the package names changed to org.junit
, and the TestCase
class was dropped.
Solutions:
(At the time of writing, the latest release of Junit 4.x is 4.13.)
Upvotes: 1