You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
action.Should().Throw<TargetInvocationException>().WithInnerExceptionExactly<TException>()// <--- known at compile time.Where(x => x.Message ==message).And.ParamName.Should().Be(paramName);
Problem
The above assumes I know TException at compile time. But what if I don't?
dennisdoomen
changed the title
[Feature Request] Non-generic overload for WithInnerExceptionExactly
Non-generic overload for WithInnerExceptionExactly
Aug 6, 2021
Background
I can do this:
Problem
The above assumes I know
TException
at compile time. But what if I don't?I can rewrite it using a trick I learnt from @dennisdoomen, like this:
But then I can't chain
.Where
etc.Feature Request
I read the exception docs but couldn't find a workaround.
Please consider adding an overload that take an instance:
Versions
The text was updated successfully, but these errors were encountered: