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

Open
mkarneim opened this Issue Nov 13, 2012 · 5 comments

Comments

Projects
None yet
4 participants
@mkarneim

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.

  • Michael

(PS: Thanks for this great tool!)

@joel-costigliola

This comment has been minimized.

Show comment
Hide comment
@joel-costigliola

joel-costigliola Nov 17, 2012

Contributor

I agree, accepting empty values makes sense.

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

Contributor

joel-costigliola commented Nov 17, 2012

I agree, accepting empty values makes sense.

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

@ghost ghost assigned alexruiz Jan 10, 2013

@alexruiz

This comment has been minimized.

Show comment
Hide comment
@alexruiz

alexruiz Jan 10, 2013

Owner

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

Owner

alexruiz commented Jan 10, 2013

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

@mkarneim

This comment has been minimized.

Show comment
Hide comment
@mkarneim

mkarneim Jan 11, 2013

Nice, thank you.

Nice, thank you.

@aaschmid

This comment has been minimized.

Show comment
Hide comment
@aaschmid

aaschmid Apr 3, 2013

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

... and probably some more assertion methods.

aaschmid commented Apr 3, 2013

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

... and probably some more assertion methods.

@joel-costigliola

This comment has been minimized.

Show comment
Hide comment
@joel-costigliola

joel-costigliola Apr 15, 2013

Contributor

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

Contributor

joel-costigliola commented Apr 15, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment