I just test the example given in the javadoc of hamcrest, It seems hasItem does
not work properly !
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.startsWith;
import java.util.Arrays;
import org.junit.Test;
public class Tester
{
@Test
public void test(){
assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith( "bar")));
}
}
Original issue reported on code.google.com by mohamed....@gmail.com on 8 Apr 2013 at 12:01
Original issue reported on code.google.com by
mohamed....@gmail.com
on 8 Apr 2013 at 12:01