Why doesn't this code attempting to use Hamcrest's hasItems compile?

前端 未结 9 1844
耶瑟儿~
耶瑟儿~ 2020-12-03 00:49

Why does this not compile, oh, what to do?

import static org.junit.Assert.assertThat;
import static org.junit.matchers.JUnitMatchers.hasItems;

ArrayList<         


        
9条回答
  •  孤城傲影
    2020-12-03 00:52

    For these cases when code does compile in Eclipse but javac shows errors please do help hamcrest by providing explicitly type parameter e.g. Matchers.hasItem()

提交回复
热议问题