File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,6 +474,37 @@ public void MethodName(int _)
474474 await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
475475 }
476476
477+ /// <summary>
478+ /// This is a regression test for DotNetAnalyzers/StyleCopAnalyzers#1529:
479+ /// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1529
480+ /// </summary>
481+ /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
482+ [ Fact ]
483+ public async Task TestInheritedInterfacesWithOverloadedMembersAsync ( )
484+ {
485+ var testCode = @"
486+ public interface ITest
487+ {
488+ void Method(int Param1, int param2, int Param3);
489+ void Method();
490+ }
491+
492+ public interface IEmptyInterface { }
493+
494+ public interface IDerivedTest : ITest, IEmptyInterface
495+ {
496+ void Method(int Param1, int param2, int param3);
497+ }" ;
498+ var expected = new [ ]
499+ {
500+ this . CSharpDiagnostic ( ) . WithLocation ( 4 , 21 ) . WithArguments ( "Param1" ) ,
501+ this . CSharpDiagnostic ( ) . WithLocation ( 4 , 45 ) . WithArguments ( "Param3" ) ,
502+ this . CSharpDiagnostic ( ) . WithLocation ( 12 , 21 ) . WithArguments ( "Param1" ) ,
503+ } ;
504+
505+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
506+ }
507+
477508 protected override IEnumerable < DiagnosticAnalyzer > GetCSharpDiagnosticAnalyzers ( )
478509 {
479510 yield return new SA1313ParameterNamesMustBeginWithLowerCaseLetter ( ) ;
You can’t perform that action at this time.
0 commit comments