saffron.test
Class Main

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--saffron.test.Main
All Implemented Interfaces:
junit.framework.Test

public class Main
extends junit.framework.TestCase

Main test suite for saffron.

Since:
18 April, 2002

Constructor Summary
Main(java.lang.String s)
           
 
Method Summary
static java.lang.String[] convertStackToString(java.lang.Throwable e)
          Converts an error into an array of strings, the most recent error first.
static java.lang.String getErrorMessage(java.lang.Throwable err)
           
static java.lang.String getErrorMessage(java.lang.Throwable err, boolean prependClassName)
          Constructs the message associated with an arbitrary Java error, making up one based on the stack trace if there is none.
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
          Creates the main saffron test suite.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Main

public Main(java.lang.String s)
Method Detail

convertStackToString

public static java.lang.String[] convertStackToString(java.lang.Throwable e)
Converts an error into an array of strings, the most recent error first.

Parameters:
e - the error; may be null. Errors may be chained.

getErrorMessage

public static java.lang.String getErrorMessage(java.lang.Throwable err)
See Also:
getErrorMessage(Throwable,boolean)

getErrorMessage

public static java.lang.String getErrorMessage(java.lang.Throwable err,
                                               boolean prependClassName)
Constructs the message associated with an arbitrary Java error, making up one based on the stack trace if there is none.

Parameters:
err - the error
prependClassName - should the error be preceded by the class name of the Java exception? defaults to false, unless the error is derived from SQLException or is exactly a Exception

main

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

suite

public static junit.framework.Test suite()
                                  throws java.lang.Exception
Creates the main saffron test suite. This method has a special meaning to JUnit; see TestCase. It uses the following properties:

java.lang.Exception