{"action":"created","issue":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/422","labels_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/422/comments","events_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/422/events","html_url":"https://github.com/AutoFixture/AutoFixture/issues/422","id":90700020,"number":422,"title":"Faking concrete types with AutoFakeItEasy ","user":{"login":"cecilphillipTK","id":11727687,"avatar_url":"https://avatars.githubusercontent.com/u/11727687?v=3","gravatar_id":"","url":"https://api.github.com/users/cecilphillipTK","html_url":"https://github.com/cecilphillipTK","followers_url":"https://api.github.com/users/cecilphillipTK/followers","following_url":"https://api.github.com/users/cecilphillipTK/following{/other_user}","gists_url":"https://api.github.com/users/cecilphillipTK/gists{/gist_id}","starred_url":"https://api.github.com/users/cecilphillipTK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cecilphillipTK/subscriptions","organizations_url":"https://api.github.com/users/cecilphillipTK/orgs","repos_url":"https://api.github.com/users/cecilphillipTK/repos","events_url":"https://api.github.com/users/cecilphillipTK/events{/privacy}","received_events_url":"https://api.github.com/users/cecilphillipTK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-24T14:53:49Z","updated_at":"2015-06-29T10:40:07Z","closed_at":null,"body":"I'm having an issue when faking Concrete types. Lets say I have a class that looks like below\r\n```csharp\r\n   public class ConnectionManager\r\n    {\r\n        private ConcurrentDictionary<string, string> _userMappings;\r\n\r\n        public virtual ConcurrentDictionary<string, string> UserMappings\r\n        {\r\n            get { return _userMappings ?? (_userMappings = new ConcurrentDictionary<string, string>()); }\r\n        }\r\n    }\r\n```\r\nThen a test that looks some thing like\r\n```csharp\r\n   var fakeConMgr = Fixture.Freeze<Fake<ConnectionManager>>();          \r\n   fakeConMgr.CallsTo(f => f.UserConnected(A<string>._)).Returns(true);\r\n   var hub = Fixture.Create<RulesHub>();\r\n```\r\nA faked ConnectionManager doesn't get injected into the RulesHub. However, the follow code works.\r\n\r\n```csharp\r\n var fakeConMgr = Fixture.Freeze<Fake<ConnectionManager>>();\r\n fakeConMgr.FakedObject.UserMappings.TryAdd(\"conn-id\", \"user_1\");\r\n Fixture.Inject(fakeConMgr.FakedObject);\r\n```\r\nAm I overlooking some rules in my initial test snippet? I have other tests that Freeze Fake interfaces that work fine. I'm using v3.30.8 with FakeItEasy v1.25.2"},"comment":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/comments/116598548","html_url":"https://github.com/AutoFixture/AutoFixture/issues/422#issuecomment-116598548","issue_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/422","id":116598548,"user":{"login":"moodmosaic","id":287532,"avatar_url":"https://avatars.githubusercontent.com/u/287532?v=3","gravatar_id":"","url":"https://api.github.com/users/moodmosaic","html_url":"https://github.com/moodmosaic","followers_url":"https://api.github.com/users/moodmosaic/followers","following_url":"https://api.github.com/users/moodmosaic/following{/other_user}","gists_url":"https://api.github.com/users/moodmosaic/gists{/gist_id}","starred_url":"https://api.github.com/users/moodmosaic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodmosaic/subscriptions","organizations_url":"https://api.github.com/users/moodmosaic/orgs","repos_url":"https://api.github.com/users/moodmosaic/repos","events_url":"https://api.github.com/users/moodmosaic/events{/privacy}","received_events_url":"https://api.github.com/users/moodmosaic/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T10:40:07Z","updated_at":"2015-06-29T10:40:07Z","body":"No problem! Can we close this now? :smiley: "}}