org.apache.velocity.test
Class MethodOverloadingTestCase

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

public class MethodOverloadingTestCase
extends BaseTestCase
implements LogChute

Test a reported bug in which method overloading throws IllegalArgumentException after a null return value. (VELOCITY-132).

Version:
$Id: MethodOverloadingTestCase.java 463298 2006-10-12 16:10:32Z henning $
Author:
Will Glass-Husain

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
 
Fields inherited from interface org.apache.velocity.test.TemplateTestBase
RESULT_DIR, TEST_CASE_PROPERTIES, TEST_COMPARE_DIR, TEST_RESULT_DIR
 
Constructor Summary
MethodOverloadingTestCase(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)
           
 String overloadedMethod(Integer s)
           
 String overloadedMethod(String s)
           
 String overloadedMethod2(Integer s)
           
 String overloadedMethod2(String i)
           
 void setUp()
           
 void setupContext(Context context)
           
static junit.framework.Test suite()
           
 void testFile(String basefilename)
           
 void testMethodOverloading()
           
 void testParsedMethodOverloading()
           
 
Methods inherited from class org.apache.velocity.test.BaseTestCase
assureResultsDirectoryExists, getFileContents, getFileName, getFileName, getTestCaseName, isMatch, isMatch, normalizeNewlines
 
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

MethodOverloadingTestCase

public MethodOverloadingTestCase(String name)
Default constructor.

Method Detail

setUp

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

suite

public static junit.framework.Test suite()

testMethodOverloading

public void testMethodOverloading()
                           throws Exception
Throws:
Exception

testParsedMethodOverloading

public void testParsedMethodOverloading()
                                 throws Exception
Throws:
Exception

testFile

public void testFile(String basefilename)
              throws Exception
Throws:
Exception

setupContext

public void setupContext(Context context)

overloadedMethod

public String overloadedMethod(Integer s)

overloadedMethod

public String overloadedMethod(String s)

overloadedMethod2

public String overloadedMethod2(Integer s)

overloadedMethod2

public String overloadedMethod2(String i)

log

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

init

public void init(RuntimeServices rs)
Specified by:
init 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.