Package org.junit.internal.runners.rules
Class RuleMemberValidator
- java.lang.Object
-
- org.junit.internal.runners.rules.RuleMemberValidator
-
public class RuleMemberValidator extends Object
A RuleMemberValidator validates the rule fields/methods of aTestClass
. All reasons for rejecting theTestClass
are written to a list of errors.There are four slightly different validators. The
CLASS_RULE_VALIDATOR
validates fields with aClassRule
annotation and theRULE_VALIDATOR
validates fields with aRule
annotation.The
CLASS_RULE_METHOD_VALIDATOR
validates methods with aClassRule
annotation and theRULE_METHOD_VALIDATOR
validates methods with aRule
annotation.
-
-
Field Summary
Fields Modifier and Type Field Description static RuleMemberValidator
CLASS_RULE_METHOD_VALIDATOR
Validates methods with aClassRule
annotation.static RuleMemberValidator
CLASS_RULE_VALIDATOR
Validates fields with aClassRule
annotation.static RuleMemberValidator
RULE_METHOD_VALIDATOR
Validates methods with aRule
annotation.static RuleMemberValidator
RULE_VALIDATOR
Validates fields with aRule
annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(TestClass target, List<Throwable> errors)
Validate theTestClass
and adds reasons for rejecting the class to a list of errors.
-
-
-
Field Detail
-
CLASS_RULE_VALIDATOR
public static final RuleMemberValidator CLASS_RULE_VALIDATOR
Validates fields with aClassRule
annotation.
-
RULE_VALIDATOR
public static final RuleMemberValidator RULE_VALIDATOR
Validates fields with aRule
annotation.
-
CLASS_RULE_METHOD_VALIDATOR
public static final RuleMemberValidator CLASS_RULE_METHOD_VALIDATOR
Validates methods with aClassRule
annotation.
-
RULE_METHOD_VALIDATOR
public static final RuleMemberValidator RULE_METHOD_VALIDATOR
Validates methods with aRule
annotation.
-
-