org.apache.velocity.test
Class ExternalLoggerTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.velocity.test.ExternalLoggerTestCase
All Implemented Interfaces:
junit.framework.Test, LogChute

public class ExternalLoggerTestCase
extends junit.framework.TestCase
implements LogChute

Tests if we can hand Velocity an arbitrary class for logging.

Version:
$Id: ExternalLoggerTestCase.java 463298 2006-10-12 16:10:32Z henning $
Author:
Geir Magnusson Jr.

Field Summary
 
Fields inherited from interface org.apache.velocity.runtime.log.LogChute
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
 
Constructor Summary
ExternalLoggerTestCase(String name)
          Default constructor.
 
Method Summary
 void init(RuntimeServices rs)
           
 boolean isLevelEnabled(int level)
           
 void log(int level, String message)
           
 void log(int level, String message, Throwable t)
           
 void setUp()
           
static junit.framework.Test suite()
           
 void testExternalLogger()
          Runs the test.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, 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

ExternalLoggerTestCase

public ExternalLoggerTestCase(String name)
Default constructor.

Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

init

public void init(RuntimeServices rs)
Specified by:
init in interface LogChute

suite

public static junit.framework.Test suite()

testExternalLogger

public void testExternalLogger()
Runs the test.


log

public void log(int level,
                String message)
Specified by:
log in interface LogChute

log

public void log(int level,
                String message,
                Throwable t)
Specified by:
log in interface LogChute

isLevelEnabled

public boolean isLevelEnabled(int level)
Specified by:
isLevelEnabled in interface LogChute


Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.