Parameterized testing runs one test logic with multiple input and expected-result sets. It groups similar facts about a unit’s behavior, reducing duplicated test code. section 3.5
Use it when:
- Several tests differ only in their input values or expected results. section 3.5
- Each data row represents a separate fact, while the test method supplies shared execution logic. section 3.5
- Keep separately named tests when descriptive scenario names matter more than reducing code, especially for positive cases. section 3.5
Delivery-date validation
A theory can test -1, 0, 1, and 2 days from now with expected results false, false, false, and true. Simple rows fit InlineData; complex cases can come from generated member data. section 3.5
Figure 3.2. A typical application exhibits multiple behaviors. The greater the complexity of the behavior, the more facts are required to fully describe it. Each fact is represented by a test. Similar facts can be grouped into a single test method using parameterized tests.
Use the figure to distinguish individual behavioral facts from similar facts grouped into one parameterized test. section 3.5

