Can one reduce the number of type parameters? : <p>I find it annoying that one has to specify the types of both Foo and FooFactory in the call to RunTest below. After all, if the test knows the type of the Factory, the type the Factory is creating is implied. Assuming I want to run a lot of different factory tests for factories of different classes, that's a lot of angle brackets, and it gets worse with richer type hierarchies. I'm wondering if it is possible to restructure this so that the test is more concise.</p>

<pre><code>public class Foo
{
}

public interface IFactory&lt;T&gt;
{
    T Create();
}

public class FooFactory : IFactory&lt;Foo&gt;
{
    public Foo Create()
      =&gt; new Foo();
}

public class FactoryTest
{
    internal void RunTest&lt;TFactory, T&gt;(TFactory factory)
        where TFactory : IFactory&lt;T&gt;
    {
        T t = factory.Create();
        Assert.NotEqual(default(T), t);
    }

    [Fact]
    public void FooFactoryWorks()
    {
        RunTest&lt;FooFactory, Foo&gt;(new FooFactory());
    }
}
</code></pre>
