JUnit Checker
Check JUnit annotation usage in compile period
This is also a sample of deannotation-checker
Motivation
Each JUnit annotation has different restrictions.
For example, @Test
must annotated on 'public non-static void no-arg method', @ClassRule
must annotated on 'public static TestRule method/field'.
Though JUnit will check it before run the tests, but how about check the usage in compile test?
Usage
Depends on junit-checker
in your project.
<dependency>
<groupId>com.github.XDean</groupId>
<artifactId>junit-checker</artifactId>
<version>0.1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
And then, it's done!