I have an object model that uses Open Generics (Yes, yes, now I have two problems; that\'s why I\'m here :) :-
public interface IOGF
{
}
class C
{
AFICT there are no open generics in sight. D relies on IOGF which is a constructed type.
The error message isn't because of open generics, but because IOGF is an interface.
You can supply a mapping from IOGF to OGF like this:
fixture.Register>(() => fixture.CreateAnonymous>());
Since OGF relies on IX you'll also need to supply a mapping to X:
fixture.Register(() => fixture.CreateAnonymous());
That should do the trick.
However, as Nikos Baxevanis points out in his comment, if you use one of the three supplied auto-mocking extensions, this would basically work out of the box - e.g.
var fixture = new Fixture().Customize(new AutoMoqCustomization());
var d = fixture.CreateAnonymous();