2025 init
This commit is contained in:
26
pmd-documentation/JUnitSpelling.md
Normal file
26
pmd-documentation/JUnitSpelling.md
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
# 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:*
|
||||
```java
|
||||
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
public class Foo extends TestCase {
|
||||
public void setup() {} // oops, should be setUp
|
||||
public void TearDown() {} // oops, should be tearDown
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user