{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Routing/pulls/comments/29690817","id":29690817,"diff_hunk":"@@ -168,36 +169,47 @@ public void CreateFromObject_MixedCaseThrows()\n                 expected);\n         }\n \n-        [Fact]\n-        public void CreateFromReadOnlyDictionary_CopiesValues()\n+        public static IEnumerable<object[]> IEnumerableKeyValuePairData\n         {\n-            // Arrange\n-            var dictionary = new Dictionary<string, object>();\n-            dictionary.Add(\"Name\", \"James\");\n-            dictionary.Add(\"Age\", 30);\n-            var readonlyDictionary = (IReadOnlyDictionary<string, object>)dictionary;\n+            get\n+            {\n+                var routeValues = new[]\n+                {\n+                    new KeyValuePair<string, object>(\"Name\", \"James\"),\n+                    new KeyValuePair<string, object>(\"Age\", 30),\n+                    new KeyValuePair<string, object>(\"Address\", new Address() { City = \"Redmond\", State = \"WA\" })\n+                };\n+\n+                yield return new object[] { routeValues.ToDictionary(kvp => kvp.Key, kvp => kvp.Value) };\n+\n+                yield return new object[] { routeValues.ToList() };\n+\n+                yield return new object[] { routeValues };\n+            }\n+        }\n \n+        [Theory]\n+        [MemberData(nameof(IEnumerableKeyValuePairData))]\n+        public void RouteValueDictionary_CopiesValues_FromIEnumerableKeyValuePair(object values)\n+        {\n             // Act\n-            var dict = new RouteValueDictionary(readonlyDictionary);\n+            var dict = new RouteValueDictionary(values);\n \n             // Assert\n-            Assert.Equal(2, dict.Count);\n+            Assert.Equal(3, dict.Count);\n             Assert.Equal(\"James\", dict[\"Name\"]);\n             Assert.Equal(30, dict[\"Age\"]);\n+            var address = Assert.IsType<Address>(dict[\"Address\"]);\n+            Assert.Equal(\"Redmond\", address.City);\n+            Assert.Equal(\"WA\", address.State);\n         }\n \n-        [Fact]\n-        public void CreateFromReadOnlyDictionary_ModifyRouteValueDictionary()\n+        [Theory]\n+        [MemberData(nameof(IEnumerableKeyValuePairData))]\n+        public void CreatedFrom_IEnumerableKeyValuePair_AllowsAddingOrModifyingValues(object values)\n         {\n-            // Arrange\n-            var dictionary = new Dictionary<string, object>();\n-            dictionary.Add(\"Name\", \"James\");\n-            dictionary.Add(\"Age\", 30);\n-            dictionary.Add(\"Address\", new Address() { City = \"Redmond\", State = \"WA\" });\n-            var readonlyDictionary = (IReadOnlyDictionary<string, object>)dictionary;\n-\n             // Act","path":"test/Microsoft.AspNet.Routing.Tests/RouteValueDictionaryTests.cs","position":69,"original_position":69,"commit_id":"d18f0d3eae6d39706305d90ce1972694cffbb538","original_commit_id":"d18f0d3eae6d39706305d90ce1972694cffbb538","user":{"login":"dougbu","id":6431421,"avatar_url":"https://avatars.githubusercontent.com/u/6431421?v=3","gravatar_id":"","url":"https://api.github.com/users/dougbu","html_url":"https://github.com/dougbu","followers_url":"https://api.github.com/users/dougbu/followers","following_url":"https://api.github.com/users/dougbu/following{/other_user}","gists_url":"https://api.github.com/users/dougbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dougbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougbu/subscriptions","organizations_url":"https://api.github.com/users/dougbu/orgs","repos_url":"https://api.github.com/users/dougbu/repos","events_url":"https://api.github.com/users/dougbu/events{/privacy}","received_events_url":"https://api.github.com/users/dougbu/received_events","type":"User","site_admin":false},"body":"Act -> Arrange & Act","created_at":"2015-05-05T17:18:04Z","updated_at":"2015-05-05T17:18:04Z","html_url":"https://github.com/aspnet/Routing/pull/183#discussion_r29690817","pull_request_url":"https://api.github.com/repos/aspnet/Routing/pulls/183","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/comments/29690817"},"html":{"href":"https://github.com/aspnet/Routing/pull/183#discussion_r29690817"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/183"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Routing/pulls/183","id":34744971,"html_url":"https://github.com/aspnet/Routing/pull/183","diff_url":"https://github.com/aspnet/Routing/pull/183.diff","patch_url":"https://github.com/aspnet/Routing/pull/183.patch","issue_url":"https://api.github.com/repos/aspnet/Routing/issues/183","number":183,"state":"open","locked":false,"title":"Address feedback for PR: https://github.com/aspnet/Routing/pull/182","user":{"login":"kichalla","id":6559784,"avatar_url":"https://avatars.githubusercontent.com/u/6559784?v=3","gravatar_id":"","url":"https://api.github.com/users/kichalla","html_url":"https://github.com/kichalla","followers_url":"https://api.github.com/users/kichalla/followers","following_url":"https://api.github.com/users/kichalla/following{/other_user}","gists_url":"https://api.github.com/users/kichalla/gists{/gist_id}","starred_url":"https://api.github.com/users/kichalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kichalla/subscriptions","organizations_url":"https://api.github.com/users/kichalla/orgs","repos_url":"https://api.github.com/users/kichalla/repos","events_url":"https://api.github.com/users/kichalla/events{/privacy}","received_events_url":"https://api.github.com/users/kichalla/received_events","type":"User","site_admin":false},"body":"Related PR: https://github.com/aspnet/Routing/pull/182\r\n\r\n@dougbu @Eilon ","created_at":"2015-05-05T17:00:10Z","updated_at":"2015-05-05T17:18:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a36fc234426f6598bf21512cdf014f212c54131f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Routing/pulls/183/commits","review_comments_url":"https://api.github.com/repos/aspnet/Routing/pulls/183/comments","review_comment_url":"https://api.github.com/repos/aspnet/Routing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Routing/issues/183/comments","statuses_url":"https://api.github.com/repos/aspnet/Routing/statuses/d18f0d3eae6d39706305d90ce1972694cffbb538","head":{"label":"aspnet:kiran/rvd-fix-debuggertostring","ref":"kiran/rvd-fix-debuggertostring","sha":"d18f0d3eae6d39706305d90ce1972694cffbb538","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16300347,"name":"Routing","full_name":"aspnet/Routing","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Routing","description":"Middleware for routing requests to application logic.","fork":false,"url":"https://api.github.com/repos/aspnet/Routing","forks_url":"https://api.github.com/repos/aspnet/Routing/forks","keys_url":"https://api.github.com/repos/aspnet/Routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Routing/teams","hooks_url":"https://api.github.com/repos/aspnet/Routing/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Routing/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Routing/events","assignees_url":"https://api.github.com/repos/aspnet/Routing/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Routing/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Routing/tags","blobs_url":"https://api.github.com/repos/aspnet/Routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Routing/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Routing/languages","stargazers_url":"https://api.github.com/repos/aspnet/Routing/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Routing/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Routing/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Routing/subscription","commits_url":"https://api.github.com/repos/aspnet/Routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Routing/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Routing/merges","archive_url":"https://api.github.com/repos/aspnet/Routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Routing/downloads","issues_url":"https://api.github.com/repos/aspnet/Routing/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Routing/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Routing/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Routing/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Routing/releases{/id}","created_at":"2014-01-28T02:50:39Z","updated_at":"2015-05-01T21:14:29Z","pushed_at":"2015-05-05T17:00:11Z","git_url":"git://github.com/aspnet/Routing.git","ssh_url":"git@github.com:aspnet/Routing.git","clone_url":"https://github.com/aspnet/Routing.git","svn_url":"https://github.com/aspnet/Routing","homepage":"","size":3694,"stargazers_count":109,"watchers_count":109,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":8,"forks":39,"open_issues":8,"watchers":109,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"fc87a436c17b53892938ed64e404cccabfd79baf","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16300347,"name":"Routing","full_name":"aspnet/Routing","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Routing","description":"Middleware for routing requests to application logic.","fork":false,"url":"https://api.github.com/repos/aspnet/Routing","forks_url":"https://api.github.com/repos/aspnet/Routing/forks","keys_url":"https://api.github.com/repos/aspnet/Routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Routing/teams","hooks_url":"https://api.github.com/repos/aspnet/Routing/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Routing/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Routing/events","assignees_url":"https://api.github.com/repos/aspnet/Routing/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Routing/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Routing/tags","blobs_url":"https://api.github.com/repos/aspnet/Routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Routing/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Routing/languages","stargazers_url":"https://api.github.com/repos/aspnet/Routing/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Routing/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Routing/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Routing/subscription","commits_url":"https://api.github.com/repos/aspnet/Routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Routing/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Routing/merges","archive_url":"https://api.github.com/repos/aspnet/Routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Routing/downloads","issues_url":"https://api.github.com/repos/aspnet/Routing/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Routing/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Routing/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Routing/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Routing/releases{/id}","created_at":"2014-01-28T02:50:39Z","updated_at":"2015-05-01T21:14:29Z","pushed_at":"2015-05-05T17:00:11Z","git_url":"git://github.com/aspnet/Routing.git","ssh_url":"git@github.com:aspnet/Routing.git","clone_url":"https://github.com/aspnet/Routing.git","svn_url":"https://github.com/aspnet/Routing","homepage":"","size":3694,"stargazers_count":109,"watchers_count":109,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":8,"forks":39,"open_issues":8,"watchers":109,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/183"},"html":{"href":"https://github.com/aspnet/Routing/pull/183"},"issue":{"href":"https://api.github.com/repos/aspnet/Routing/issues/183"},"comments":{"href":"https://api.github.com/repos/aspnet/Routing/issues/183/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/183/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Routing/pulls/183/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Routing/statuses/d18f0d3eae6d39706305d90ce1972694cffbb538"}}}}