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
304NotModified
changed the title
When Throws gives a CouldNotSetReturnDueToNoLastCallException
.When(...).Throws gives a CouldNotSetReturnDueToNoLastCallException
Apr 30, 2024
I think adding Throws as an alias to Throw on WhenCalled might be the easiest way to do this (that should take precedence over the extension method). Could make as [Obsolete] with an explanation if we want to encourage the "correct" use here.
Describe the bug
This is of course a bug in the user code, as we should use
Throw
instead ofThrows
. But the exception is at least not clearAnd it's confusing, IntelliSense in VS 2022 also suggest throws:
To Reproduce
See #802
Expected behaviour
Environment:
Additional context
The analyzer gives a error, but that one is still a bit confusing
There are multiple options:
WhenCalled
(not sure if this is a binary breaking change?)void
The text was updated successfully, but these errors were encountered: