@@ -613,14 +613,18 @@ public Test2(int param1, bool param2)
613613}
614614" ;
615615
616- DiagnosticResult [ ] expectedResults =
616+ await new CSharpTest ( this . LanguageVersion )
617617 {
618- Diagnostic ( ) . WithLocation ( 7 , 12 ) ,
619- Diagnostic ( ) . WithLocation ( 11 , 12 ) ,
620- Diagnostic ( ) . WithLocation ( 21 , 12 ) ,
621- } ;
622-
623- await VerifyCSharpFixAsync ( this . LanguageVersion , testCode , expectedResults , fixedTestCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
618+ TestCode = testCode ,
619+ ExpectedDiagnostics =
620+ {
621+ Diagnostic ( ) . WithLocation ( 7 , 12 ) ,
622+ Diagnostic ( ) . WithLocation ( 11 , 12 ) ,
623+ Diagnostic ( ) . WithLocation ( 21 , 12 ) ,
624+ } ,
625+ FixedCode = fixedTestCode ,
626+ DisabledDiagnostics = { "CS1591" } ,
627+ } . RunAsync ( CancellationToken . None ) . ConfigureAwait ( false ) ;
624628 }
625629
626630 /// <summary>
@@ -657,12 +661,16 @@ public class TestClass
657661}
658662" ;
659663
660- DiagnosticResult [ ] expectedResults =
664+ await new CSharpTest ( this . LanguageVersion )
661665 {
662- Diagnostic ( ) . WithLocation ( 7 , 6 ) ,
663- } ;
664-
665- await VerifyCSharpFixAsync ( this . LanguageVersion , testCode , expectedResults , fixedTestCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
666+ TestCode = testCode ,
667+ ExpectedDiagnostics =
668+ {
669+ Diagnostic ( ) . WithLocation ( 7 , 6 ) ,
670+ } ,
671+ FixedCode = fixedTestCode ,
672+ DisabledDiagnostics = { "CS1591" } ,
673+ } . RunAsync ( CancellationToken . None ) . ConfigureAwait ( false ) ;
666674 }
667675
668676 /// <summary>
@@ -689,13 +697,17 @@ public int DoSomething2()
689697}
690698" ;
691699
692- DiagnosticResult [ ] expectedResults =
700+ await new CSharpTest ( this . LanguageVersion )
693701 {
694- Diagnostic ( ) . WithLocation ( 7 , 17 ) ,
695- Diagnostic ( ) . WithLocation ( 11 , 16 ) ,
696- } ;
697-
698- await VerifyCSharpFixAsync ( this . LanguageVersion , testCode , expectedResults , testCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
702+ TestCode = testCode ,
703+ ExpectedDiagnostics =
704+ {
705+ Diagnostic ( ) . WithLocation ( 7 , 17 ) ,
706+ Diagnostic ( ) . WithLocation ( 11 , 16 ) ,
707+ } ,
708+ FixedCode = testCode ,
709+ DisabledDiagnostics = { "CS1591" } ,
710+ } . RunAsync ( CancellationToken . None ) . ConfigureAwait ( false ) ;
699711 }
700712
701713 /// <summary>
@@ -820,17 +832,21 @@ public Task<T> TestMethod6<T>(T param1, int param2)
820832}}
821833" ;
822834
823- DiagnosticResult [ ] expectedResults =
835+ await new CSharpTest ( this . LanguageVersion )
824836 {
825- Diagnostic ( ) . WithLocation ( 9 , 17 ) ,
826- Diagnostic ( ) . WithLocation ( 14 , 22 ) ,
827- Diagnostic ( ) . WithLocation ( 19 , 20 ) ,
828- Diagnostic ( ) . WithLocation ( 24 , 17 ) ,
829- Diagnostic ( ) . WithLocation ( 29 , 22 ) ,
830- Diagnostic ( ) . WithLocation ( 34 , 20 ) ,
831- } ;
832-
833- await VerifyCSharpFixAsync ( this . LanguageVersion , testCode , expectedResults , fixedTestCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
837+ TestCode = testCode ,
838+ ExpectedDiagnostics =
839+ {
840+ Diagnostic ( ) . WithLocation ( 9 , 17 ) ,
841+ Diagnostic ( ) . WithLocation ( 14 , 22 ) ,
842+ Diagnostic ( ) . WithLocation ( 19 , 20 ) ,
843+ Diagnostic ( ) . WithLocation ( 24 , 17 ) ,
844+ Diagnostic ( ) . WithLocation ( 29 , 22 ) ,
845+ Diagnostic ( ) . WithLocation ( 34 , 20 ) ,
846+ } ,
847+ FixedCode = fixedTestCode ,
848+ DisabledDiagnostics = { "CS1591" } ,
849+ } . RunAsync ( CancellationToken . None ) . ConfigureAwait ( false ) ;
834850 }
835851
836852 protected async Task TestTypeDeclarationDocumentationAsync ( string type , string modifiers , bool requiresDiagnostic , bool hasDocumentation )
@@ -1333,6 +1349,7 @@ public class OuterClass
13331349 {
13341350 TestCode = string . Format ( hasDocumentation ? testCodeWithDocumentation : testCodeWithoutDocumentation , modifiers ) ,
13351351 Settings = testSettings ,
1352+ DisabledDiagnostics = { "CS1591" } ,
13361353 } ;
13371354
13381355 if ( requiresDiagnostic )
0 commit comments