alexruiz / fest-assert-2.x

FEST Fluent Assertions 2.x
http://fest.easytesting.org
Apache License 2.0
402 stars 69 forks source link

Iterables.assertContainsExactly should not throw ex. if 'actual' and 'values' are empty #124

Open mkarneim opened 11 years ago

mkarneim commented 11 years ago

org.fest.assertions.internal.Iterables.assertContainsExactly(AssertionInfo info, Iterable<?> actual, Object[] values)

calls checkIsNotNullAndNotEmpty(values) and throws an IllegalArgumentException with message "The array of values to look for should not be empty" EVEN if values AND actual are empty.

But I would expect that it returns successfully.

(PS: Thanks for this great tool!)

joel-costigliola commented 11 years ago

I agree, accepting empty values makes sense.

Thanks for reporting this, we will fix it in the 2.0 version.

alexruiz commented 11 years ago

Great suggestion! Thanks Michael. The next milestone will fix this.

mkarneim commented 11 years ago

Nice, thank you.

aaschmid commented 11 years ago

same for org.fest.assertions.internal.Maps.assertContains ...

... and probably some more assertion methods.

joel-costigliola commented 11 years ago

For your information, this issue has been fixed in AssertJ a fork of Fest Assert 2.0M10.