नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
| 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 DataRows 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.