|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.unitils.UnitilsJUnit3
public abstract class UnitilsJUnit3
Base test class that will Unitils-enable your test. This base class will make sure that the
core unitils test listener methods are invoked in the expected order. See TestListener
for
more information on the listener invocation order.
Constructor Summary | |
---|---|
UnitilsJUnit3()
Creates a test without a name. |
|
UnitilsJUnit3(String name)
Creates a test with the given name. |
Method Summary | |
---|---|
protected Method |
getCurrentTestMethod()
Gets the method that has the same name as the current test. |
protected TestListener |
getTestListener()
|
protected Unitils |
getUnitils()
This will return the default singleton instance by calling Unitils.getInstance() . |
void |
runBare()
Overriden JUnit3 method to be able to call TestListener.beforeTestSetUp(java.lang.Object, java.lang.reflect.Method) and TestListener.afterTestTearDown(java.lang.Object, java.lang.reflect.Method) . |
protected void |
runTest()
Overriden JUnit3 method to be able to call TestListener.beforeTestMethod(java.lang.Object, java.lang.reflect.Method) and
TestListener.afterTestMethod(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable) . |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, 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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UnitilsJUnit3()
TestCase.setName(java.lang.String)
afterwards.
public UnitilsJUnit3(String name)
name
- the name of the test methodMethod Detail |
---|
public void runBare() throws Throwable
TestListener.beforeTestSetUp(java.lang.Object, java.lang.reflect.Method)
and TestListener.afterTestTearDown(java.lang.Object, java.lang.reflect.Method)
.
runBare
in class junit.framework.TestCase
Throwable
- If an error occurs during the testprotected void runTest() throws Throwable
TestListener.beforeTestMethod(java.lang.Object, java.lang.reflect.Method)
and
TestListener.afterTestMethod(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable)
.
runTest
in class junit.framework.TestCase
Throwable
- If an error occurs during the testprotected Unitils getUnitils()
Unitils.getInstance()
.
You can override this method to let it create and set your own singleton instance. For example, you
can let it create an instance of your own Unitils subclass and set it by using Unitils.setInstance(org.unitils.core.Unitils)
.
protected Method getCurrentTestMethod()
UnitilsException
- if the method could not be foundprotected TestListener getTestListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |