org.apache.velocity.test
Class MethodInvocationExceptionTestCase

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

public class MethodInvocationExceptionTestCase
extends junit.framework.TestCase

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

Version:
$Id: MethodInvocationExceptionTestCase.java 704299 2008-10-14 03:13:16Z nbubna $
Author:
Geir Magnusson Jr.

Field Summary
protected  boolean DEBUG
           
 
Constructor Summary
MethodInvocationExceptionTestCase(String name)
          Default constructor.
 
Method Summary
 void doException()
           
 void getFoo()
           
protected  void log(String out)
           
 void setFoo(String foo)
           
 void setUp()
           
static junit.framework.Test suite()
           
 void testCapitalizedGetterMethodInvocationException()
           
 void testGetterMethodInvocationException()
           
 void testMacroInvocationException()
          test that no exception is thrown when in parameter to macro.
 void testNormalMethodInvocationException()
          Runs the test : uses the Velocity class to eval a string which accesses a method that throws an exception.
 void testSetterMethodInvocationException()
           
 
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
 

Field Detail

DEBUG

protected boolean DEBUG
Constructor Detail

MethodInvocationExceptionTestCase

public MethodInvocationExceptionTestCase(String name)
Default constructor.

Parameters:
name -
Method Detail

setUp

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

suite

public static junit.framework.Test suite()

log

protected void log(String out)

testNormalMethodInvocationException

public void testNormalMethodInvocationException()
                                         throws Exception
Runs the test : uses the Velocity class to eval a string which accesses a method that throws an exception.

Throws:
Exception

testGetterMethodInvocationException

public void testGetterMethodInvocationException()
                                         throws Exception
Throws:
Exception

testCapitalizedGetterMethodInvocationException

public void testCapitalizedGetterMethodInvocationException()
                                                    throws Exception
Throws:
Exception

testSetterMethodInvocationException

public void testSetterMethodInvocationException()
                                         throws Exception
Throws:
Exception

testMacroInvocationException

public void testMacroInvocationException()
                                  throws Exception
test that no exception is thrown when in parameter to macro. This is the way we expect the system to work, but it would be better to throw an exception.

Throws:
Exception

doException

public void doException()
                 throws Exception
Throws:
Exception

getFoo

public void getFoo()
            throws Exception
Throws:
Exception

setFoo

public void setFoo(String foo)
            throws Exception
Throws:
Exception


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