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, org.apache.velocity.runtime.log.LogChute, TemplateTestBase

public class MethodOverloadingTestCase
extends BaseTestCase
implements org.apache.velocity.runtime.log.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 class org.apache.velocity.test.BaseTestCase
context, DEBUG, engine, log, stringRepoName
 
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(org.apache.velocity.runtime.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(org.apache.velocity.context.Context context)
           
static junit.framework.Test suite()
           
 void testFile(String basefilename)
           
 void testMethodOverloading()
           
 void testParsedMethodOverloading()
           
 
Methods inherited from class org.apache.velocity.test.BaseTestCase
addTemplate, assertContextValue, assertEvalEquals, assertEvalException, assertEvalException, assertEvalExceptionAt, assertEvalExceptionAt, assertSchmoo, assertTmplEquals, assureResultsDirectoryExists, evaluate, getFileContents, getFileName, getFileName, getStringRepository, getTestCaseName, info, info, isMatch, isMatch, normalizeNewlines, removeTemplate, setUpContext, setUpEngine, tearDown, testBase
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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 BaseTestCase

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(org.apache.velocity.context.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 org.apache.velocity.runtime.log.LogChute

init

public void init(org.apache.velocity.runtime.RuntimeServices rs)
Specified by:
init in interface org.apache.velocity.runtime.log.LogChute

log

public void log(int level,
                String message,
                Throwable t)
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.