Possible Duplicate:
Hamcrest's hasItems
I've written a test using a hamcrest matcher that looks like:
@Test
public void testGenericsIsEmpty() {
List<String> myStrings = new LinkedList<String>();
assertThat((Collection)myStrings,is(empty()));
}
This works when I compile in Eclipse, but not outside of Eclipse. My maven project uses the eclipse compiler, so it compiles outside of Eclipse when using maven, but if I use the standard java compiler, it doesn't compile.
I get the error message
cannot find symbol method assertThat(java.util.Collection,org.hamcrest.Matcher>)
I'm using junit 4.10 and hamcrest 1.3.RC2.