Lambda Support to tidy up expectations
Open
- Dominant language
- HTML
- Stars
- 832
- Forks
- 303
- Avg merge
- 5h 25m
- Merged PRs (30d)
- 9
Description
Currently, when you write expectations you've got to deal with the fact that the signatures could throw. This means that your test methods need to indicate all of these exceptions even if they will never happen.
Java 8 Lambdas could ease this. For example:
```
EasyMock.expect(() -> {
EasyMock.expect(target.callThatThrows())
.andThrow(new Exception());
});
```
You could even extend this to do a Replay at the end of the lambda for all the mocks that were configured in it.
Contributor guide
Assessment
This issue has not been assessed yet.