What's the recommended way to work around IDE0058 for mocks? #1486
-
If I do mock.Setup(library => library.DownloadExists("2.0.0.0")).Returns(true); with
If I want to keep |
Beta Was this translation helpful? Give feedback.
Answered by
kzu
Jul 24, 2024
Replies: 1 comment
-
Yep, since you can keep invoking more methods after Returns, you'll get that warning. I'd disable it globally for all test projects, something like: # Test settings
[**/*Tests*/**{.cs,.vb}]
# Remove unnecessary expression value
dotnet_diagnostic.IDE0058.severity = none |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Bartleby2718
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, since you can keep invoking more methods after Returns, you'll get that warning. I'd disable it globally for all test projects, something like: