Using xUnit.net, it is possible for a Theory to have its MemberData originate from a derived class?
public abstract class BaseTest
{
public abstract IEnumerable<object[]> Data();
[Theory]
[MemberData(nameof(Data))]
public void TestData(string expected, string actual)
{
// assert goes here
}
}
public class ComplexTest : BaseTest
{
public override IEnumerable<object[]> Data()
{
// data goes here
}
}
The code above results in the following error message:
System.NotSupportedException : Specified method is not supported.