de.bechte.junit.runners.validation
Enum ChildrenCountValidator
java.lang.Object
java.lang.Enum<ChildrenCountValidator>
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.
TEST_METHODS
public static final ChildrenCountValidator TEST_METHODS
CONTEXT_HIERARCHIES
public static final ChildrenCountValidator CONTEXT_HIERARCHIES
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 validateerrors - the List of errors
Copyright © 2015. All rights reserved.