org.codenarc.rule.junit
[Groovy] Class JUnitTestMethodWithoutAssertRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.AbstractAstVisitorRule
org.codenarc.rule.junit.JUnitTestMethodWithoutAssertRule
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
- Test:
- annotation. By default this rule applies to the default test class names, but this can be changed using the rule's
applyToClassNames property.
- Authors:
- Hamlet D'Arcy
- Version:
- \$Revision: 604 \$ - \$Date: 2011-02-09 15:53:52 -0500 (Wed, 09 Feb 2011) \$
Methods inherited from class AbstractRule
|
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, isReady, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport, toString, validate |
applyToClassNames
String applyToClassNames
-
assertMethodPatterns
String assertMethodPatterns
-
name
String name
-
priority
int priority
-
getAstVisitor
@Override
AstVisitor getAstVisitor()
-
Groovy Documentation