Use Values- and Range-Attribute in NUnit TestFixture constructor
<p>I have multiple test methods which should test all possible combinations of multiple parameters. I can use the <em>NUnit</em> <em>ValueAttribute</em> or <em>RangeAttribute</em> on methods like this:</p>

<pre><code>[TestFixture]
public class MyExampleTests
{
    [Test]
    public void TestedEntity_GivenParemeter_Passes(
        [Values(1, 2)] int inputA,
        [Range(1, 4)] int inputB)
    {
        if (inputA &gt; 0 &amp;&amp; inputB &gt; 0)
            Assert.Pass();
    }
}
</code></pre>

<p>However, in my real-world case there are 4 parameters, a dozen methods and more values, so it becomes tedious to write out all the values for every method and if I want to make a change, I might make a mistake somewhere.</p>

<p>How can I move the test generation for all value combinations away from the individual methods and into the <em>TestFixture</em> body? The following doesn't work, but it would be what I want:</p>

<pre><code>[TestFixture]
public class MyExampleTests2
{
    readonly int inputA;
    readonly int inputB;

    public MyExampleTests2(
        [Values(1, 2)] int inputA,
        [Range(1, 4)] int inputB)
    {
        this.inputA = inputA;
        this.inputB = inputB;
    }

    [Test]
    public void TestedEntity_GivenParemeter_Passes()
    {
        if (this.inputA &gt; 0 &amp;&amp; this.inputB &gt; 0)
            Assert.Pass();
    }
}
</code></pre>

<p>I already know that the <em>TestFixtureAttribute</em> can take parameters, but they don't work the way I want. I can only give each parameter a hardcoded value. Instead I want to use ranges and also let NUnit create a test for every combination. Also, I would like the solution to work in NUnit 2.6.4.</p>