{"action":"closed","issue":{"url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/245","labels_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/245/comments","events_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/245/events","html_url":"https://github.com/dennisdoomen/fluentassertions/issues/245","id":62357649,"number":245,"title":"ShouldAllBeEquivalentTo with Including still compares all properties","user":{"login":"MichaelLogutov","id":405031,"avatar_url":"https://avatars.githubusercontent.com/u/405031?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelLogutov","html_url":"https://github.com/MichaelLogutov","followers_url":"https://api.github.com/users/MichaelLogutov/followers","following_url":"https://api.github.com/users/MichaelLogutov/following{/other_user}","gists_url":"https://api.github.com/users/MichaelLogutov/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelLogutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelLogutov/subscriptions","organizations_url":"https://api.github.com/users/MichaelLogutov/orgs","repos_url":"https://api.github.com/users/MichaelLogutov/repos","events_url":"https://api.github.com/users/MichaelLogutov/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelLogutov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dennisdoomen/fluentassertions/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"dennisdoomen","id":572734,"avatar_url":"https://avatars.githubusercontent.com/u/572734?v=3","gravatar_id":"","url":"https://api.github.com/users/dennisdoomen","html_url":"https://github.com/dennisdoomen","followers_url":"https://api.github.com/users/dennisdoomen/followers","following_url":"https://api.github.com/users/dennisdoomen/following{/other_user}","gists_url":"https://api.github.com/users/dennisdoomen/gists{/gist_id}","starred_url":"https://api.github.com/users/dennisdoomen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennisdoomen/subscriptions","organizations_url":"https://api.github.com/users/dennisdoomen/orgs","repos_url":"https://api.github.com/users/dennisdoomen/repos","events_url":"https://api.github.com/users/dennisdoomen/events{/privacy}","received_events_url":"https://api.github.com/users/dennisdoomen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dennisdoomen/fluentassertions/milestones/6","html_url":"https://github.com/dennisdoomen/fluentassertions/milestones/v3.4","labels_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/milestones/6/labels","id":911910,"number":6,"title":"v3.4","description":null,"creator":{"login":"dennisdoomen","id":572734,"avatar_url":"https://avatars.githubusercontent.com/u/572734?v=3","gravatar_id":"","url":"https://api.github.com/users/dennisdoomen","html_url":"https://github.com/dennisdoomen","followers_url":"https://api.github.com/users/dennisdoomen/followers","following_url":"https://api.github.com/users/dennisdoomen/following{/other_user}","gists_url":"https://api.github.com/users/dennisdoomen/gists{/gist_id}","starred_url":"https://api.github.com/users/dennisdoomen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennisdoomen/subscriptions","organizations_url":"https://api.github.com/users/dennisdoomen/orgs","repos_url":"https://api.github.com/users/dennisdoomen/repos","events_url":"https://api.github.com/users/dennisdoomen/events{/privacy}","received_events_url":"https://api.github.com/users/dennisdoomen/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":4,"state":"open","created_at":"2014-12-22T07:02:02Z","updated_at":"2015-03-22T17:58:27Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-03-17T10:38:06Z","updated_at":"2015-03-22T17:58:27Z","closed_at":"2015-03-22T17:58:27Z","body":"The recent version broken a lot of our tests due to the fact that ShouldAllBeEquivalentTo with Including still compares all properties and not only that specified in equivalency options:\r\n\r\n    public class MyClass\r\n    {\r\n        public string A { get; set; }\r\n        public string B { get; set; }\r\n    }\r\n\r\n\r\n    [TestMethod]\r\n    public void Test ()\r\n    {\r\n        // arrange\r\n        var result = new[] { new MyClass { A = \"aaa\", B = \"bbb\" } };\r\n\r\n        // assert\r\n        var expected = new MyClass\r\n                        {\r\n                            A = \"aaa\",\r\n                            B = \"ccc\"\r\n                        };\r\n\r\n        result.ShouldAllBeEquivalentTo (new[] { expected },\r\n                                        options => options.Including (x => x.A));\r\n    }\r\n\r\nGot:\r\n```\r\nMicrosoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Expected item[0].B to be \"ccc\", but \"bbb\" differs near \"bbb\" (index 0).\r\n\r\nWith configuration:\r\n- Use declared types and members\r\n- Compare enums by value\r\n- Select member Bug.Tests+MyClass.A\r\n- Match member by name (or throw)\r\n- Be strict about the order of items in byte arrays\r\n- FluentAssertions.Equivalency.ShouldAllBeEquivalentToHelper+CollectionMemberOrderingRuleDecorator\r\n```"}}