jocarreira / hamcrest

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

Create SameSize matcher #175

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To compare that two collections have the same number of elements, for example

    assertThat($cats, sameSize($dogs));

Alternatively--or in addition--overload arrayWithSize() to accept another array 
and use its count.

    assertThat($cats, arrayWithSize($dogs));

Original issue reported on code.google.com by dharkn...@gmail.com on 8 Feb 2012 at 2:25