File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Mocking.Helpers/Mocking.Helpers Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,14 @@ static internal IEnumerable<IMethodSymbol> GetCandidatesMockedMethodSignaturesFo
5757 /// Get all signature candidates which have parameters in a lambda call
5858 /// </summary>
5959 /// <param name="semanticModel"></param>
60- /// <param name="methodToMockInLambda "></param>
60+ /// <param name="methodToMock "></param>
6161 /// <returns></returns>
62- static internal IEnumerable < IMethodSymbol > GetCandidatesMockedMethodSignatures ( SemanticModel semanticModel , InvocationExpressionSyntax methodToMockInLambda )
62+ static internal IEnumerable < IMethodSymbol > GetCandidatesMockedMethodSignatures ( SemanticModel semanticModel , InvocationExpressionSyntax methodToMock )
6363 {
64- if ( methodToMockInLambda == null ) return Enumerable . Empty < IMethodSymbol > ( ) ;
64+ if ( methodToMock == null ) return Enumerable . Empty < IMethodSymbol > ( ) ;
6565
6666 var mockSignatures = new List < IMethodSymbol > ( ) ;
67- var symbolInfo = semanticModel . GetSymbolInfo ( methodToMockInLambda ) ;
67+ var symbolInfo = semanticModel . GetSymbolInfo ( methodToMock ) ;
6868
6969 // not what are searching but still a method
7070 if ( symbolInfo . CandidateReason == CandidateReason . None && symbolInfo . Symbol is IMethodSymbol methodSymbol )
@@ -75,7 +75,7 @@ static internal IEnumerable<IMethodSymbol> GetCandidatesMockedMethodSignatures(S
7575 {
7676 mockSignatures . AddRange ( symbolInfo . CandidateSymbols . OfType < IMethodSymbol > ( ) ) ;
7777 }
78- return mockSignatures . Where ( m => m . Parameters . Any ( ) ) ;
78+ return mockSignatures . Where ( m => ! m . IsStatic && m . Parameters . Any ( ) ) ;
7979 }
8080 }
8181}
You can’t perform that action at this time.
0 commit comments