java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--saffron.test.Main
Main test suite for saffron.
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 |
public Main(java.lang.String s)
Method Detail |
public static java.lang.String[] convertStackToString(java.lang.Throwable e)
e
- the error; may be null. Errors may be chained.public static java.lang.String getErrorMessage(java.lang.Throwable err)
getErrorMessage(Throwable,boolean)
public static java.lang.String getErrorMessage(java.lang.Throwable err, boolean prependClassName)
err
- the errorprependClassName
- 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
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static junit.framework.Test suite() throws java.lang.Exception
TestCase
.
It uses the following properties:SaffronProperties.PROPERTY_saffron_test_Name
is a
comma-separated list of tests (method names) to run within
SaffronProperties.PROPERTY_saffron_test_Class
. If
not specified or empty, run all tests. SaffronProperties.PROPERTY_saffron_test_Class
is the name
of a test class. It must implement Test
.SaffronProperties.PROPERTY_saffron_test_Suite
is the name
of a class which has a method
public static Test
suite()
. The harness executes
that method, and runs the resulting suite.
java.lang.Exception