de.bechte.junit.runners.validation
Enum ConstructorValidator

java.lang.Object
  extended by java.lang.Enum<ConstructorValidator>
      extended by 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.


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

VALID_CONSTRUCTOR

public static final ConstructorValidator VALID_CONSTRUCTOR
Method Detail

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 validate
errors - the List of errors


Copyright © 2015. All rights reserved.