オンhasItems
になっている「実際の」コレクションでHamcrest を使用したいArrayList<? extends SomeInterface>
assertThat(ArrayList<? extends SomeInterface>, hasItems(InstanceOfSomeInterface))
コンパイラは次のように述べています。
assertThat(T, Matcher<T>)
型のメソッドAssert
は引数に適用できません(ArrayList<capture#9-of ? extends MyInterface>, Matcher<Iterable<MyInterface>>)
何がうまくいかないのですか?それについて私は何ができますか(私は本当にここでHamcrestを使いたいです)?