I'm using Hamcrest matchers to assert that a list of strings contains a string, ignoring the case. My code is as follows:
assertThat("myList has the string", myList, Matchers.hasItem(Matchers.equalToIgnoringCase(string)));
But my java compiler is complaining about this line:
cannot find symbol
[ERROR] symbol : method assertThat(java.lang.String,java.util.List<java.lang.String>,org.hamcrest.Matcher<java.lang.Iterable<? super java.lang.Object>>)
Could anyone help me out with this error?
Thanks.