Package | org.flexunit.internals |
Class | public class TextListener |
Inheritance | TextListener ![]() ![]() |
TextListener
will record the events encountered during the course of a test run in a logger.
Method | Defined By | ||
---|---|---|---|
TextListener(logger:ILogger)
Constructor. | TextListener | ||
getDefaultTextListener(logLevel:int):TextListener [static]
Returns a default instance of the TextListener. | TextListener | ||
![]() | testAssumptionFailure(failure:Failure):void
Called when an atomic test flags that it assumes a condition that is
false
| RunListener | |
testFailure(failure:Failure):void [override]
Called when an atomic test fails. | TextListener | ||
![]() | testFinished(description:IDescription):void
Called when an atomic test has finished, whether the test succeeds or fails. | RunListener | |
testIgnored(description:IDescription):void [override]
Called when a test will not be run, generally because a test method is annotated
with org.junit.Ignore. | TextListener | ||
testRunFinished(result:Result):void [override]
Called when all tests have finished
| TextListener | ||
testRunStarted(description:IDescription):void [override]
Called before any tests have been run. | TextListener | ||
testStarted(description:IDescription):void [override]
Called when an atomic test is about to be started. | TextListener |
Method | Defined By | ||
---|---|---|---|
elapsedTimeAsString(runTime:Number):String
Returns the formatted string of the elapsed time. | TextListener | ||
printFailure(failure:Failure, prefix:String):void
Logs a provided failure with a certain prefix
| TextListener | ||
printFailures(result:Result):void
Logs all failures that were received in the result
| TextListener | ||
printFooter(result:Result):void
Logs a footer for the provided result
| TextListener | ||
printHeader(runTime:Number):void
Logs a header that provides the total run time
| TextListener |
TextListener | () | Constructor |
public function TextListener(logger:ILogger)
Constructor.
Parameterslogger:ILogger — The logger used to log the events during a test run.
|
elapsedTimeAsString | () | method |
protected function elapsedTimeAsString(runTime:Number):String
Returns the formatted string of the elapsed time. Duplicated from BaseTestRunner. Fix it.
Parameters
runTime:Number |
String |
getDefaultTextListener | () | method |
public static function getDefaultTextListener(logLevel:int):TextListener
Returns a default instance of the TextListener.
Parameters
logLevel:int — The target level to set on the ILoggingTarget
|
TextListener — the default TextListener
|
printFailure | () | method |
protected function printFailure(failure:Failure, prefix:String):void
Logs a provided failure with a certain prefix
Parameters
failure:Failure — The provided failure
| |
prefix:String — A String prefix for the failure
|
printFailures | () | method |
protected function printFailures(result:Result):void
Logs all failures that were received in the result
Parameters
result:Result — The result that contains potential failures
|
printFooter | () | method |
protected function printFooter(result:Result):void
Logs a footer for the provided result
Parameters
result:Result — The result that contains the total run count
|
printHeader | () | method |
protected function printHeader(runTime:Number):void
Logs a header that provides the total run time
Parameters
runTime:Number — The total run time of all tests in milliseconds
|
testFailure | () | method |
override public function testFailure(failure:Failure):void
Called when an atomic test fails.
Parameters
failure:Failure — describes the test that failed and the exception that was thrown
|
testIgnored | () | method |
override public function testIgnored(description:IDescription):void
Called when a test will not be run, generally because a test method is annotated
with org.junit.Ignore
.
Parameters
description:IDescription — describes the test that will not be run
|
testRunFinished | () | method |
override public function testRunFinished(result:Result):void
Called when all tests have finished
Parameters
result:Result — the summary of the test run, including all the tests that failed
|
testRunStarted | () | method |
override public function testRunStarted(description:IDescription):void
Called before any tests have been run.
Parameters
description:IDescription — describes the tests to be run
|
testStarted | () | method |
override public function testStarted(description:IDescription):void
Called when an atomic test is about to be started.
Parameters
description:IDescription — the description of the test that is about to be run
(generally a class and method name)
|