提交 274a32b7 编写于 作者: G Gen Lu

Add test to extract method in interface

上级 f7f74142
......@@ -11051,5 +11051,37 @@ private static void NewMethod(ref object test, bool a)
}";
await TestExtractMethodAsync(code, expected, allowBestEffort: true);
}
[WorkItem(30750, "https://github.com/dotnet/roslyn/issues/30750")]
[Fact, Trait(Traits.Feature, Traits.Features.ExtractMethod)]
public async Task ExtractMethodInInterface()
{
var code = @"
interface Program
{
void Foo();
void Test()
{
[|Foo();|]
}
}";
var expected = @"
interface Program
{
void Foo();
void Test()
{
NewMethod();
}
void NewMethod()
{
Foo();
}
}";
await TestExtractMethodAsync(code, expected);
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册