Pattern: JUnit - unnecessary tearDown()
Issue: -
Rule that checks checks for JUnit tearDown()
methods that contain only a call to super.tearDown()
. The method is then unnecessary.
This rule sets the default value of the applyToClassNames property to only match class names ending in 'Test', 'Tests' or 'TestCase'.
Here is an example of a violation:
class SomeTest extends TestCase {
void tearDown() { // violation
super.tearDown()
}
}