Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add exception property to IInvocation #1077
Add exception property to IInvocation #1077
Changes from 15 commits
cc90a0f
2a6a5f4
01b9329
dd5c654
1936182
67793f3
e49273f
a66310e
1e18aff
988feb0
a18d167
31f5ec7
09816d0
a064c98
22f3575
f2cfc4c
0ae9189
6055015
e1fa793
b2c07f3
b9a4d63
3f2a43b
3b5be64
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good of you for thinking of this test case! (I didn't.)
Something's odd here—invocations should get recorded even when
mock.CallBase == true
. I think the reason why no invocations get recorded here is thatList<>.GetRange
is not virtual.Could you change this test so it calls some overridable method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't think of the virtual requirement. I will add another test and change the code comment accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added another test 09816d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this test completely. It really targets
List<>.GetRange
, and nothing from Moq. What's more, it contains a factually incorrect statement in the comment,// Base-call exceptions are not recorded
. All things considered, this test as it stands will potentially raise more questions than it answers.(The newly added test is fine, though!)