My maven project includes
186 <dependency>
187 <groupId>org.hamcrest</groupId>
188 <artifactId>hamcrest-all</artifactId>
189 <version>1.3</version>
190 </dependency>
When i type assertThat
..
I'd like for IDEA to figure out that the following is needed
import static org.hamcrest.MatcherAssert.assertThat;
Instead i get this.
How can this corrected? How can i get IDEA to perform a static import?
Open the parentheses and you will get a prompt for statically importing the method. IntelliJ won't understand it's a method you're trying to reference until you add the parenthesis.
In other words, type assertThat(
and then ALT-ENTER.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With