-
Notifications
You must be signed in to change notification settings - Fork 223
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
UTs: Replace Moq with NSubsitute #9206
Conversation
91e088a
to
b0af752
Compare
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.
Looks good!
tree.SetupGet(x => x.Encoding).Returns(() => null); | ||
var tree = Substitute.For<SyntaxTree>(); | ||
tree.FilePath.Returns("File.Generated.cs"); // Generated to simplify mocking for GeneratedCodeRecognizer | ||
tree.Encoding.Returns(x => null); |
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.
tree.Encoding.Returns(x => null); | |
tree.Encoding.Returns(_ => null); |
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 don't like discards on the source side. The x
doesn't cost anything, the _
costs changing it to x
incase we'd use it in the future
@pavel-mikula-sonarsource this was approved with a minor comment, I'm not sure why the card didn't move to the approved column. Feel free to merge after rebase |
6b073ed
to
1ebfdb0
Compare
|
|
No description provided.