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
We have a unit test that verifies the message we receive when a sequenced setup is not run, but with version 4.10+ the message is no longer displaying the expression. Instead, it displays the full name of the type and method, which is the default ToString() output. I originally thought this may be an issue with Moq.Sequences, however it seems to be originating inside Moq.
To reproduce the issue here is a simple unit test:
@jacob-ewald: Sounds like a reasonable enhancement! I suppose it would make sense for all fluent API types' ToString methods to simply delegate to the ToString method of the setup that they're wrapping. Your PR would be welcome. It'd be great if you could make the change for all ...Phrase classes.
Thanks @stakx. I created PR #812. I did not add handling for WhenPhrase because that works on Func<bool>, which doesn't play nicely with the ExpressionStringBuilder.
We have a unit test that verifies the message we receive when a sequenced setup is not run, but with version 4.10+ the message is no longer displaying the expression. Instead, it displays the full name of the type and method, which is the default
ToString()
output. I originally thought this may be an issue with Moq.Sequences, however it seems to be originating inside Moq.To reproduce the issue here is a simple unit test:
Expected:
x => x.DoThings(null)
Actual:
I can submit a PR to fix this (simply overridding the
ToString()
onSetupPhrase
), but wanted to see if that would be welcome first. Thanks!The text was updated successfully, but these errors were encountered: