nunit/nunit-framework — pull request #147 by rprouse (2014-06-17 01:33:47+00:00)
Title: Fix for Issue #27 - Values attribute support for enum types

The Values attribute can now be used on Enum test parameters and it will generate tests for every enum value.

The issue originally suggested code like the following,

```C#
[Test]
public void MyTest([Values(typeof(MyEnumType))]MyEnumType myEnumArgument)
{
...
}
```

I thought this was unnecessarily complicated and redundant, so **I do not support this.**

Instead, this change supports the following format where you just use the `[Values]` attribute on an enum type and it will automatically expand to all possible Enum values.

Example:
```C#
[Test]
public void MyTest([Values]MyEnumType myEnumArgument)
{
...
}
```

This maintains the old behaviour in that if you use this on a non-Enum type, your test will be invalid. It also supports passing in specific enum values if you do not want to iterate all of the available values. This would have been lost if we went with the first unsupported format.