org.apache.velocity.test
Class ClassloaderChangeTestCase

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

public class ClassloaderChangeTestCase
extends junit.framework.TestCase
implements org.apache.velocity.runtime.log.LogChute

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

Version:
$Id: ClassloaderChangeTestCase.java 680817 2008-07-29 19:49:41Z nbubna $
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
ClassloaderChangeTestCase(String name)
          Default constructor.
 
Method Summary
 void init(org.apache.velocity.runtime.RuntimeServices rs)
           
 boolean isLevelEnabled(int level)
           
 void log(int level, String message)
          method to catch Velocity log messages.
 void log(int level, String message, Throwable t)
          method to catch Velocity log messages.
 void setUp()
           
static junit.framework.Test suite()
           
 void testClassloaderChange()
          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

ClassloaderChangeTestCase

public ClassloaderChangeTestCase(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(org.apache.velocity.runtime.RuntimeServices rs)
Specified by:
init in interface org.apache.velocity.runtime.log.LogChute

suite

public static junit.framework.Test suite()

testClassloaderChange

public void testClassloaderChange()
                           throws Exception
Runs the test.

Throws:
Exception

log

public void log(int level,
                String message)
method to catch Velocity log messages. When we see the introspector dump message, then set the flag

Specified by:
log in interface org.apache.velocity.runtime.log.LogChute

log

public void log(int level,
                String message,
                Throwable t)
method to catch Velocity log messages. When we see the introspector dump message, then set the flag

Specified by:
log in interface org.apache.velocity.runtime.log.LogChute

isLevelEnabled

public boolean isLevelEnabled(int level)
Specified by:
isLevelEnabled in interface org.apache.velocity.runtime.log.LogChute


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