@@ -988,6 +988,20 @@ public void Bar(int i)
988988 await this . VerifyCSharpFixAsync ( testCode , fixedTestCode , batchFixedTestCode ) . ConfigureAwait ( false ) ;
989989 }
990990
991+ /// <summary>
992+ /// Verifies that the code fix provider will work properly for a statement.
993+ /// </summary>
994+ /// <param name="statementText">The source code for the first part of a compound statement whose child can be
995+ /// either a statement block or a single statement.</param>
996+ /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
997+ [ Theory ]
998+ [ MemberData ( nameof ( TestStatements ) ) ]
999+ public async Task TestNoSA1503CodeFixForStatementAsync ( string statementText )
1000+ {
1001+ this . suppressSA1503 = true ;
1002+ await this . VerifyCSharpFixAsync ( this . GenerateTestStatement ( statementText ) , this . GenerateFixedTestStatement ( statementText ) ) . ConfigureAwait ( false ) ;
1003+ }
1004+
9911005 /// <inheritdoc/>
9921006 protected override IEnumerable < DiagnosticAnalyzer > GetCSharpDiagnosticAnalyzers ( )
9931007 {
@@ -1009,20 +1023,6 @@ protected override IEnumerable<string> GetDisabledDiagnostics()
10091023 }
10101024 }
10111025
1012- /// <summary>
1013- /// Verifies that the code fix provider will work properly for a statement.
1014- /// </summary>
1015- /// <param name="statementText">The source code for the first part of a compound statement whose child can be
1016- /// either a statement block or a single statement.</param>
1017- /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
1018- [ Theory ]
1019- [ MemberData ( nameof ( TestStatements ) ) ]
1020- public async Task TestNoSA1503CodeFixForStatementAsync ( string statementText )
1021- {
1022- this . suppressSA1503 = true ;
1023- await this . VerifyCSharpFixAsync ( this . GenerateTestStatement ( statementText ) , this . GenerateFixedTestStatement ( statementText ) ) . ConfigureAwait ( false ) ;
1024- }
1025-
10261026 private string GenerateTestStatement ( string statementText )
10271027 {
10281028 var testCodeFormat = @"using System.Diagnostics;
0 commit comments