How to implement custom Nunit Attribute on a [UnityTest] Test Framework 1.3.0

Hi,

How are you supposed to write a test attirbute for a test marked with UnityTest On the test framework 1.3.0?

The TestCommandBuilder has the following:

                if (testReturnsIEnumerator && !(command is IEnumerableTestMethodCommand))
                {
                    command = TryReplaceWithEnumerableCommand(command);
                    if (command != null)
                    {
                        continue;
                    }
                   
                    var message = String.Format("'{0}' is not supported on {1} as it does not handle returning IEnumerator.",
                        wrapper.GetType().FullName,
                        GetTestBuilderName(test));
                    return new FailCommand(test, ResultState.Failure, message);
                }

IEnumerableTestMethodCommand is marked internal, so you can’t extend it. TryReplaceWihtEnumerable hardcodes a couple of known classes.

I can get my enumerable test method attribute to work if I mark IEnumerableTestMethodCommand as public… is there a way to make internals for the testing framework visible to an assembly… or something??

aha - IOuterUnityTestAction let’s you do something - Would still be nice if IEnumerableTestMethodCommand was public to get access to the context and such.

There’s a dedicated forum for Test Automation here. I’ll move your post for you.