ant junit task and @NotNull

Hi, all.

I used junit4, ant and the annotation @NotNull. When I run tests into IDEA, then my tests is ok. But if I run the ant "junit" task, then the same test fail.

Code :
//////////////////////////////////////////////////////////////////
@Test
public void testCheckNullAnnotation() {
String test = null;

try {
setNoNull(test);
Assert.fail("Fail ");
} catch (Exception e) {
}
}

private void setNoNull(@NotNull String in){
System.out.printf("inString="+in);
}

////////////////////////////////////////////////
build.xml :

]]>

//////////////////////////////////////
Anybody help me ?


Thanks.
Evgeny

Please sign in to leave a comment.