I use 15.0.4 IDEA Coomunity edtition (same trouble was for at least for 2 versions). Actually, I clicked something wrong and need help. :-) So... In pom.xml I have in list of my dependencies:
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.exparity</groupId>
<artifactId>hamcrest-date</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
And when I add in any method someting like that:
AssertThat(%someVariable%,is("someExpectedValue"))
And tries to auto-import there are only possibilities to auto-import from org.junit. But if I add
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
The assertion code works correctly. So, the problem is: my auto-import in IDEA don't offer to import hamcrest classes (before it worked, and I guess there are some settings or project properties issue...).
p.s. code completion does not work for assertThat (hamcrest) too. Instead of it i got a lot of SeleneseTestBase.assert%%.