【发布时间】:2016-07-14 05:59:51
【问题描述】:
一直在使用 @Rule 从 junit 使用 4.12。不过今天更新到4.5
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
</dependency>
编译代码时出错
@Rule
public TestName name = new TestName();
包 org.junit.rules 不存在
找不到符号 [ERROR] 符号:类规则 [ERROR] 位置:包 org.junit
这个被删除了吗?有什么替代品吗?
【问题讨论】:
标签: java maven junit junit4 rule