FsCheck icon indicating copy to clipboard operation
FsCheck copied to clipboard

NUnit analyzer emits NUnit1027 error on Property tests with arguments

Open lucasteles opened this issue 2 years ago • 6 comments

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

lucasteles avatar Nov 04 '22 14:11 lucasteles

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

ploeh avatar Nov 04 '22 14:11 ploeh

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.

kurtschelfthout avatar Nov 04 '22 22:11 kurtschelfthout

Have you tried reporting this to the NUnit team?

ploeh avatar Nov 05 '22 07:11 ploeh

Have you tried reporting this to the NUnit team?

No, I will open a similar issue there

lucasteles avatar Nov 05 '22 20:11 lucasteles

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

bartelink avatar Nov 07 '22 09:11 bartelink

See also: https://github.com/fscheck/FsCheck/issues/637

mmcedora avatar Jul 20 '23 14:07 mmcedora