org.apache.commons.lang.exception
Class AbstractNestableTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.lang.exception.AbstractNestableTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
NestableErrorTestCase, NestableExceptionTestCase, NestableRuntimeExceptionTestCase

public abstract class AbstractNestableTestCase
extends junit.framework.TestCase

Tests implementations of the org.apache.commons.lang.exception.Nestable interface.

Version:
$Id: AbstractNestableTestCase.java 437554 2006-08-28 06:21:41Z bayard $
Author:
Steven Caswell

Constructor Summary
AbstractNestableTestCase(java.lang.String name)
          Constructs an instance of AbstractNestableTestCase.
 
Method Summary
abstract  java.lang.Class getBaseThrowableClass()
          Returns the base class being used, typically Error, Eception or RuntimeException.
abstract  org.apache.commons.lang.exception.Nestable getNestable()
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getNestable(org.apache.commons.lang.exception.Nestable n)
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg)
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg, org.apache.commons.lang.exception.Nestable n)
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg, java.lang.Throwable t)
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getNestable(java.lang.Throwable t)
          Returns an instance of the Nestable implementation being tested.
abstract  org.apache.commons.lang.exception.Nestable getTester1(org.apache.commons.lang.exception.Nestable n)
          Returns an instance of one tester Nestable implementation.
abstract  org.apache.commons.lang.exception.Nestable getTester1(java.lang.String msg, org.apache.commons.lang.exception.Nestable n)
          Returns an instance of one tester Nestable implementation.
abstract  org.apache.commons.lang.exception.Nestable getTester1(java.lang.String msg, java.lang.Throwable t)
          Returns an instance of one tester Nestable implementation.
abstract  org.apache.commons.lang.exception.Nestable getTester1(java.lang.Throwable t)
          Returns an instance of one tester Nestable implementation.
abstract  java.lang.Class getTester1Class()
          Returns the class of the first tester Nestable implementation.
abstract  org.apache.commons.lang.exception.Nestable getTester2(java.lang.String msg, org.apache.commons.lang.exception.Nestable n)
          Returns an instance of a second tester Nestable implementation.
abstract  org.apache.commons.lang.exception.Nestable getTester2(java.lang.String msg, java.lang.Throwable t)
          Returns an instance of a second tester Nestable implementation.
abstract  java.lang.Class getTester2Class()
          Returns the class of the second tester Nestable implementation.
abstract  java.lang.Throwable getThrowable(java.lang.String msg)
          Returns an instance of a Throwable to be used in constructing instances of the Nestable implementation being tested.
abstract  java.lang.Class getThrowableClass()
          Returns the class of the Throwable used in constructing instances of the Nestable implementation being tested.
 void testGetCause()
          Tests the getCause() operation.
 void testGetMessage()
          Tests the getMessage() operation.
 void testGetMessageI()
          Tests the getMessage(int) operation.
 void testGetMessages()
          Tests the getMessages() operation.
 void testGetThrowableCount()
          Tests the getThrowableCount() operation.
 void testGetThrowableI()
          Tests the getThrowable(int) operation.
 void testGetThrowables()
          Tests the getThrowables() operation.
 void testIndexOfThrowable()
          Tests the indexOfThrowable() operation.
 void testIndexOfThrowableI()
          Tests the indexOfThrowable(int) operation.
 void testPrintPartialStackTrace()
          Tests the printPartialStackTrace() operation.
 void testPrintStackTrace()
          Tests the printStackTrace() operation.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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

AbstractNestableTestCase

public AbstractNestableTestCase(java.lang.String name)
Constructs an instance of AbstractNestableTestCase.

Parameters:
name - the test name
Method Detail

testGetCause

public void testGetCause()
Tests the getCause() operation.


testGetThrowableCount

public void testGetThrowableCount()
Tests the getThrowableCount() operation.


testGetMessage

public void testGetMessage()
Tests the getMessage() operation.


testGetMessageI

public void testGetMessageI()
Tests the getMessage(int) operation.


testGetMessages

public void testGetMessages()
Tests the getMessages() operation.


testGetThrowableI

public void testGetThrowableI()
Tests the getThrowable(int) operation.


testGetThrowables

public void testGetThrowables()
Tests the getThrowables() operation.


testIndexOfThrowable

public void testIndexOfThrowable()
Tests the indexOfThrowable() operation.


testIndexOfThrowableI

public void testIndexOfThrowableI()
Tests the indexOfThrowable(int) operation.


testPrintPartialStackTrace

public void testPrintPartialStackTrace()
Tests the printPartialStackTrace() operation.


testPrintStackTrace

public void testPrintStackTrace()
Tests the printStackTrace() operation.


getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable()
Returns an instance of the Nestable implementation being tested.

Returns:
the instance

getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable(org.apache.commons.lang.exception.Nestable n)
Returns an instance of the Nestable implementation being tested.

Parameters:
n - Nestable argument to be provided to the instance constructor
Returns:
the instance

getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg)
Returns an instance of the Nestable implementation being tested.

Parameters:
msg - String argument to be provided to the instance constructor
Returns:
the instance

getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg,
                                                                       org.apache.commons.lang.exception.Nestable n)
Returns an instance of the Nestable implementation being tested.

Parameters:
msg - String argument to be provided to the instance constructor
n - Nestable argument to be provided to the instance constructor
Returns:
the instance

getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable(java.lang.String msg,
                                                                       java.lang.Throwable t)
Returns an instance of the Nestable implementation being tested.

Parameters:
msg - String argument to be provided to the instance constructor
t - Throwable argument to be provided to the instance constructor
Returns:
the instance

getNestable

public abstract org.apache.commons.lang.exception.Nestable getNestable(java.lang.Throwable t)
Returns an instance of the Nestable implementation being tested.

Parameters:
t - Throwable argument to be provided to the instance constructor
Returns:
the instance

getThrowable

public abstract java.lang.Throwable getThrowable(java.lang.String msg)
Returns an instance of a Throwable to be used in constructing instances of the Nestable implementation being tested.

Parameters:
msg - String argument to be provided to the instance constructor
Returns:
the instance

getTester1

public abstract org.apache.commons.lang.exception.Nestable getTester1(org.apache.commons.lang.exception.Nestable n)
Returns an instance of one tester Nestable implementation.

Parameters:
n - Nestable argument to be provided to the instance constructor
Returns:
the instance

getTester1

public abstract org.apache.commons.lang.exception.Nestable getTester1(java.lang.Throwable t)
Returns an instance of one tester Nestable implementation.

Parameters:
t - Throwable argument to be provided to the instance constructor
Returns:
the instance

getTester1

public abstract org.apache.commons.lang.exception.Nestable getTester1(java.lang.String msg,
                                                                      org.apache.commons.lang.exception.Nestable n)
Returns an instance of one tester Nestable implementation.

Parameters:
msg - String argument to be provided to the instance constructor
n - Nestable argument to be provided to the instance constructor
Returns:
the instance

getTester1

public abstract org.apache.commons.lang.exception.Nestable getTester1(java.lang.String msg,
                                                                      java.lang.Throwable t)
Returns an instance of one tester Nestable implementation.

Parameters:
msg - String argument to be provided to the instance constructor
t - Throwable argument to be provided to the instance constructor
Returns:
the instance

getTester2

public abstract org.apache.commons.lang.exception.Nestable getTester2(java.lang.String msg,
                                                                      org.apache.commons.lang.exception.Nestable n)
Returns an instance of a second tester Nestable implementation.

Parameters:
msg - String argument to be provided to the instance constructor
n - Nestable argument to be provided to the instance constructor
Returns:
the instance

getTester2

public abstract org.apache.commons.lang.exception.Nestable getTester2(java.lang.String msg,
                                                                      java.lang.Throwable t)
Returns an instance of a second tester Nestable implementation.

Parameters:
msg - String argument to be provided to the instance constructor
t - Throwable argument to be provided to the instance constructor
Returns:
the instance

getTester1Class

public abstract java.lang.Class getTester1Class()
Returns the class of the first tester Nestable implementation.

Returns:
the class

getTester2Class

public abstract java.lang.Class getTester2Class()
Returns the class of the second tester Nestable implementation.

Returns:
the class

getThrowableClass

public abstract java.lang.Class getThrowableClass()
Returns the class of the Throwable used in constructing instances of the Nestable implementation being tested.

Returns:
the class

getBaseThrowableClass

public abstract java.lang.Class getBaseThrowableClass()
Returns the base class being used, typically Error, Eception or RuntimeException.

Returns:
the class


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