Testing generic methods with MbUnit

Testing generic methods with different types is just as easy as anything else, with MbUnit:

[Test]
[Row(typeof(string))]
[Row(typeof(int))]
public void GenericTest<T>()
{
    GenericMethod<T>();
}

public void GenericMethod<T>()
{
    Console.WriteLine("T: {0}", typeof (T).FullName);
}

Leave a comment