{"action":"created","issue":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/454","labels_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/454/comments","events_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/454/events","html_url":"https://github.com/AutoFixture/AutoFixture/issues/454","id":112114653,"number":454,"title":"Creating nested generic interfaces","user":{"login":"SeanFarrow","id":1455486,"avatar_url":"https://avatars.githubusercontent.com/u/1455486?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanFarrow","html_url":"https://github.com/SeanFarrow","followers_url":"https://api.github.com/users/SeanFarrow/followers","following_url":"https://api.github.com/users/SeanFarrow/following{/other_user}","gists_url":"https://api.github.com/users/SeanFarrow/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanFarrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanFarrow/subscriptions","organizations_url":"https://api.github.com/users/SeanFarrow/orgs","repos_url":"https://api.github.com/users/SeanFarrow/repos","events_url":"https://api.github.com/users/SeanFarrow/events{/privacy}","received_events_url":"https://api.github.com/users/SeanFarrow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-19T10:10:46Z","updated_at":"2015-10-19T20:40:28Z","closed_at":"2015-10-19T20:40:28Z","body":"Hi,\r\n\r\nIn one of my tests I have a need to create a nested generic interface.\r\nI can do this with NSubstitute as follows:\r\nSubstitute.For<ICommandHandler<ICommand>>();\r\nWhen trying to do this with AutoFixture as follows:\r\nFixture.Create<ICommandHandler<ICommand>>();\r\nI get the following exception: \r\nRiskscoper.Server.Core.Mediator.Tests.Commands.CommandExecuter.WhenAListOfCommandHandlersIsPassedInToTheConstructor (TestFixtureSetUp):\r\nSetUp : Ploeh.AutoFixture.ObjectCreationException : AutoFixture was unable to create an instance from Riskscoper.Server.Core.Mediator.Contracts.Commands.ICommandHandler`1[Riskscoper.Server.Core.Mediator.Contracts.Commands.ICommand], most likely because it has no public constructor, is an abstract or non-public type.\r\n\r\nRequest path:\r\n\t  Riskscoper.Server.Core.Mediator.Contracts.Commands.ICommandHandler`1[Riskscoper.Server.Core.Mediator.Contracts.Commands.ICommand]\r\nCould the ability to mock multiple generic interfaces be added, or does this already exist?\r\nAny help appreciated.\r\nKind regards\r\nSean.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/comments/149340821","html_url":"https://github.com/AutoFixture/AutoFixture/issues/454#issuecomment-149340821","issue_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/454","id":149340821,"user":{"login":"ploeh","id":242165,"avatar_url":"https://avatars.githubusercontent.com/u/242165?v=3","gravatar_id":"","url":"https://api.github.com/users/ploeh","html_url":"https://github.com/ploeh","followers_url":"https://api.github.com/users/ploeh/followers","following_url":"https://api.github.com/users/ploeh/following{/other_user}","gists_url":"https://api.github.com/users/ploeh/gists{/gist_id}","starred_url":"https://api.github.com/users/ploeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ploeh/subscriptions","organizations_url":"https://api.github.com/users/ploeh/orgs","repos_url":"https://api.github.com/users/ploeh/repos","events_url":"https://api.github.com/users/ploeh/events{/privacy}","received_events_url":"https://api.github.com/users/ploeh/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T20:40:28Z","updated_at":"2015-10-19T20:40:28Z","body":"This seems to be a FAQ, so I've opened #455 in order to make the error message more helpful."}}