{"action":"created","comment":{"url":"https://api.github.com/repos/xunit/xunit/pulls/comments/43786196","id":43786196,"diff_hunk":"@@ -149,6 +158,36 @@ public bool Equals(T x, T y)\n             return dictionaryYKeys.Count == 0;\n         }\n \n+        bool? CheckIfSetsAreEqual(T x, T y, TypeInfo typeInfo)\n+        {\n+            if (!IsSet(typeInfo))\n+                return null;\n+\n+            var enumX = x as IEnumerable;\n+            var enumY = y as IEnumerable;\n+            if (enumX == null || enumY == null)\n+                return null;\n+\n+            var objectEnumX = enumX.Cast<object>();\n+            var objectEnumY = enumY.Cast<object>();\n+            if (objectEnumX.Count() != objectEnumY.Count())\n+                return false;\n+\n+            var setX = new HashSet<object>(objectEnumX, objectComparer);","path":"src/xunit.assert/Asserts/Sdk/AssertEqualityComparer.cs","position":49,"original_position":49,"commit_id":"517a17adbb00b22c6eadda47a11b0e396070bd24","original_commit_id":"517a17adbb00b22c6eadda47a11b0e396070bd24","user":{"login":"bradwilson","id":16944,"avatar_url":"https://avatars.githubusercontent.com/u/16944?v=3","gravatar_id":"","url":"https://api.github.com/users/bradwilson","html_url":"https://github.com/bradwilson","followers_url":"https://api.github.com/users/bradwilson/followers","following_url":"https://api.github.com/users/bradwilson/following{/other_user}","gists_url":"https://api.github.com/users/bradwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/bradwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradwilson/subscriptions","organizations_url":"https://api.github.com/users/bradwilson/orgs","repos_url":"https://api.github.com/users/bradwilson/repos","events_url":"https://api.github.com/users/bradwilson/events{/privacy}","received_events_url":"https://api.github.com/users/bradwilson/received_events","type":"User","site_admin":false},"body":"You can use `AssertEqualityComparer<>` instead of `Comparer<>`. :)","created_at":"2015-11-03T18:28:29Z","updated_at":"2015-11-03T18:28:29Z","html_url":"https://github.com/xunit/xunit/pull/641#discussion_r43786196","pull_request_url":"https://api.github.com/repos/xunit/xunit/pulls/641","_links":{"self":{"href":"https://api.github.com/repos/xunit/xunit/pulls/comments/43786196"},"html":{"href":"https://github.com/xunit/xunit/pull/641#discussion_r43786196"},"pull_request":{"href":"https://api.github.com/repos/xunit/xunit/pulls/641"}}},"pull_request":{"url":"https://api.github.com/repos/xunit/xunit/pulls/641","id":48649936,"html_url":"https://github.com/xunit/xunit/pull/641","diff_url":"https://github.com/xunit/xunit/pull/641.diff","patch_url":"https://github.com/xunit/xunit/pull/641.patch","issue_url":"https://api.github.com/repos/xunit/xunit/issues/641","number":641,"state":"open","locked":false,"title":"Refactor AssertEqualityComparer to handle sets","user":{"login":"odedw","id":1423146,"avatar_url":"https://avatars.githubusercontent.com/u/1423146?v=3","gravatar_id":"","url":"https://api.github.com/users/odedw","html_url":"https://github.com/odedw","followers_url":"https://api.github.com/users/odedw/followers","following_url":"https://api.github.com/users/odedw/following{/other_user}","gists_url":"https://api.github.com/users/odedw/gists{/gist_id}","starred_url":"https://api.github.com/users/odedw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odedw/subscriptions","organizations_url":"https://api.github.com/users/odedw/orgs","repos_url":"https://api.github.com/users/odedw/repos","events_url":"https://api.github.com/users/odedw/events{/privacy}","received_events_url":"https://api.github.com/users/odedw/received_events","type":"User","site_admin":false},"body":"Issue #240 \r\n\r\nIt was a little tricky checking whether the type implements `ISet` as there is no non generic `ISet` (as opposed to `IDictionary`).\r\n\r\nI added the `ObjectEqualityComparerAdapter` class to be able to use the innerComparer if there is one and I couldn't use the `DefaultInnerComparer` since `AssertEqualityComparerAdapter` doesn't implement `GetHashCode`. Although, I couldn't find a way to pass a custom inner comparer (opened a suggestion - issue #640).","created_at":"2015-10-24T06:15:33Z","updated_at":"2015-11-03T18:28:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2a105ff08f98bc3ca1cd08b503e0bfcdcc4e293","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xunit/xunit/pulls/641/commits","review_comments_url":"https://api.github.com/repos/xunit/xunit/pulls/641/comments","review_comment_url":"https://api.github.com/repos/xunit/xunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xunit/xunit/issues/641/comments","statuses_url":"https://api.github.com/repos/xunit/xunit/statuses/517a17adbb00b22c6eadda47a11b0e396070bd24","head":{"label":"odedw:assert_equals_for_sets","ref":"assert_equals_for_sets","sha":"517a17adbb00b22c6eadda47a11b0e396070bd24","user":{"login":"odedw","id":1423146,"avatar_url":"https://avatars.githubusercontent.com/u/1423146?v=3","gravatar_id":"","url":"https://api.github.com/users/odedw","html_url":"https://github.com/odedw","followers_url":"https://api.github.com/users/odedw/followers","following_url":"https://api.github.com/users/odedw/following{/other_user}","gists_url":"https://api.github.com/users/odedw/gists{/gist_id}","starred_url":"https://api.github.com/users/odedw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odedw/subscriptions","organizations_url":"https://api.github.com/users/odedw/orgs","repos_url":"https://api.github.com/users/odedw/repos","events_url":"https://api.github.com/users/odedw/events{/privacy}","received_events_url":"https://api.github.com/users/odedw/received_events","type":"User","site_admin":false},"repo":{"id":44826052,"name":"xunit","full_name":"odedw/xunit","owner":{"login":"odedw","id":1423146,"avatar_url":"https://avatars.githubusercontent.com/u/1423146?v=3","gravatar_id":"","url":"https://api.github.com/users/odedw","html_url":"https://github.com/odedw","followers_url":"https://api.github.com/users/odedw/followers","following_url":"https://api.github.com/users/odedw/following{/other_user}","gists_url":"https://api.github.com/users/odedw/gists{/gist_id}","starred_url":"https://api.github.com/users/odedw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odedw/subscriptions","organizations_url":"https://api.github.com/users/odedw/orgs","repos_url":"https://api.github.com/users/odedw/repos","events_url":"https://api.github.com/users/odedw/events{/privacy}","received_events_url":"https://api.github.com/users/odedw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odedw/xunit","description":"xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework.","fork":true,"url":"https://api.github.com/repos/odedw/xunit","forks_url":"https://api.github.com/repos/odedw/xunit/forks","keys_url":"https://api.github.com/repos/odedw/xunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odedw/xunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odedw/xunit/teams","hooks_url":"https://api.github.com/repos/odedw/xunit/hooks","issue_events_url":"https://api.github.com/repos/odedw/xunit/issues/events{/number}","events_url":"https://api.github.com/repos/odedw/xunit/events","assignees_url":"https://api.github.com/repos/odedw/xunit/assignees{/user}","branches_url":"https://api.github.com/repos/odedw/xunit/branches{/branch}","tags_url":"https://api.github.com/repos/odedw/xunit/tags","blobs_url":"https://api.github.com/repos/odedw/xunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odedw/xunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odedw/xunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/odedw/xunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odedw/xunit/statuses/{sha}","languages_url":"https://api.github.com/repos/odedw/xunit/languages","stargazers_url":"https://api.github.com/repos/odedw/xunit/stargazers","contributors_url":"https://api.github.com/repos/odedw/xunit/contributors","subscribers_url":"https://api.github.com/repos/odedw/xunit/subscribers","subscription_url":"https://api.github.com/repos/odedw/xunit/subscription","commits_url":"https://api.github.com/repos/odedw/xunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/odedw/xunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/odedw/xunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/odedw/xunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/odedw/xunit/contents/{+path}","compare_url":"https://api.github.com/repos/odedw/xunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odedw/xunit/merges","archive_url":"https://api.github.com/repos/odedw/xunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odedw/xunit/downloads","issues_url":"https://api.github.com/repos/odedw/xunit/issues{/number}","pulls_url":"https://api.github.com/repos/odedw/xunit/pulls{/number}","milestones_url":"https://api.github.com/repos/odedw/xunit/milestones{/number}","notifications_url":"https://api.github.com/repos/odedw/xunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odedw/xunit/labels{/name}","releases_url":"https://api.github.com/repos/odedw/xunit/releases{/id}","created_at":"2015-10-23T16:51:57Z","updated_at":"2015-10-23T16:52:00Z","pushed_at":"2015-10-27T19:52:26Z","git_url":"git://github.com/odedw/xunit.git","ssh_url":"git@github.com:odedw/xunit.git","clone_url":"https://github.com/odedw/xunit.git","svn_url":"https://github.com/odedw/xunit","homepage":"http://xunit.github.io/","size":7553,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xunit:master","ref":"master","sha":"ff6874cce3ba283e5c040564e60b0563d5bd4e96","user":{"login":"xunit","id":2092016,"avatar_url":"https://avatars.githubusercontent.com/u/2092016?v=3","gravatar_id":"","url":"https://api.github.com/users/xunit","html_url":"https://github.com/xunit","followers_url":"https://api.github.com/users/xunit/followers","following_url":"https://api.github.com/users/xunit/following{/other_user}","gists_url":"https://api.github.com/users/xunit/gists{/gist_id}","starred_url":"https://api.github.com/users/xunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xunit/subscriptions","organizations_url":"https://api.github.com/users/xunit/orgs","repos_url":"https://api.github.com/users/xunit/repos","events_url":"https://api.github.com/users/xunit/events{/privacy}","received_events_url":"https://api.github.com/users/xunit/received_events","type":"Organization","site_admin":false},"repo":{"id":9891249,"name":"xunit","full_name":"xunit/xunit","owner":{"login":"xunit","id":2092016,"avatar_url":"https://avatars.githubusercontent.com/u/2092016?v=3","gravatar_id":"","url":"https://api.github.com/users/xunit","html_url":"https://github.com/xunit","followers_url":"https://api.github.com/users/xunit/followers","following_url":"https://api.github.com/users/xunit/following{/other_user}","gists_url":"https://api.github.com/users/xunit/gists{/gist_id}","starred_url":"https://api.github.com/users/xunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xunit/subscriptions","organizations_url":"https://api.github.com/users/xunit/orgs","repos_url":"https://api.github.com/users/xunit/repos","events_url":"https://api.github.com/users/xunit/events{/privacy}","received_events_url":"https://api.github.com/users/xunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xunit/xunit","description":"xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework.","fork":false,"url":"https://api.github.com/repos/xunit/xunit","forks_url":"https://api.github.com/repos/xunit/xunit/forks","keys_url":"https://api.github.com/repos/xunit/xunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xunit/xunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xunit/xunit/teams","hooks_url":"https://api.github.com/repos/xunit/xunit/hooks","issue_events_url":"https://api.github.com/repos/xunit/xunit/issues/events{/number}","events_url":"https://api.github.com/repos/xunit/xunit/events","assignees_url":"https://api.github.com/repos/xunit/xunit/assignees{/user}","branches_url":"https://api.github.com/repos/xunit/xunit/branches{/branch}","tags_url":"https://api.github.com/repos/xunit/xunit/tags","blobs_url":"https://api.github.com/repos/xunit/xunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xunit/xunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xunit/xunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/xunit/xunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xunit/xunit/statuses/{sha}","languages_url":"https://api.github.com/repos/xunit/xunit/languages","stargazers_url":"https://api.github.com/repos/xunit/xunit/stargazers","contributors_url":"https://api.github.com/repos/xunit/xunit/contributors","subscribers_url":"https://api.github.com/repos/xunit/xunit/subscribers","subscription_url":"https://api.github.com/repos/xunit/xunit/subscription","commits_url":"https://api.github.com/repos/xunit/xunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/xunit/xunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/xunit/xunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/xunit/xunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/xunit/xunit/contents/{+path}","compare_url":"https://api.github.com/repos/xunit/xunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xunit/xunit/merges","archive_url":"https://api.github.com/repos/xunit/xunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xunit/xunit/downloads","issues_url":"https://api.github.com/repos/xunit/xunit/issues{/number}","pulls_url":"https://api.github.com/repos/xunit/xunit/pulls{/number}","milestones_url":"https://api.github.com/repos/xunit/xunit/milestones{/number}","notifications_url":"https://api.github.com/repos/xunit/xunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xunit/xunit/labels{/name}","releases_url":"https://api.github.com/repos/xunit/xunit/releases{/id}","created_at":"2013-05-06T16:37:13Z","updated_at":"2015-11-02T23:14:40Z","pushed_at":"2015-11-01T19:27:08Z","git_url":"git://github.com/xunit/xunit.git","ssh_url":"git@github.com:xunit/xunit.git","clone_url":"https://github.com/xunit/xunit.git","svn_url":"https://github.com/xunit/xunit","homepage":"http://xunit.github.io/","size":19546,"stargazers_count":800,"watchers_count":800,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":252,"mirror_url":null,"open_issues_count":101,"forks":252,"open_issues":101,"watchers":800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xunit/xunit/pulls/641"},"html":{"href":"https://github.com/xunit/xunit/pull/641"},"issue":{"href":"https://api.github.com/repos/xunit/xunit/issues/641"},"comments":{"href":"https://api.github.com/repos/xunit/xunit/issues/641/comments"},"review_comments":{"href":"https://api.github.com/repos/xunit/xunit/pulls/641/comments"},"review_comment":{"href":"https://api.github.com/repos/xunit/xunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xunit/xunit/pulls/641/commits"},"statuses":{"href":"https://api.github.com/repos/xunit/xunit/statuses/517a17adbb00b22c6eadda47a11b0e396070bd24"}}}}