RDT00003: Test case arity
Severity: Warning · Family: RDT (RDCore.UnitTesting) · Raised by: TestShapeAnalyzer
A '@TestCase row gives fewer values than its test has required parameters, or more values than its test has parameters.
Each value of a row is the argument of the test's parameter at the same position. A row must give a value for each parameter that is not Optional, and no more values than the test has parameters, unless the last one is a ParamArray.
It is reported at the row. The values' types are not checked: a value that does not fit its parameter's type fails that row when the test runs.
How it is raised
| Situation | Example | Resolution |
|---|---|---|
| A row with too few values. | '@TestCase(2) above Public Sub Adds(ByVal a As Long, ByVal b As Long, ByVal sum As Long). |
Give a value for each required parameter: '@TestCase(2, 3, 5). |
| A row with too many values. | '@TestCase(2, 3, 5, 7) above the same test. |
Remove the extra value, or add the parameter it is for. |
See also
- RDT00002: Test parameters without rows