Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define lazy version of `AssertionScope.FailWith` #921

Merged
merged 4 commits into from Sep 25, 2018

Conversation

@krajek
Copy link
Contributor

krajek commented Sep 20, 2018

Follow up for #915.

A lazy version of FailWith is useful when calculations of messages are "expensive' and could be delayed until we are that we will throw. FA main scenario is that most tests do not fail, so I think it makes sense to take care of performance in that case.

Of course, as usual, tests for new functions are added.

I am curious about your comments @jnyrup @dennisdoomen.

@jnyrup

This comment has been minimized.

Copy link
Collaborator

jnyrup commented Sep 24, 2018

I like this addition, it complements Given() which added lazy evaluation of subsequent assertions.

@jnyrup
jnyrup approved these changes Sep 25, 2018
@dennisdoomen dennisdoomen merged commit 2dc2217 into fluentassertions:master Sep 25, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@krajek krajek deleted the krajek:lazy_fail_with branch Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.