File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,33 @@ namespace StyleCop.Analyzers.Test.CSharp9.DocumentationRules
99 using StyleCop . Analyzers . Test . CSharp8 . DocumentationRules ;
1010 using StyleCop . Analyzers . Test . Helpers ;
1111 using Xunit ;
12+ using static StyleCop . Analyzers . Test . Verifiers . CustomDiagnosticVerifier < StyleCop . Analyzers . DocumentationRules . SA1611ElementParametersMustBeDocumented > ;
1213
1314 public partial class SA1611CSharp9UnitTests : SA1611CSharp8UnitTests
1415 {
16+ [ Fact ]
17+ [ WorkItem ( 3971 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3971" ) ]
18+ public async Task TestPartialMethodDeclarationMissingParameterDocumentationAsync ( )
19+ {
20+ var testCode = @"
21+ /// <summary>
22+ /// Tests a partial method.
23+ /// </summary>
24+ public partial class TestClass
25+ {
26+ /// <summary>Declaration.</summary>
27+ public partial void TestMethod(int {|#0:value|});
28+
29+ public partial void TestMethod(int value)
30+ {
31+ }
32+ }" ;
33+
34+ var expected = Diagnostic ( ) . WithLocation ( 0 ) . WithArguments ( "value" ) ;
35+
36+ await VerifyCSharpDiagnosticAsync ( testCode , new [ ] { expected } , CancellationToken . None ) . ConfigureAwait ( false ) ;
37+ }
38+
1539 [ Theory ]
1640 [ MemberData ( nameof ( CommonMemberData . RecordTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
1741 [ WorkItem ( 3770 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3770" ) ]
You can’t perform that action at this time.
0 commit comments