de.bechte.junit.runners.validation
Enum RuleValidator

java.lang.Object
  extended by java.lang.Enum<RuleValidator>
      extended by de.bechte.junit.runners.validation.RuleValidator
All Implemented Interfaces:
TestClassValidator, Serializable, Comparable<RuleValidator>

public enum RuleValidator
extends Enum<RuleValidator>
implements TestClassValidator

The RuleValidators validate methods and fields annotated with @Rule. This validators delegate the validation call to the implementation of the RuleMemberValidator class. This class also has a validate method but it does not implement the TestClassValidator interface. Therefore, a simple delegate was created.


Enum Constant Summary
CLASS_RULE_METHOD_VALIDATOR
           
CLASS_RULE_VALIDATOR
           
RULE_METHOD_VALIDATOR
           
RULE_VALIDATOR
           
 
Method Summary
 void validate(org.junit.runners.model.TestClass testClass, List<Throwable> errors)
          Validates the given TestClass and adds all errors to the given List.
static RuleValidator valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RuleValidator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLASS_RULE_VALIDATOR

public static final RuleValidator CLASS_RULE_VALIDATOR

RULE_VALIDATOR

public static final RuleValidator RULE_VALIDATOR

CLASS_RULE_METHOD_VALIDATOR

public static final RuleValidator CLASS_RULE_METHOD_VALIDATOR

RULE_METHOD_VALIDATOR

public static final RuleValidator RULE_METHOD_VALIDATOR
Method Detail

values

public static RuleValidator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RuleValidator c : RuleValidator.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RuleValidator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

validate

public void validate(org.junit.runners.model.TestClass testClass,
                     List<Throwable> errors)
Description copied from interface: TestClassValidator
Validates the given TestClass and adds all errors to the given List.

Specified by:
validate in interface TestClassValidator
Parameters:
testClass - the TestClass to validate
errors - the List of errors


Copyright © 2015. All rights reserved.