Replies: 1 comment 2 replies
-
Well, in this case, the message will have been |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've experimented a bit with using Microsoft.CodeAnalysis in order to improve the caller identification. So far it looks quite promising, and while the same thing could certainly be done using only string parsing, traversing SyntaxNodes is quite convenient and also permits line breaks etc. while scanning for the caller. Maybe it's overkill, but I think it would at least be nice to be able to swap out the CallerIdentifier or just ExtractVariableNameFrom.
Another thing that would be nice is to be able to augment the context for things like WhichValue. Currently, a failed assertion like:
dictionary.Should().ContainKey("Key").WhichValue.Should().Be(4);
will render a message like:
Expected dictionary to be 4
but we really didn't expect dictionary to be 4, but rather dictionary["Key"].
Beta Was this translation helpful? Give feedback.
All reactions