Class AbstractMockitoArgumentChecker
java.lang.Object
org.sonar.java.ast.visitors.SubscriptionVisitor
org.sonar.plugins.java.api.IssuableSubscriptionVisitor
org.sonar.java.checks.tests.AbstractMockitoArgumentChecker
- All Implemented Interfaces:
JavaCheck, JavaFileScanner
- Direct Known Subclasses:
MockitoArgumentMatchersUsedOnAllParametersCheck, MockitoEqSimplificationCheck
A visitor that targets the arguments of Mockito methods `given`, `verify`, and `when`.
It also targets the arguments of method calls embedded or chained to `verify` and `when`.
-
Field Summary
Fields inherited from class SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidvisitArguments(Arguments arguments) Visits the argument of a target method and reports an issue if infringing on implemented rule.voidMethods inherited from class IssuableSubscriptionVisitor
addIssue, addIssueOnFile, leaveFile, reportIssue, reportIssue, reportIssue, reportIssue, scanFile, scanTree, setContextMethods inherited from class SubscriptionVisitor
leaveNode, visitToken, visitTriviaMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
AbstractMockitoArgumentChecker
public AbstractMockitoArgumentChecker()
-
-
Method Details
-
nodesToVisit
- Specified by:
nodesToVisitin classSubscriptionVisitor
-
visitNode
- Overrides:
visitNodein classSubscriptionVisitor
-
visitArguments
Visits the argument of a target method and reports an issue if infringing on implemented rule.- Parameters:
arguments- List of arguments of the method
-