As per the answer to the similar question found here I'm posting on meta to ask how my question:
Why/how does JUnit pass tests with compiler errors?
is a duplicate of this question:
Java: Unresolved compilation problem.
To repeat my edit:
- The question I'm supposed to be duplicating asks in the first line:
What are the possible causes of a "java.lang.Error: Unresolved compilation problem"?
- The title of my question states I'm asking:
Why/how does JUnit pass tests with compiler errors?
As in how can code which shouldn't compile be run by JUnit without causing errors?
I fully understand the causes of the Unresolved Compilation Error
, it's the obvious unresolved compilation error in my code. What I don't understand is how the error doesn't always occur (it only occurs when I specifically call an unimplemented method) and how the tests pass?!
It may be that these issues are related, but unless there is a specific answer explaining how they are related I fail to see how they are in any way duplicate questions...