question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NUnit analyzer emits NUnit1027 error on Property tests with arguments

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bartelinkcommented, Nov 7, 2022

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

0reactions
mmcedoracommented, Jul 20, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tests with custom `[Test]` attibute gives NUnit1027 when ...
NUnit have an analyser package to help on common mistakes One of them is when you expect arguments in an [Test], it gives...
Read more >
NUnit1027
The test method has parameters, but no arguments are supplied by attributes ; Id, NUnit1027 ; Severity, Error ; Enabled, True ; Category,...
Read more >
NUnit Testing failed even though there are arguments
I am trying to do a test to check the View returns the correct string. I am very new to NUnit testing, and...
Read more >
NUnit Tutorial: Parameterized Tests With Examples
In this guide, we will showcase NUnit parameterized test cases along with the commonly used attributes like the TestFixture NUnit attribute.
Read more >
Code Inspection: NUnit. Incompatible argument type or ...
This inspection notifies you about mismatch of the type of a value that you pass to your test via the TestCase argument and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found