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
In a unit test class that sets up members during "[SetUp]", VS Code displays the warning CS8618 (must contain non-null value). The code works as expected (dotnet format, dotnet test). Rider does not show this warning for the same test class.
Steps To Reproduce
Add a field with an object inside a test class
Add reference to Nunit analyzers through Directory.Packages.props, Directory.Test.props
Initialize the field inside the [SetUp] Method.
Expected Behavior
The Nunit.Analyzers contain a suppressor rule that should suppress that warning about null if field is initialized in [SetUp].
Environment Information
OS: Linux, Ubuntu 22.04
dotnet 8.0.404 (unpacked tar.gz, available on $PATH through direnv)
VS Code 1.95.3
C# Dev Kit 1.13.9
The text was updated successfully, but these errors were encountered:
Describe the Issue
In a unit test class that sets up members during "[SetUp]", VS Code displays the warning CS8618 (must contain non-null value). The code works as expected (dotnet format, dotnet test). Rider does not show this warning for the same test class.
Steps To Reproduce
Expected Behavior
The Nunit.Analyzers contain a suppressor rule that should suppress that warning about null if field is initialized in [SetUp].
Environment Information
The text was updated successfully, but these errors were encountered: