This rule detects JUnit calling assertEquals where the first parameter is a boolean. These assertions should be made by more specific methods, like assertTrue or assertFalse. If the checkAssertStatements property is true, then it also checks for assert statements, e.g. assert x == true.
Fields inherited from class | Fields |
---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
Type | Name and description |
---|---|
java.lang.String |
applyToClassNames |
java.lang.Class |
astVisitorClass |
boolean |
checkAssertStatements |
java.lang.String |
name |
int |
priority |