nunit Attributes TestCaseAttributeExample


Example

[TestCase(0, 0, 0)]
[TestCase(34, 25, 59)]
[TestCase(-1250, 10000, 8750)]
public void AddNumbersTest(int a, int b, int expected)
{
    // Act
    int result = a + b;
            
    // Assert
    Assert.That(result, Is.EqualTo(expected));
}