Search code examples
eclipseassertjunit4

In Eclipse, how do I see the input to Assert.assertEquals when it fails?


I'm not much of an Eclipse guru, so please forgive my clumsiness.

In Eclipse, when I call Assert.assertEquals(obj1,obj2) and that fails, how do I get the IDE to show me obj1 and obj2?

I'm using JExample, but I guess that shouldn't make a difference.


Edit: Here's what I see:

(source: yfrog.com)
.


Solution

  • If the information in the JUnit view is not enough for you, you can always set a exception breakpoint on, for example, java.lang.AssertionError. When running the test, the debugger will stop immediately before the exception is actually being thrown.