/junit-checker

Check JUnit annotation usage in compile period

Primary LanguageJavaApache License 2.0Apache-2.0

JUnit Checker

Build Status Maven Central

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!

Snapshot

snapshot1

snapshot2

snapshot3