assertj / assertj/assertj

Improve 'Expecting code to raise a throwable' when lambda returns a value

Open
#3,043 4 comments 0 reactions 1 assignee Claimed by @scordio View on GitHub
Dominant language
Java
Stars
2.8k
Forks
788
Avg merge
14h 57m
Merged PRs (30d)
36

Description

`assertThatThrownBy` throws "Expecting code to raise a throwable" when called code doesn't throw.
When test assertion fails, it's tempting to know what did the code do instead.

Enhance "Expecting code to raise a throwable" to mention produced value in case when the lambda is a producer.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.