{"action":"created","issue":{"url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/100","labels_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/100/comments","events_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/100/events","html_url":"https://github.com/sergeyshushlyapin/Sitecore.FakeDb/issues/100","id":115602492,"number":100,"title":"item.Template.Fields randomly fails assertions for generated templates","user":{"login":"pveller","id":498673,"avatar_url":"https://avatars.githubusercontent.com/u/498673?v=3","gravatar_id":"","url":"https://api.github.com/users/pveller","html_url":"https://github.com/pveller","followers_url":"https://api.github.com/users/pveller/followers","following_url":"https://api.github.com/users/pveller/following{/other_user}","gists_url":"https://api.github.com/users/pveller/gists{/gist_id}","starred_url":"https://api.github.com/users/pveller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveller/subscriptions","organizations_url":"https://api.github.com/users/pveller/orgs","repos_url":"https://api.github.com/users/pveller/repos","events_url":"https://api.github.com/users/pveller/events{/privacy}","received_events_url":"https://api.github.com/users/pveller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-06T22:22:12Z","updated_at":"2015-11-08T21:11:48Z","closed_at":null,"body":"Not sure why. I pulled down latest FakeDb and added it there to reproduce. It does indeed fail. I am looking into it right now. It was working before (I had an older version in one of my projects and a test that was relying on these conditions to pass started failing after FakeDb upgrade). It also fails *randomly*. It may fail on first assertion, may fail on second. I tried re-arranging them and it would find the field by name but fail finding it by ID. Weird.\r\n\r\n```csharp\r\n    [Fact]\r\n    public void ShouldProperlyCopyFieldsFromItemToTheTemplate()\r\n    {\r\n      // arrange\r\n      var titleFieldId = ID.NewID;\r\n      var descriptionFieldId = ID.NewID;\r\n\r\n      // act\r\n      using (var db = new Db\r\n      {\r\n        new DbItem(\"home\")\r\n        {\r\n          new DbField(\"Title\", titleFieldId) { Value = \"Title\" },\r\n          new DbField(\"Description\", descriptionFieldId) { Value = \"Description\" }\r\n        }\r\n      })\r\n      {\r\n        var home = db.GetItem(\"/sitecore/content/home\");\r\n\r\n        // assert\r\n        home.Template.Fields.Count(f => f.Name == \"Title\").Should().Be(1);\r\n        home.Template.Fields.Count(f => f.Name == \"Description\").Should().Be(1);\r\n        home.Template.Fields.Count(f => f.ID == titleFieldId).Should().Be(1);\r\n        home.Template.Fields.Count(f => f.ID == descriptionFieldId).Should().Be(1);\r\n      }\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/comments/154872799","html_url":"https://github.com/sergeyshushlyapin/Sitecore.FakeDb/issues/100#issuecomment-154872799","issue_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/100","id":154872799,"user":{"login":"pveller","id":498673,"avatar_url":"https://avatars.githubusercontent.com/u/498673?v=3","gravatar_id":"","url":"https://api.github.com/users/pveller","html_url":"https://github.com/pveller","followers_url":"https://api.github.com/users/pveller/followers","following_url":"https://api.github.com/users/pveller/following{/other_user}","gists_url":"https://api.github.com/users/pveller/gists{/gist_id}","starred_url":"https://api.github.com/users/pveller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveller/subscriptions","organizations_url":"https://api.github.com/users/pveller/orgs","repos_url":"https://api.github.com/users/pveller/repos","events_url":"https://api.github.com/users/pveller/events{/privacy}","received_events_url":"https://api.github.com/users/pveller/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T21:11:48Z","updated_at":"2015-11-08T21:11:48Z","body":"@sergeyshushlyapin, take a look at #101. Seams to be very straightforward and harmless. My test is now passing and everything else is still passing as well, of course :) Will now work on the `Source` support. Would be nice to see a release early next week. Thanks!"}}