Files
VV-ISTIC-TP3/pmd-documentation/JUnitSpelling.md
Romain Lefeuvre 7155dd77be 2025 init
2025-11-18 14:43:08 +01:00

689 B

JUnitSpelling

Usage: pmd check -d <source code folder> -R category/java/errorprone.xml/JUnitSpelling -format <output format>

Description:

        In JUnit 3, the setUp method is used to set up all data entities required in running tests.
        The tearDown method is used to clean up all data entities required in running tests.
        You should not misspell method name if you want your test to set up and clean up everything correctly.

Example:



import junit.framework.*;

public class Foo extends TestCase {
    public void setup() {}    // oops, should be setUp
    public void TearDown() {} // oops, should be tearDown
}