@@ -8,6 +8,9 @@ namespace StyleCop.Analyzers.Test.CSharp7.MaintainabilityRules
88 using StyleCop . Analyzers . Test . MaintainabilityRules ;
99 using TestHelper ;
1010 using Xunit ;
11+ using static StyleCop . Analyzers . Test . Verifiers . StyleCopCodeFixVerifier <
12+ StyleCop . Analyzers . MaintainabilityRules . SA1119StatementMustNotUseUnnecessaryParenthesis ,
13+ StyleCop . Analyzers . MaintainabilityRules . SA1119CodeFixProvider > ;
1114
1215 public class SA1119CSharp7UnitTests : SA1119UnitTests
1316 {
@@ -31,7 +34,7 @@ public void Bar()
3134 }
3235}" ;
3336
34- await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
37+ await VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
3538 }
3639
3740 [ Fact ]
@@ -50,7 +53,7 @@ public void Bar()
5053 }
5154}" ;
5255
53- await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
56+ await VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
5457 }
5558
5659 [ Fact ]
@@ -73,14 +76,12 @@ public void Bar()
7376
7477 DiagnosticResult [ ] expected =
7578 {
76- this . CSharpDiagnostic ( DiagnosticId ) . WithLocation ( 5 , 38 ) ,
77- this . CSharpDiagnostic ( ParenthesesDiagnosticId ) . WithLocation ( 5 , 38 ) ,
78- this . CSharpDiagnostic ( ParenthesesDiagnosticId ) . WithLocation ( 5 , 40 ) ,
79+ Diagnostic ( DiagnosticId ) . WithLocation ( 5 , 38 ) ,
80+ Diagnostic ( ParenthesesDiagnosticId ) . WithLocation ( 5 , 38 ) ,
81+ Diagnostic ( ParenthesesDiagnosticId ) . WithLocation ( 5 , 40 ) ,
7982 } ;
8083
81- await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
82- await this . VerifyCSharpDiagnosticAsync ( fixedCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
83- await this . VerifyCSharpFixAsync ( testCode , fixedCode ) . ConfigureAwait ( false ) ;
84+ await VerifyCSharpFixAsync ( testCode , expected , fixedCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
8485 }
8586 }
8687}
0 commit comments