For a method whose signature looks like this:
public T Add<T>(T first, T second) where T : struct, IEquatable<T>, IComparable<T>
which can work with all of the integral types, do I need to write tests for each of those, e.g.
public void Test_Add_Int()
{
Assert.That(Add<int>(10, 20), Is.EqualTo(30));
}
public void Test_Add_UInt()
{
Assert.That(Add<uint>(10, 20), Is.EqualTo(30));
}
public void Test_Add_Long()
{
Assert.That(Add<long>(10, 20), Is.EqualTo(30));
}
...
or is it sufficient to only have Test_Add_Int
?