Skip to main content

DiagnosticVerifier.VerifyDiagnosticAndFixAsync Method

Containing Type: DiagnosticVerifier<TAnalyzer, TFixProvider>

Assembly: Roslynator.Testing.Common.dll

Overloads​

MethodSummary
VerifyDiagnosticAndFixAsync(DiagnosticTestData, ExpectedTestState, TestOptions, CancellationToken)Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.
VerifyDiagnosticAndFixAsync(String, String, IEnumerable<(String source, String expectedSource)>, String, TestOptions, CancellationToken)Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.
VerifyDiagnosticAndFixAsync(TestFile, IEnumerable<AdditionalFile>, String, TestOptions, CancellationToken)Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.

VerifyDiagnosticAndFixAsync(DiagnosticTestData, ExpectedTestState, TestOptions, CancellationToken)​

Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.

public System.Threading.Tasks.Task VerifyDiagnosticAndFixAsync(Roslynator.Testing.DiagnosticTestData data, Roslynator.Testing.ExpectedTestState expected, Roslynator.Testing.TestOptions? options = null, System.Threading.CancellationToken cancellationToken = default)

Parameters​

data   DiagnosticTestData

expected   ExpectedTestState

options   TestOptions

cancellationToken   CancellationToken

Returns​

Task

VerifyDiagnosticAndFixAsync(String, String, IEnumerable<(String source, String expectedSource)>, String, TestOptions, CancellationToken)​

Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.

public System.Threading.Tasks.Task VerifyDiagnosticAndFixAsync(string source, string expectedSource, System.Collections.Generic.IEnumerable<(string source, string expectedSource)>? additionalFiles = null, string? equivalenceKey = null, Roslynator.Testing.TestOptions? options = null, System.Threading.CancellationToken cancellationToken = default)

Parameters​

source   String

Source code where diagnostic's location is marked with [| and |] tokens.

expectedSource   String

additionalFiles   IEnumerable<(String source, String expectedSource)>

equivalenceKey   String

options   TestOptions

cancellationToken   CancellationToken

Returns​

Task

VerifyDiagnosticAndFixAsync(TestFile, IEnumerable<AdditionalFile>, String, TestOptions, CancellationToken)​

Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed.

public System.Threading.Tasks.Task VerifyDiagnosticAndFixAsync(Roslynator.Testing.TestFile file, System.Collections.Generic.IEnumerable<Roslynator.Testing.AdditionalFile>? additionalFiles = null, string? equivalenceKey = null, Roslynator.Testing.TestOptions? options = null, System.Threading.CancellationToken cancellationToken = default)

Parameters​

file   TestFile

Source file where diagnostic's location is marked with [| and |] tokens.

additionalFiles   IEnumerable<AdditionalFile>

equivalenceKey   String

options   TestOptions

cancellationToken   CancellationToken

Returns​

Task