|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.unitils.UnitilsTestNG
public abstract class UnitilsTestNG
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 | |
---|---|
UnitilsTestNG()
|
Method Summary | |
---|---|
protected TestListener |
getTestListener()
|
protected Unitils |
getUnitils()
Returns the default singleton instance of Unitils |
void |
run(org.testng.IHookCallBack callBack,
org.testng.ITestResult testResult)
Implementation of the hookable interface 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) . |
protected void |
throwException(Throwable throwable)
Throws an unchecked excepton for the given throwable. |
protected void |
unitilsAfterTestTearDown(Method testMethod)
Called after all test tear down. |
protected void |
unitilsBeforeClass()
Called before a test of a test class is run. |
protected void |
unitilsBeforeTestSetUp(Method testMethod)
Called before all test setup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnitilsTestNG()
Method Detail |
---|
protected void unitilsBeforeClass()
TestListener.afterCreateTestObject(Object)
is called.
protected void unitilsBeforeTestSetUp(Method testMethod)
TestListener.beforeTestSetUp(java.lang.Object, java.lang.reflect.Method)
is called.
testMethod
- The test method, not nullprotected void unitilsAfterTestTearDown(Method testMethod)
TestListener.afterTestTearDown(java.lang.Object, java.lang.reflect.Method)
is called.
NOTE: alwaysRun is enabled to be sure that this method is called even when an exception occurs during
unitilsBeforeTestSetUp(java.lang.reflect.Method)
.
testMethod
- The test method, not nullpublic void run(org.testng.IHookCallBack callBack, org.testng.ITestResult testResult)
TestListener.beforeTestMethod(java.lang.Object, java.lang.reflect.Method)
and
TestListener.afterTestMethod(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable)
.
run
in interface org.testng.IHookable
callBack
- the TestNG test callback, not nulltestResult
- the TestNG test result, not nullprotected void throwException(Throwable throwable)
throwable
- The throwable, not nullprotected TestListener getTestListener()
protected Unitils getUnitils()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |