com.puppycrawl.tools.checkstyle.checks.coding

Class JUnitTestCaseCheck

Implemented Interfaces:
Configurable, Contextualizable

public final class JUnitTestCaseCheck
extends Check

Ensures that the setUp(), tearDown()methods are named correctly, have no arguments, return void and are either public or protected. Also ensures that suite() is named correctly, have no arguments, return junit.framewotk.Test, public and static. Rationale: often times developers will misname one or more of these methods and not realise that the method is not being called.
Author:
Simon Harris

Method Summary

int[]
getDefaultTokens()
int[]
getRequiredTokens()
void
visitToken(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

getDefaultTokens

public int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check

getRequiredTokens

public int[] getRequiredTokens()
Overrides:
getRequiredTokens in interface Check

visitToken

public void visitToken(DetailAST aAST)
Overrides:
visitToken in interface Check