Skip to content

Loading…

Missing methods to check min and max List size #130

Open
renegrob opened this Issue · 1 comment

2 participants

@renegrob

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
Collaborator

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.