Package org.junit.internal.runners.rules
Class RuleMemberValidator
java.lang.Object
org.junit.internal.runners.rules.RuleMemberValidator
A RuleMemberValidator validates the rule fields/methods of a
TestClass
. All reasons for rejecting the
TestClass
are written to a list of errors.
There are four slightly different validators. The CLASS_RULE_VALIDATOR
validates fields with a ClassRule
annotation and the
RULE_VALIDATOR
validates fields with a Rule
annotation.
The CLASS_RULE_METHOD_VALIDATOR
validates methods with a ClassRule
annotation and the
RULE_METHOD_VALIDATOR
validates methods with a Rule
annotation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RuleMemberValidator
Validates methods with aClassRule
annotation.static final RuleMemberValidator
Validates fields with aClassRule
annotation.static final RuleMemberValidator
Validates methods with aRule
annotation.static final RuleMemberValidator
Validates fields with aRule
annotation. -
Method Summary
-
Field Details
-
Method Details
-
validate
Validate theTestClass
and adds reasons for rejecting the class to a list of errors.- Parameters:
target
- theTestClass
to validate.errors
- the list of errors.
-