Java | Technology
WTP, M2 eclipse plugin integration rramaswamy 08 Feb, 2008
If you are using Eclipse to write your JUnit 4 tests you might have noticed that when you organize the imports, the line import static org.junit.Assert.*;
at the top of your JUnit 4 classes is replaced by stuff like: import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotNull;
While your code still compiles and runs OK, this forces you to add another specific static import every time you want to use another static assert method like assertEquals. Luckily this can be fixed by going to Windows/Preferences..., going to the Java/Code Style/Organize Imports tab and then entering 1 where it says "Number of static imports needed for .*" and then clicking the OK button. Hope this helps!