joel-costigliola / assertj

AssertJ documentation
60 stars 30 forks source link

Present exception testing with Lambda. #15

Closed stefanbirkner closed 9 years ago

stefanbirkner commented 9 years ago

Testing assertions could be easily done with Java 8 Lambdas. This pull request presents a solution that uses the Fishbowl library.

joel-costigliola commented 9 years ago

We already have implemented exceptions assertions using lambda (in java-8 branch), you can have a look at this test.

Anyway, AssertJ policy is not to rely on third party library.

stefanbirkner commented 9 years ago

Nice coincidence that we have chosen the same wording :-) I didn't know of the java-8 branch.

joel-costigliola commented 9 years ago

Nice indeed ! :) We had a long debate to get a good wording and your suggestion makes me think we choose this one right.

joel-costigliola commented 9 years ago

And if you want to play with assertj-core for java 8, I have released a milestone to get some feedback. It's available here : http://search.maven.org/#artifactdetails|org.assertj|assertj-core-java8|1.0.0m1|bundle.