JUnit-addons
version 1.4

junitx.tool
Class TestClassValidator

java.lang.Object
  |
  +--junitx.tool.TestClassValidator

public class TestClassValidator
extends java.lang.Object

Checks if a test class can be recognized by the JUnit framework.

Usage

    java TestCaseValidator [-listener classname] [-validator classname] classname
 

Example

    java TestCaseValidator ValidationExample
 
    public class ValidationExample
            extends TestCase {

        public ValidationExample( String name ) {
            super( name );
        }

        public Test suite() {
            return null;
        }

        public void setup() {
        }

        public void tearDown() {
        }

        public void atestDummy() {
            assertTrue( true );
        }
    }
 
prints the following report:
    TestClassValidator, by Vladimir R. Bossicard
    WARN > junitx.example.ValidationExample: method potentially misspelled 
    ERROR> junitx.example.ValidationExample: method 'suite' must be static
    INFO > junitx.example.ValidationExample: method seems to be a test 
 

Version:
$Revision: 1.9 $ $Date: 2003/02/06 20:43:54 $
Author:
Vladimir R. Bossicard, Benoit Xhenseval

Nested Class Summary
static interface TestClassValidator.ClassValidator
          Class reponsible for validating a given class.
static interface TestClassValidator.ClassValidatorListener
          Listener that will receive update from the ClassValidator object.
static class TestClassValidator.DefaultClassValidator
          Provides a default implementation for the ClassValidator interface.
 
Field Summary
static java.lang.String BANNER
          Advertising message
 
Constructor Summary
TestClassValidator()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void setValidator(TestClassValidator.ClassValidator validator)
           
 void setValidatorListener(TestClassValidator.ClassValidatorListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BANNER

public static final java.lang.String BANNER
Advertising message

See Also:
Constant Field Values
Constructor Detail

TestClassValidator

public TestClassValidator()
Method Detail

setValidator

public void setValidator(TestClassValidator.ClassValidator validator)

setValidatorListener

public void setValidatorListener(TestClassValidator.ClassValidatorListener listener)

main

public static void main(java.lang.String[] args)

JUnit-addons
version 1.4

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