alexruiz / fest-assert-2.x

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

Missing methods to check min and max List size #130

Closed renegrob closed 3 years ago

renegrob commented 11 years ago

It would be nice to be able to write something like: assertThat(myList).size().isGreaterThan(3);

Is it feasible that size() returns a SizeAssertion while isGreater returns again the original ListAssertion?

joel-costigliola commented 11 years ago

You can do this, it's almost what you are asking :

assertThat(myList.size()).isGreaterThan(3);

BTW, I don't think it's a good idea to switch between assertions type (in your example SizeAssertion then ListAssertion) because it's confusing when you read the code.

If it's ok for you, please close this issue.

Regards,