{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/57635298","id":57635298,"diff_hunk":"@@ -0,0 +1,141 @@\n+// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using System.Threading.Tasks;\n+using Microsoft.CodeAnalysis.CSharp.CodeRefactorings.NamedArguments;\n+using Roslyn.Test.Utilities;\n+using Xunit;\n+\n+namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeRefactorings.NamedArguments\n+{\n+    public class AddNamedArgumentsTests : AbstractCSharpCodeActionTest\n+    {\n+        protected override object CreateCodeRefactoringProvider(Workspace workspace)\n+        {\n+            return new CSharpAddNamedArgumentsCodeRefactoringProvider();\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestConditionalMethod()\n+        {\n+            await TestAsync(\n+@\"class C { void M(int arg1, int arg2) => this?.[|M|](1, 2); }\",\n+@\"class C { void M(int arg1, int arg2) => this?.M(arg1: 1, arg2: 2); }\");\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestConditionalIndexer()\n+        {\n+            await TestAsync(\n+@\"class C { int? this[int arg1, int arg2] => this?[|[1, 2]|]; }\",\n+@\"class C { int? this[int arg1, int arg2] => this?[arg1: 1, arg2: 2]; }\",\n+index: 0);\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestThisConstructorInitializer()\n+        {\n+            await TestAsync(\n+@\"class C { C(int arg1, int arg2) {} C() : [|this(1, 2)|] {} }\",\n+@\"class C { C(int arg1, int arg2) {} C() : this(arg1: 1, arg2: 2) {} }\");\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestBaseConstructorInitializer()\n+        {\n+            await TestAsync(\n+@\"class C { public C(int arg1, int arg2) {} } class D : C { D() : [|base(1, 2)|] {} }\",\n+@\"class C { public C(int arg1, int arg2) {} } class D : C { D() : base(arg1: 1, arg2: 2) {} }\");\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestConstructor()\n+        {\n+            await TestAsync(\n+@\"class C { C(int arg1, int arg2) { new [|C|](1, 2); } }\",\n+@\"class C { C(int arg1, int arg2) { new C(arg1: 1, arg2: 2); } }\");\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestIndexer()\n+        {\n+            await TestAsync(\n+@\"class C { char M(string arg1) => [|arg1|][0]; }\",\n+@\"class C { char M(string arg1) => arg1[index: 0]; }\");\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestArrayIndexer()\n+        {\n+            await TestMissingAsync(\n+@\"class C { int M(int[] arg1) => [|arg1|][0]; }\");\n+\n+        }\n+\n+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAddNamedArguments)]\n+        public async Task TestMissingArgumentNames()\n+        {","path":"src/EditorFeatures/CSharpTest/CodeActions/NamedArguments/AddNamedArgumentsTests.cs","position":76,"original_position":76,"commit_id":"11baf133a0dbcab34cc4826d12a40c60963fdb74","original_commit_id":"11baf133a0dbcab34cc4826d12a40c60963fdb74","user":{"login":"balajikris","id":4213867,"avatar_url":"https://avatars.githubusercontent.com/u/4213867?v=3","gravatar_id":"","url":"https://api.github.com/users/balajikris","html_url":"https://github.com/balajikris","followers_url":"https://api.github.com/users/balajikris/followers","following_url":"https://api.github.com/users/balajikris/following{/other_user}","gists_url":"https://api.github.com/users/balajikris/gists{/gist_id}","starred_url":"https://api.github.com/users/balajikris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balajikris/subscriptions","organizations_url":"https://api.github.com/users/balajikris/orgs","repos_url":"https://api.github.com/users/balajikris/repos","events_url":"https://api.github.com/users/balajikris/events{/privacy}","received_events_url":"https://api.github.com/users/balajikris/received_events","type":"User","site_admin":false},"body":"Nit: From the name of the test, I thought the refactoring would be missing in this scenario, but that doesn't seem to be the case.. In the IDE code base, we generally prefix something like `TestMissing` when we imply the refactoring should be missing in this case.","created_at":"2016-03-28T21:16:56Z","updated_at":"2016-03-28T21:16:56Z","html_url":"https://github.com/dotnet/roslyn/pull/9934#discussion_r57635298","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9934","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/57635298"},"html":{"href":"https://github.com/dotnet/roslyn/pull/9934#discussion_r57635298"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9934"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/9934","id":63513557,"html_url":"https://github.com/dotnet/roslyn/pull/9934","diff_url":"https://github.com/dotnet/roslyn/pull/9934.diff","patch_url":"https://github.com/dotnet/roslyn/pull/9934.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/9934","number":9934,"state":"open","locked":false,"title":"Add an analyzer and code fix to add named arguments","user":{"login":"alrz","id":3105979,"avatar_url":"https://avatars.githubusercontent.com/u/3105979?v=3","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"body":"Fixes #9883\r\n\r\nHad some issues with some parts, Would like to get feedback to make it right. Thanks.","created_at":"2016-03-21T00:45:09Z","updated_at":"2016-03-28T21:16:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d191fc5f8bfd81c7af4a80ff06a6de18062f4f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9934/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9934/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/9934/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/11baf133a0dbcab34cc4826d12a40c60963fdb74","head":{"label":"alrz:named-arguments","ref":"named-arguments","sha":"11baf133a0dbcab34cc4826d12a40c60963fdb74","user":{"login":"alrz","id":3105979,"avatar_url":"https://avatars.githubusercontent.com/u/3105979?v=3","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"repo":{"id":54348191,"name":"roslyn","full_name":"alrz/roslyn","owner":{"login":"alrz","id":3105979,"avatar_url":"https://avatars.githubusercontent.com/u/3105979?v=3","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alrz/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/alrz/roslyn","forks_url":"https://api.github.com/repos/alrz/roslyn/forks","keys_url":"https://api.github.com/repos/alrz/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alrz/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alrz/roslyn/teams","hooks_url":"https://api.github.com/repos/alrz/roslyn/hooks","issue_events_url":"https://api.github.com/repos/alrz/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/alrz/roslyn/events","assignees_url":"https://api.github.com/repos/alrz/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/alrz/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/alrz/roslyn/tags","blobs_url":"https://api.github.com/repos/alrz/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alrz/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alrz/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/alrz/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alrz/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/alrz/roslyn/languages","stargazers_url":"https://api.github.com/repos/alrz/roslyn/stargazers","contributors_url":"https://api.github.com/repos/alrz/roslyn/contributors","subscribers_url":"https://api.github.com/repos/alrz/roslyn/subscribers","subscription_url":"https://api.github.com/repos/alrz/roslyn/subscription","commits_url":"https://api.github.com/repos/alrz/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/alrz/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/alrz/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/alrz/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/alrz/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/alrz/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alrz/roslyn/merges","archive_url":"https://api.github.com/repos/alrz/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alrz/roslyn/downloads","issues_url":"https://api.github.com/repos/alrz/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/alrz/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/alrz/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/alrz/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alrz/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/alrz/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/alrz/roslyn/deployments","created_at":"2016-03-21T00:28:36Z","updated_at":"2016-03-21T00:29:08Z","pushed_at":"2016-03-28T19:46:02Z","git_url":"git://github.com/alrz/roslyn.git","ssh_url":"git@github.com:alrz/roslyn.git","clone_url":"https://github.com/alrz/roslyn.git","svn_url":"https://github.com/alrz/roslyn","homepage":"","size":147032,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"dotnet:master","ref":"master","sha":"b248e82d87b59172b2035b790dc61da799dcf43c","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2016-03-28T18:24:58Z","pushed_at":"2016-03-28T21:06:56Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":173065,"stargazers_count":4725,"watchers_count":4725,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1186,"mirror_url":null,"open_issues_count":2545,"forks":1186,"open_issues":2545,"watchers":4725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9934"},"html":{"href":"https://github.com/dotnet/roslyn/pull/9934"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/9934"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/9934/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9934/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9934/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/11baf133a0dbcab34cc4826d12a40c60963fdb74"}}}}