freemarker.testcase
Class TestLog4jExceptionHandler

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by freemarker.testcase.AbstractTestCase
              extended by freemarker.testcase.TestLog4jExceptionHandler
All Implemented Interfaces:
junit.framework.Test

public final class TestLog4jExceptionHandler
extends AbstractTestCase

Performs a simple test on the Log4jExceptionListener class to see whether Log4j works correctly with it.

Version:
$Id: TestLog4jExceptionHandler.java 1128 2005-10-04 11:36:12Z run2000 $

Field Summary
 
Fields inherited from class freemarker.testcase.AbstractTestCase
m_aFilename, m_aReferenceText, m_aTemplateText
 
Constructor Summary
TestLog4jExceptionHandler(java.lang.String name)
          Constructor that passes the name of the test up to the JUnit constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Main method for running the test case.
 void runTest()
          Performs the test.
 void setUp()
          Set up the test case prior to running.
 
Methods inherited from class freemarker.testcase.AbstractTestCase
getReferenceText, getTemplateText, getTestcasePath, getTextFromFile, isTextIdentical, setUpFiles, showTestResults, writeText
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, 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

TestLog4jExceptionHandler

public TestLog4jExceptionHandler(java.lang.String name)
Constructor that passes the name of the test up to the JUnit constructor.

Parameters:
name - the name of the test
Method Detail

setUp

public void setUp()
Set up the test case prior to running.

Overrides:
setUp in class junit.framework.TestCase

runTest

public void runTest()
             throws java.lang.Exception
Performs the test. A fail result will generate information about the failure and pass it up to JUnit.

Overrides:
runTest in class junit.framework.TestCase
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method for running the test case.

Parameters:
args - the command line arguments
Throws:
java.lang.Exception