shubhj / instinct

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

IterableChecker should have a containsOnly method or something. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to check that a list contains only a set collection of items
(or item) and no others.

Original issue reported on code.google.com by robl...@gmail.com on 21 May 2007 at 4:44

GoogleCodeExporter commented 9 years ago

Original comment by tomjad...@gmail.com on 21 May 2007 at 4:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Added methods hasTheSameContentAs(Collection<E>) and hasTheSameContentAs(E...) 
to
Collection checker. These checkers only check content and not the order of 
elements. 

Essentially where collection1.equals(collection2) would fail, the checker would 
pass,
if the contents were the same.

See AFixedDefect3 for example usage.

Original comment by zed...@gmail.com on 7 Dec 2007 at 6:27