1

Closed

TestClassCommandRunner.Execute() does not pass a custom IMethodInfo from EnumerateTestMethods() to EnumerateTestCommands()

description

A custom IMethodInfo instance that I construct inside EnumerateTestMethods() never shows up inside EnumerateTestCommands().

TestClassCommandRunner.Execute() appears to unwrap my custom IMethodInfo implementation to pull out the nested System.Reflection.MethodInfo, then rewrap that into the default Xunit.Sdk.Reflector+ReflectionMethodInfo using Reflector.Wrap(IMethodInfo). As a result, the custom context that I constructed inside EnumerateTestMethods() is gone when I get control back to operate on that test method inside EnumerateTestCommands().

file attachments

Closed Jul 12, 2009 at 6:20 AM by
Shipped in xUnit.net 1.5 CTP 2

comments

DavidAlpert wrote May 22, 2009 at 5:51 PM

Here is a patch that I causes my test to pass without breaking any other tests.