de.bechte.junit.runners.validation
Enum ConstructorValidator
java.lang.Object
java.lang.Enum<ConstructorValidator>
de.bechte.junit.runners.validation.ConstructorValidator
- All Implemented Interfaces:
- TestClassValidator, Serializable, Comparable<ConstructorValidator>
public enum ConstructorValidator
- extends Enum<ConstructorValidator>
- implements TestClassValidator
The ConstructorValidator validates that test classes have only one public constructor that takes no
arguments for top-level classes and exactly one argument for enclosed classes of type of the enclosing class.
VALID_CONSTRUCTOR
public static final ConstructorValidator VALID_CONSTRUCTOR
values
public static ConstructorValidator[] 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 (ConstructorValidator c : ConstructorValidator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static ConstructorValidator 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.