|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jboss.test.AbstractTestCase
public abstract class AbstractTestCase
An abstract Test Case.
| Constructor Summary | |
|---|---|
AbstractTestCase(String name)
Create a new abstract test case |
|
| Method Summary | |
|---|---|
protected void |
assertEmpty(Collection c)
Asserts a collection is empty |
protected void |
assertEmpty(String context,
Collection c)
Asserts a collection is empty |
protected void |
assertEquals(double one,
double two)
Assert two double values are equal |
protected void |
assertEquals(float one,
float two)
Assert two float values are equal |
protected void |
assertEquals(Object[] expected,
Object[] actual)
Assert two arrays are equal |
protected void |
assertEquals(String context,
Object[] expected,
Object[] actual)
Assert two arrays are equal |
protected void |
checkThrowable(Class expected,
Throwable throwable)
Check we have the expected exception |
protected void |
configureLogging()
Callback for configuring logging at the start of the test |
protected Object |
deserialize(byte[] bytes)
Serialize an object |
protected abstract void |
enableTrace(String name)
Enable trace for a logging category |
static URL |
findResource(Class clazz,
String name)
|
abstract org.jboss.logging.Logger |
getLog()
Get the log for this test |
URL |
getResource(String name)
|
protected byte[] |
serialize(Serializable object)
Serialize an object |
protected void |
setUp()
|
protected void |
tearDown()
|
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTestCase(String name)
name - the test name| Method Detail |
|---|
public abstract org.jboss.logging.Logger getLog()
public URL getResource(String name)
public static URL findResource(Class clazz,
String name)
protected void setUp()
throws Exception
setUp in class junit.framework.TestCaseException
protected void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionprotected void configureLogging()
protected abstract void enableTrace(String name)
name - the logging category
protected void assertEquals(float one,
float two)
one - the expected valuetwo - the actual value
protected void assertEquals(double one,
double two)
one - the expected valuetwo - the actual value
protected void assertEquals(Object[] expected,
Object[] actual)
expected - the expected arrayactual - the actual array
protected void assertEquals(String context,
Object[] expected,
Object[] actual)
context - the contextexpected - the expected arrayactual - the actual arrayprotected void assertEmpty(Collection c)
c - the collection
protected void assertEmpty(String context,
Collection c)
context - the contextc - the collection
protected void checkThrowable(Class expected,
Throwable throwable)
expected - the excepted class of the exceptionthrowable - the real exception
protected byte[] serialize(Serializable object)
throws Exception
object - the object
Exception - for any error
protected Object deserialize(byte[] bytes)
throws Exception
bytes - - the raw serialzied object data
Exception - for any error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||