提交 15f74696 编写于 作者: S Sam Harwell

Remove special case handling of CreateDiagnosticProviderAndFixer throwing an exception

上级 d95e0e6d
......@@ -41,16 +41,7 @@ public void TestSupportedDiagnosticsMessageTitle()
{
using (var workspace = new AdhocWorkspace())
{
DiagnosticAnalyzer diagnosticAnalyzer;
try
{
diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
}
catch (NotSupportedException)
{
return;
}
var diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
if (diagnosticAnalyzer == null)
{
return;
......@@ -74,16 +65,7 @@ public void TestSupportedDiagnosticsMessageDescription()
{
using (var workspace = new AdhocWorkspace())
{
DiagnosticAnalyzer diagnosticAnalyzer;
try
{
diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
}
catch (NotSupportedException)
{
return;
}
var diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
if (diagnosticAnalyzer == null)
{
return;
......@@ -110,16 +92,7 @@ public void TestSupportedDiagnosticsMessageHelpLinkUri()
{
using (var workspace = new AdhocWorkspace())
{
DiagnosticAnalyzer diagnosticAnalyzer;
try
{
diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
}
catch (NotSupportedException)
{
return;
}
var diagnosticAnalyzer = CreateDiagnosticProviderAndFixer(workspace).Item1;
if (diagnosticAnalyzer == null)
{
return;
......
......@@ -30,7 +30,9 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.CodeActions.AddImp
End Function
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Throw New NotSupportedException()
' This is used by inherited tests to ensure the properties of diagnostic analyzers are correct. It's not
' needed by the tests in this class, but can't throw an exception.
Return (Nothing, Nothing)
End Function
Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, parameters As TestParameters) As (DiagnosticAnalyzer, CodeFixProvider)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册