Rule (JUnit API)

Junit


org.junit Annotation Type Rule


@Retention(value=RUNTIME)
public @interface Rule

Annotates fields that contain rules. Such a field must be public, not static, and a subtype of MethodRule. For more information, see MethodRule