API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.testing. JOTTester View Source
Author(s)
Thibaut Colar http://jot.colar.net/
Since
Version
Serial
Hierarchy
 Object
      JOTTester
Implements
Subclasses
Description
public class JOTTester
  This is the Main class of the "Tester"
The Tester is used to run all the test code you added in your own classes.
You add test code to your own classes by implementing :
public static void jotTest() throws Throwable {}
You can run the tester either by using this class "Main method" or using the Ant task provided.
Note: you could also run this class from your own java code if you wanted to.
Call the -help option to get more infos.
See also:   
Constructors
private JOTTester ()
Methods
Hide/Show inherited methods
publicstatic boolean checkIf (String message, boolean test) throws JOTTestException
publicstatic boolean checkIf (String message, boolean test, String failureInfos) throws JOTTestException
  Use this to run an individual check
ie: checkIf(myValue==3);
publicstatic boolean checkThrowsException (Class exceptionType, String method, Object args) throws JOTTestException
  Use this to run an Exception test
You should create a test method that throws the exception you want to test
And call this to test the exception is indeed thrown
ie: checkThrowsException(java.lang.NullPointerException.class,"myExceptionTestMethod",null);
public String getEmailAlways ()
public String getEmailOnFailure ()
public String getExcludePkgs ()
public String getIncludePkgs ()
publicfinalstatic JOTTester getInstance ()
protected int getNumberOfFailures ()
protected int getNumberOfTests ()
public int getNumberOfWarnings ()
public int getOutputFormat ()
public OutputStream getOutputTo ()
public Vector getTestableClasses (String path, String packages, String currentPackage)
  Sercahes for classes that have implemented the test function
public boolean isClassTestable (String className)
public boolean isDebug ()
public boolean isSelfTestMode ()
public boolean isSof ()
publicstatic void main (String args)
  Main method to be called from the command line
protected void output (String s, int outputType)
protected boolean runTest (String className, boolean stopOnFailure)
  Run the test method(jotTest) of the given class
public boolean runTests (String classpath)
  Runs all the tests in all the classes in the given classpath, (filtered by packages)
public void setDebug (boolean debug)
public void setEmailAlways (String emailAlways)
public void setEmailOnFailure (String emailOnFailure)
protected void setEnableDisplay (boolean enable)
Enable/Disable display of messages (test results)
public void setExcludePkgs (String excludePkgs)
public void setIncludePkgs (String includePkgs)
protected void setNumberOfFailures (int numberOfFailures)
protected void setNumberOfTests (int numberOfTests)
public void setNumberOfWarnings (int numberOfWarnings)
public void setOutputFormat (int outputFormat)
public void setOutputTo (String file)
public void setSelfTestMode (boolean selfTestMode)
public void setStopOnFailure (boolean sof)
publicstatic boolean singleTest (JOTTestable test, boolean stopOnFailure) throws Throwable
  Runs a single Test class
publicstatic void tag (String tag)
  Lets the user output a custom text (tag)
publicstatic boolean warnIf (String message, boolean test) throws JOTTestException
publicstatic boolean warnIf (String message, boolean test, String infos) throws JOTTestException
Fields
Hide/Show inherited fields
protectedfinalstatic String TEST_METHOD_NAME = "jotTest"
The name of the test method
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar