0
一直在使用4.12
使用@Rule
從junit
。但今天更新到4.5更新的JUnit給出編譯錯誤在@rule和測試名
<!-- 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不存在
找不到符號[錯誤]符號:類規則[錯誤]地點:包org.junit
這個被刪除了嗎?任何替代方案?
我的不好,只是假設'4.12'像'4.1.2' – nullpointer