class JUnitTestMethodWithoutAssertRule extends AbstractAstVisitorRule
This rule searches for test methods that do not contain assert statements. Either the test method is missing assert statements, which is an error, or the test method contains custom assert statements that do not follow a proper assert naming convention. Test methods are defined as public void methods that begin with the work test or have a
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.String |
assertMethodPatterns |
java.lang.String |
name |
int |
priority |
Constructor and description |
---|
JUnitTestMethodWithoutAssertRule() |
Type Params | Return Type | Name and description |
---|---|---|
|
AstVisitor |
getAstVisitor() |
Groovy Documentation