【发布时间】:2012-10-30 23:07:11
【问题描述】:
我的 maven 项目包括
186 <dependency>
187 <groupId>org.hamcrest</groupId>
188 <artifactId>hamcrest-all</artifactId>
189 <version>1.3</version>
190 </dependency>
当我输入assertThat ..
我想让 IDEA 弄清楚需要以下内容
import static org.hamcrest.MatcherAssert.assertThat;
相反,我得到了这个。
如何纠正?如何让 IDEA 执行静态导入?
【问题讨论】:
-
顺便说一句:您可能希望在 Hamcrest 和其他测试库的依赖项声明中包含
<scope>test</scope>。
标签: java intellij-idea hamcrest