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 RuleMemberValidatorValidates methods with aClassRuleannotation.static final RuleMemberValidatorValidates fields with aClassRuleannotation.static final RuleMemberValidatorValidates methods with aRuleannotation.static final RuleMemberValidatorValidates fields with aRuleannotation. -
Method Summary
-
Field Details
-
Method Details
-
validate
Validate theTestClassand adds reasons for rejecting the class to a list of errors.- Parameters:
target- theTestClassto validate.errors- the list of errors.
-