I'd like to assert that List<Achievement> contains a member of type
TestAchievement.
Here's my assertion:
List<Achievement> achievements; // Populated elsewhere
assertThat(achievements,hasItem(isA(TestAchievement.class)));
This doesn't compile, reporting the error:
The method assertThat(T, Matcher) in the type Assert is not applicable for the
arguments (List, Matcher>)
Using Hamcrest 1.1
Please see discussion here:
http://stackoverflow.com/questions/4981586/java-hamcrest-collection-contains-ite
m-of-type
Original issue reported on code.google.com by martypit...@gtempaccount.com on 13 Feb 2011 at 3:09
Original issue reported on code.google.com by
martypit...@gtempaccount.com
on 13 Feb 2011 at 3:09