I have the following test case in eclipse, using JUnit 4 which is refusing to pass. What could be wrong?
@Test(expected = IllegalArgumentExc
Just ran this in IntelliJ using JUnit 4.4:
@Test(expected = IllegalArgumentException.class)
public void testExpected()
{
throw new IllegalArgumentException();
}
Passes perfectly.
Rebuild your entire project and try again. There's something else that you're doing wrong. JUnit 4.4 is working as advertised.