JUnit-addons
version 1.4

junitx.tool
Class TestClassValidator.DefaultClassValidator

java.lang.Object
  |
  +--junitx.tool.TestClassValidator.DefaultClassValidator
All Implemented Interfaces:
TestClassValidator.ClassValidator
Enclosing class:
TestClassValidator

public static class TestClassValidator.DefaultClassValidator
extends java.lang.Object
implements TestClassValidator.ClassValidator

Provides a default implementation for the ClassValidator interface. This class is meant to become the base class for other, more specific, validators.

Version:
$Revision: 1.9 $ $Date: 2003/02/06 20:43:54 $
Author:
Vladimir R. Bossicard
See Also:
TestClassValidator

Constructor Summary
TestClassValidator.DefaultClassValidator()
           
 
Method Summary
 void setListener(TestClassValidator.ClassValidatorListener listener)
          Sets the listener that will report to the user.
 void validate(java.lang.Class cls)
          Validates a given class and report infos, warnings and errors via the ClassValidatorListener object (if any was set).
protected  void validateOtherMethod(java.lang.reflect.Method method)
          Validates all other methods whose name did not match either 'suite', 'setUp' or 'tearDown'.
protected  void validateSetUpMethod(java.lang.reflect.Method method)
          Verifies that the 'setUp' method is recognized by the JUnit framework.
protected  void validateSuiteMethod(java.lang.reflect.Method method)
          Verifies that the 'suite' method is recognized by the JUnit framework.
protected  void validateTearDownMethod(java.lang.reflect.Method method)
          Verifies that the 'tearDown' method is recognized by the JUnit framework.
protected  void validateTestMethod(java.lang.reflect.Method method)
          Verifies that the 'test' method is recognized by the JUnit framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestClassValidator.DefaultClassValidator

public TestClassValidator.DefaultClassValidator()
Method Detail

setListener

public void setListener(TestClassValidator.ClassValidatorListener listener)
Description copied from interface: TestClassValidator.ClassValidator
Sets the listener that will report to the user. As a general rule All information must be handled by the listener and not by the ClassValidator object itselfs.

Specified by:
setListener in interface TestClassValidator.ClassValidator

validate

public void validate(java.lang.Class cls)
Description copied from interface: TestClassValidator.ClassValidator
Validates a given class and report infos, warnings and errors via the ClassValidatorListener object (if any was set).

Specified by:
validate in interface TestClassValidator.ClassValidator

validateSuiteMethod

protected void validateSuiteMethod(java.lang.reflect.Method method)
Verifies that the 'suite' method is recognized by the JUnit framework.

The method must:

  • be static
  • be public
  • return Test
  • have no argument


validateSetUpMethod

protected void validateSetUpMethod(java.lang.reflect.Method method)
Verifies that the 'setUp' method is recognized by the JUnit framework.

The method must:

  • have no argument


validateTearDownMethod

protected void validateTearDownMethod(java.lang.reflect.Method method)
Verifies that the 'tearDown' method is recognized by the JUnit framework.

The method must:

  • have no argument


validateTestMethod

protected void validateTestMethod(java.lang.reflect.Method method)
Verifies that the 'test' method is recognized by the JUnit framework.

The method must:

  • be public
  • have no argument


validateOtherMethod

protected void validateOtherMethod(java.lang.reflect.Method method)
Validates all other methods whose name did not match either 'suite', 'setUp' or 'tearDown'.


JUnit-addons
version 1.4

Copyright © 2002-2003 Vladimir R. Bossicard. All Rights Reserved.