How to verify exception parameter value? #1928
-
I know I can use this: act.Should().Throw<SomeException>().Where(ex => ex.MyList.Count > 3); but I don't feel that's optimal. Is there a better way to assert this condition and have a better message like when using Should on a variable? |
Beta Was this translation helpful? Give feedback.
Answered by
dennisdoomen
May 18, 2022
Replies: 1 comment 1 reply
-
Something like this? act.Should().Throw<SomeException>().Which.MyList.Should().HaveCountGreaterThan(3); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
stecydube
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this?