Skip to content
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

Review NUnit1030 #1024

Open
atifaziz opened this issue Oct 25, 2023 · 0 comments
Open

Review NUnit1030 #1024

atifaziz opened this issue Oct 25, 2023 · 0 comments
Labels

Comments

@atifaziz
Copy link
Member

atifaziz commented Oct 25, 2023

In PR #1023, updating the NUnit.Analyzers to version 3.8.0 introduced NUnit1030 warnings/errors:

A:\MoreLINQ\main\MoreLinq.Test\NullArgumentTest.cs(33,31,33,58): error NUnit1030: The TestCaseSource provides type 'NUnit.Framework.Interfaces.ITestCaseData', but the Test method expects type 'System.Action' for parameter 'testCase' (https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit1030.md)
A:\MoreLINQ\main\MoreLinq.Test\NullArgumentTest.cs(37,31,37,60): error NUnit1030: The TestCaseSource provides type 'NUnit.Framework.Interfaces.ITestCaseData', but the Test method expects type 'System.Action' for parameter 'testCase' (https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit1030.md)
A:\MoreLINQ\main\MoreLinq.Test\ReturnTest.cs(151,25,151,51): error NUnit1030: The TestCaseSource provides type 'NUnit.Framework.Interfaces.ITestCaseData', but the Test method expects type 'System.Action' for parameter 'unsupportedAction' (https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit1030.md)

Since all tests pass regardless, the severity of NUnit1030 was demoted to suggestion:

# NUnit1030: The type of parameter provided by the TestCaseSource does not match the type of the parameter in the Test method
dotnet_diagnostic.NUnit1030.severity = suggestion

It should be reviewed and ideally restored to a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant