public abstract class UnitilsJUnit3
extends junit.framework.TestCase
TestListener for
more information on the listener invocation order.| Constructor and Description |
|---|
UnitilsJUnit3()
Creates a test without a name.
|
UnitilsJUnit3(String name)
Creates a test with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
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). |
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, setUp, tearDown, toStringpublic UnitilsJUnit3()
TestCase.setName(java.lang.String) afterwards.public UnitilsJUnit3(String name)
name - the name of the test methodpublic 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.TestCaseThrowable - 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.TestCaseThrowable - 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()
Copyright © 2016. All Rights Reserved.