IntelliJ flags static import of assertEquals as unused - even though it is used.

已回答

Hi!

I've got the following import:

import static org.junit.Assert.assertEquals;

And I have the following test code in that test class:

assertEquals(BigInteger.ONE,actual.getFoo());

Any idea what's going on and why IntelliJ thinks the import is unused? It removed it when I asked it to organize imports, and not just in one class. This is really annoying...

1

Please share a sample project to reproduce the problem. Also specify your IDE version.

0

请先登录再写评论。