Groovy Documentation

groovy.org.codenarc.rule.junit
[Groovy] Class JUnitTestMethodWithoutAssertRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.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


Property Summary
String applyToClassNames

String assertMethodPatterns

String name

int priority

 
Method Summary
AstVisitor getAstVisitor()

 

Property Detail

applyToClassNames

String applyToClassNames


assertMethodPatterns

String assertMethodPatterns


name

String name


priority

int priority


 
Method Detail

getAstVisitor

@Override
AstVisitor getAstVisitor()


 

Groovy Documentation