de.bechte.junit.runners.validation
Enum ChildrenCountValidator

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

public enum ChildrenCountValidator
extends Enum<ChildrenCountValidator>
implements TestClassValidator

The ChildrenCountValidators validate that the given TestClass contains at least 1 child. If there is no child within the TestClass an error is reported in the List of errors.


Enum Constant Summary
CONTEXT_HIERARCHIES
           
TEST_METHODS
           
 
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 ChildrenCountValidator valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ChildrenCountValidator[] 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

TEST_METHODS

public static final ChildrenCountValidator TEST_METHODS

CONTEXT_HIERARCHIES

public static final ChildrenCountValidator CONTEXT_HIERARCHIES
Method Detail

values

public static ChildrenCountValidator[] 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 (ChildrenCountValidator c : ChildrenCountValidator.values())
    System.out.println(c);

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

valueOf

public static ChildrenCountValidator 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.