Autofixture has the ability to create an instance of any type using the Fixture.Create<T>()
method.
But I need to create a type at runtime. By default the non-generic Fixture.Create()
expects a 'seed', which is not what I want.
How do I create an instance of a given type at runtime?
By looking through the Autofixture source code I worked out I can do it like so:
Not sure if it's the best way, but it seems to work.