当我尝试导入org.junit.Test时,我得到'导入org.junit.Test与同一文件中定义的类型冲突'错误。我可以导入前后没有任何问题。当使用@Test注释时,Eclipse无法识别,因此不会让我以这种方式导入它。
进口:
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
Maven依赖:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>