jocarreira / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

provide equalMatcher for collections #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The hamcrest API in trunk has a IsIterableContainingInOrder matcher which 
allows me to write a test 
as follows:
assertThat(list, contains("foo", "bar"));

However if I also need to assert the size of the collection, I need to add 
another assert for the size. 
It would be great if there was another IsIterableEqualToOtherInOrder.

I'm willing to file a patch if this makes sense for hamcrest.

Original issue reported on code.google.com by ketanpad...@gmail.com on 29 Aug 2008 at 10:55

GoogleCodeExporter commented 8 years ago
Equals is defined for collections, so just using equalTo should be fine.

Original comment by nat.pr...@gmail.com on 15 Oct 2008 at 9:16