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

NUnit analyzer emits NUnit1027 error on Property tests with arguments #623

Open
lucasteles opened this issue Nov 4, 2022 · 6 comments
Open
Labels

Comments

@lucasteles
Copy link

NUnit have an analyser package to help on common mistakes

One of them is when you expect arguments in an [Test], it gives the NUnit1027 error. It predicts that only [TestCase] can have parameters.

So, as our PropertyAttribute inherits from TestAttribute the analyzer will accuse error

Workarounds:

  • Shutdown the NUnit1027 check

Would be good to not have this kinda error in a basic test setup

@ploeh
Copy link
Member

ploeh commented Nov 4, 2022

Isn't this a bug in the NUnit analyzer package?

@kurtschelfthout
Copy link
Member

Agree with @ploeh, there doesn't seem to be a concrete action we can take on the FsCheck side? Not inheriting from TestAttribute is not an option.

@ploeh
Copy link
Member

ploeh commented Nov 5, 2022

Have you tried reporting this to the NUnit team?

@lucasteles
Copy link
Author

Have you tried reporting this to the NUnit team?

No, I will open a similar issue there

@bartelink
Copy link
Contributor

@lucasteles When that's done, suggest posting a link here (or referencing this issue in the one you're logging) and closing this issue

@mmcedora
Copy link

See also: #637

@kurtschelfthout kurtschelfthout changed the title Tests with [Property] attibute gives NUnit1027 when tests have arguments NUnit analyzer emits NUnit1027 error on Property tests with arguments Jul 23, 2023
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

5 participants