public IEnumerable <IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) { var result = new List <IXunitTestCase>(); var types = factAttribute.GetNamedArgument <Type[]>("Types"); foreach (var type in types) { var typeInfo = new ReflectionTypeInfo(type); var genericMethodInfo = testMethod.Method.MakeGenericMethod(typeInfo); var genericTestMethod = new GenericTestMethod(testMethod.TestClass, genericMethodInfo, typeInfo); result.Add( new XunitTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), genericTestMethod)); } return(result); }
public void SetUp() { MethodInfo testMethod = typeof(FakeTestFixture <>).GetMethod("FakeTestMethod"); _testCase = new GenericTestMethod(testMethod); }