|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
junit.com.mcdermottroe.exemplar.ExemplarTestCase<T>
junit.com.mcdermottroe.exemplar.NormalClassTestCase<Exception>
junit.com.mcdermottroe.exemplar.ExceptionClassTestCase<T>
T - The type of Exception being tested.public abstract class ExceptionClassTestCase<T extends Exception>
Test class for all exception classes.
| Field Summary |
|---|
| Fields inherited from class junit.com.mcdermottroe.exemplar.NormalClassTestCase |
|---|
allowPublicStaticMembers, ignoreHashCodeTests |
| Fields inherited from class junit.com.mcdermottroe.exemplar.ExemplarTestCase |
|---|
DELIBERATE_PASS, testedClass, TMP |
| Constructor Summary | |
|---|---|
ExceptionClassTestCase()
|
|
| Method Summary | |
|---|---|
protected Exception |
sampleFromNoArgConstructor()
Create a sample object using the no-arg constructor. |
protected Exception |
sampleFromStringConstructor()
Create a sample object using the String constructor. |
protected Exception |
sampleFromStringThrowableConstructor()
Create a sample object using the String, Throwable
constructor. |
protected Exception |
sampleFromThrowableConstructor()
Create a sample object using the Throwable constructor. |
void |
setUp()
Set up the JUnit test. |
void |
testGetBackTrace()
Test the method Exception.getBackTrace() on a set of sample
objects. |
void |
testInheritsFromExemplarException()
Test to ensure that Exception classes inherit from Throwable
via the exemplar version of Exception rather than from the
standard Exception. |
void |
testNoArgConstructor()
Test that a no-arg constructor is available and can be used to create an instance of the Exception class. |
void |
testOneStringConstructor()
Test that a constructor which takes a single argument of type String is available and can be used to create an instance of the
Exception class. |
void |
testOneThrowableConstructor()
Test that a constructor which takes a single argument of type Throwable is available and can be used to create an instance of the
Exception class. |
void |
testStringThrowableConstructor()
Test that a constructor which takes two arguments, a String and
a Throwable in that order, is available and can be used to
create an instance of the Exception class. |
void |
testToString()
Test the method Exception.toString() on a set of sample
objects. |
| Methods inherited from class junit.com.mcdermottroe.exemplar.ExemplarTestCase |
|---|
getTestedClass, testAllMethodsBeingTested, testCorrectPackage |
| 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, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionClassTestCase()
| Method Detail |
|---|
public void setUp()
throws Exception
setUp in class NormalClassTestCase<Exception>Exception - if TestCase.setUp() throws one.ExemplarTestCase.testedClass,
TestCase.setUp()public void testInheritsFromExemplarException()
Throwable
via the exemplar version of Exception rather than from the
standard Exception.
public void testNoArgConstructor()
Exception class.
Exception.Exception()public void testOneStringConstructor()
String is available and can be used to create an instance of the
Exception class.
Exception.Exception(String)public void testOneThrowableConstructor()
Throwable is available and can be used to create an instance of the
Exception class.
Exception.Exception(Throwable)public void testStringThrowableConstructor()
String and
a Throwable in that order, is available and can be used to
create an instance of the Exception class.
Exception.Exception(String, Throwable)public void testGetBackTrace()
Exception.getBackTrace() on a set of sample
objects.
public void testToString()
Exception.toString() on a set of sample
objects.
protected Exception sampleFromNoArgConstructor()
throws IllegalAccessException,
InstantiationException,
InvocationTargetException,
NoSuchMethodException
Exception created using
the no-arg constructor.
IllegalAccessException - if the constructor is not
accessible.
InstantiationException - if the constructor fails to be
called.
InvocationTargetException - if the constructor throws an
exception.
NoSuchMethodException - if the no-arg constructor does not
exist.
protected Exception sampleFromStringConstructor()
throws IllegalAccessException,
InstantiationException,
InvocationTargetException,
NoSuchMethodException
String constructor.
Exception created using
the String constructor.
IllegalAccessException - if the constructor is not
accessible.
InstantiationException - if the constructor fails to be
called.
InvocationTargetException - if the constructor throws an
exception.
NoSuchMethodException - if the no-arg constructor does not
exist.
protected Exception sampleFromThrowableConstructor()
throws IllegalAccessException,
InstantiationException,
InvocationTargetException,
NoSuchMethodException
Throwable constructor.
Exception created using
the Throwable constructor.
IllegalAccessException - if the constructor is not
accessible.
InstantiationException - if the constructor fails to be
called.
InvocationTargetException - if the constructor throws an
exception.
NoSuchMethodException - if the no-arg constructor does not
exist.
protected Exception sampleFromStringThrowableConstructor()
throws IllegalAccessException,
InstantiationException,
InvocationTargetException,
NoSuchMethodException
String, Throwable
constructor.
Exception created using
the String, Throwable constructor.
IllegalAccessException - if the constructor is not
accessible.
InstantiationException - if the constructor fails to be
called.
InvocationTargetException - if the constructor throws an
exception.
NoSuchMethodException - if the no-arg constructor does not
exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||