Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Property | Value |
---|---|
Rule ID | MSTEST0042 |
Title | Avoid duplicated 'DataRow' entries |
Category | Usage |
Fix is breaking or non-breaking | Non-breaking |
Enabled by default | Yes |
Default severity | Warning |
Introduced in version | 3.9.0 |
Is there a code fix | No |
Cause
A test method has two or more DataRow attributes that are equivalent.
Rule description
DataRowAttribute is used to denote inputs to test methods. It's not expected that a test will intentionally run twice with the exact same data. Duplicated DataRow
s are often a copy/paste error.
How to fix violations
Either remove the duplicate DataRow
attribute, or fix it to make unique.
When to suppress warnings
Do not suppress a warning from this rule, unless you intended to use the same input more than once.