Closed GoogleCodeExporter closed 9 years ago
Posting my proof of concept, which I'm tracking here:
https://bitbucket.org/pdurph/hamcrest
Original comment by me%jnova...@gtempaccount.com
on 17 Oct 2011 at 1:17
Attachments:
If I am not mistaken, containsInAnyOrder does what you want.
Note that you must create the list of matchers for containsInAnyOrder as
List<Matcher<? super Bar>>. If you simply use a List<Matcher<Bar>>
assertThat will complain:
"The method assertThat(T, Matcher<T>) in the type Assert is not applicable for
the arguments (List<Bar>, Matcher<Iterable<? extends List<Matcher<Bar>>>>)"
Original comment by dietrich...@gmail.com
on 26 Oct 2011 at 11:28
I saw containsInAnyOrder(), but it merely ensures that the target object is a
superset of the expected list, and would have to be combined with a size
equality check. I'm looking to do both in 1 Matcher.
Original comment by jno...@adconion.com
on 26 Oct 2011 at 1:36
containsInAnyOrder() does what you need. It is badly named.
Original comment by smgfree...@gmail.com
on 25 Apr 2012 at 11:09
Original comment by smgfree...@gmail.com
on 25 Apr 2012 at 11:10
Original issue reported on code.google.com by
me%jnova...@gtempaccount.com
on 17 Oct 2011 at 1:05