abstractpublic class UnitilsTestNG implements IHookable(Code)
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.
author: Tim Ducheyne author: Filip Neven
getUnitils() This will return the default singleton instance by calling
Unitils.getInstance .
You can override this method to let it create and set your own singleton instance.
This will return the default singleton instance by calling
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 .
the unitils core instance, not null
run
public void run(IHookCallBack callBack, ITestResult testResult)(Code)
Implementation of the hookable interface to be able to call
TestListener.beforeTestMethod and
TestListener.afterTestMethod .
Parameters: callBack - the TestNG test callback, not null Parameters: testResult - the TestNG test result, not null
Called after all tests of a test class were run. This is where
TestListener.afterTestClass is called.
NOTE: alwaysRun is enabled to be sure that this method is called even when an exception occurs during
UnitilsTestNG.unitilsBeforeClass .