|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--junit.log4j.LoggedTestCase
Extension of TestCase
integrating
Log4J.
Created: Fri Nov 02 14:21:45 2001
Field Summary | |
protected org.apache.log4j.Category |
category
|
protected boolean |
isLog4jInClasspath
|
Constructor Summary | |
LoggedTestCase()
Calls LoggedTestCase( . |
|
LoggedTestCase(java.lang.String name)
Calls LoggedTestCase( . |
|
LoggedTestCase(java.lang.String name,
java.lang.String propertyFile)
Creates a new LoggedTestCase instance. |
Method Summary | |
void |
debug(java.lang.Object message)
Redirection to debug()
in the testcase category . |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
Redirection to debug()
in the testcase category . |
void |
error(java.lang.Object message)
Redirection to error()
in the testcase category . |
void |
error(java.lang.Object message,
java.lang.Throwable t)
Redirection to error()
in the testcase category . |
void |
fatal(java.lang.Object message)
Redirection to fatal()
in the testcase category . |
void |
fatal(java.lang.Object message,
java.lang.Throwable t)
Redirection to fatal()
in the testcase category . |
java.util.Properties |
getProperties()
Get the value of properties. |
void |
info(java.lang.Object message)
Redirection to info()
in the testcase category . |
void |
info(java.lang.Object message,
java.lang.Throwable t)
Redirection to info()
in the testcase category . |
void |
setProperties(java.util.Properties v)
Set the value of properties. |
protected void |
setUp()
Setup of the test case. |
protected void |
tearDown()
Tear down of the test case. |
void |
warn(java.lang.Object message)
Redirection to warn()
in the testcase category . |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
Redirection to warn()
in the testcase category . |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected org.apache.log4j.Category category
protected boolean isLog4jInClasspath
Constructor Detail |
public LoggedTestCase(java.lang.String name, java.lang.String propertyFile)
Creates a new LoggedTestCase
instance. The
Log4J
properties are read from the file propertyFile
from the
classpath. If the file does not exist, the default
Log4J
properties are used.
stdout
. This is to make it easy on user
who do not want to have to download log4j and put it in their
classpath !name
- name of the testcasepropertyFile
- file name of the property file
for the configurationpublic LoggedTestCase(java.lang.String name)
LoggedTestCase(name
,
log4j.properties
)
.name
- test case namepublic LoggedTestCase()
LoggedTestCase(null
)
.Method Detail |
protected void setUp() throws java.lang.Exception
priority INFO
.setUp
in class junit.framework.TestCase
java.lang.Exception
- if an error occursprotected void tearDown() throws java.lang.Exception
priority INFO
.tearDown
in class junit.framework.TestCase
java.lang.Exception
- if an error occurspublic void debug(java.lang.Object message)
debug()
in the testcase category
.message
- the message object to logpublic void debug(java.lang.Object message, java.lang.Throwable t)
debug()
in the testcase category
.message
- the message object to logt
- the exception to log, including its stack tracepublic void error(java.lang.Object message)
error()
in the testcase category
.message
- the message object to logpublic void error(java.lang.Object message, java.lang.Throwable t)
error()
in the testcase category
.message
- the message object to logt
- the exception to log, including its stack tracepublic void fatal(java.lang.Object message)
fatal()
in the testcase category
.message
- the message object to logpublic void fatal(java.lang.Object message, java.lang.Throwable t)
fatal()
in the testcase category
.message
- the message object to logt
- the exception to log, including its stack tracepublic void info(java.lang.Object message)
info()
in the testcase category
.message
- the message object to logpublic void info(java.lang.Object message, java.lang.Throwable t)
info()
in the testcase category
.message
- the message object to logt
- the exception to log, including its stack tracepublic void warn(java.lang.Object message)
warn()
in the testcase category
.message
- the message object to logpublic void warn(java.lang.Object message, java.lang.Throwable t)
warn()
in the testcase category
.message
- the message object to logt
- the exception to log, including its stack tracepublic java.util.Properties getProperties()
public void setProperties(java.util.Properties v)
v
- Value to assign to properties.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |