On 2014-08-28, <jlboud...@apache.org> wrote:

> workwaround to fix unit tests as Hamcrest's IsCollectionContaining seems buggy

actually, it is Hamcrest's isA matcher that is borked, stumbled over it
myself a few times.

> -        assertThat(project.getBuildListeners(), 
> hasItem(isA(MultiModuleLogger.class)));

here isA(MultiModuleLogger.class) is a Matcher<MultiModuleLogger> rather
than a Matcher<?> or Matcher<Object>, this is pretty much useless.

In your case hasItem wants a Matcher<? super BuildListener> and
MultiModuleLogger is not a lower bound of BuildListener.

https://github.com/hamcrest/JavaHamcrest/issues/27

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to