class JUnitStyleAssertionsRule extends AbstractAstVisitorRule
This rule detects calling JUnit style assertions like assertEquals, assertTrue, assertFalse, assertNull, assertNotNull. Groovy ships with a feature called the "power assert", which is an assert statement with better error reporting. This is preferable to the JUnit assertions.
| 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 |
java.lang.String |
name |
int |
priority |
| Constructor and description |
|---|
JUnitStyleAssertionsRule
() |
Groovy Documentation