Packageorg.flexunit.runner.notification
Interfacepublic interface IRunNotifier
Implementors RunNotifier

IRunNotifiers are a type of class that FlexUnit4 uses to notify others of an event that occurred during testing. There is generally only one IRunNotifier used in a test run at a time. IRunNotifiers are used by the IRunner classes to notify others of the following conditions: A parallel can be drawn with IEventDispatcher; however, unlike an event dispatcher, IRunNotifiers have limitations on what types of objects can listen to their events. An IRunListenerss are used to listen to events that are broadcast by IRunNotifiers. Each IRunNotifier contain an #addListener() and #removeListener method that accetps an IRunListener as an argument. If one writes an IRunner, they may need to notify FlexUnit4 of their progress while running tests. This is accomplished by invoking the IRunNotifier passed to the implementation of org.flexunit.runner.IRunner#run(RunNotifier).

See also

org.flexunit.runner.notification.IRunListener


Public Methods
 MethodDefined By
  
Adds IRunListener to the beginning of the list of registered listeners in the IRunNotifier.
IRunNotifier
  
addListener(listener:IRunListener):void
Adds an IRunListener to the list of registered listeners in the IRunNotifier.
IRunNotifier
  
Invoke to tell all registered IRunListeners that an atomic test flagged that it assumed something false.
IRunNotifier
  
fireTestFailure(failure:Failure):void
Invoke to tell all registered IRunListeners that an atomic test failed.
IRunNotifier
  
fireTestFinished(description:IDescription):void
Invoke to tell all registered IRunListeners that an atomic test finished.
IRunNotifier
  
fireTestIgnored(description:IDescription):void
Invoke to tell all registered IRunListeners that an atomic test was ignored.
IRunNotifier
  
Invoke to tell all registered IRunListeners that the test run has finished.
IRunNotifier
  
Invoke to tell all registered IRunListeners that the test run has started.
IRunNotifier
  
fireTestStarted(description:IDescription):void
Invoke to tell all registered IRunListeners that an atomic test has started.
IRunNotifier
  
Removes all IRunListener instances from the list of registered listeners in the IRunNotifier.
IRunNotifier
  
Removes an IRunListener from the list of registered listeners in the IRunNotifier.
IRunNotifier
Method Detail
addFirstListener()method
public function addFirstListener(listener:IRunListener):void

Adds IRunListener to the beginning of the list of registered listeners in the IRunNotifier.

Parameters

listener:IRunListener — The IRunListener to add to the beginning.

addListener()method 
public function addListener(listener:IRunListener):void

Adds an IRunListener to the list of registered listeners in the IRunNotifier.

Parameters

listener:IRunListener — The IRunListener to add.

fireTestAssumptionFailed()method 
public function fireTestAssumptionFailed(failure:Failure):void

Invoke to tell all registered IRunListeners that an atomic test flagged that it assumed something false.

Parameters

failure:Failure — The Failure indicating what AssumptionViolatedException was thrown.

fireTestFailure()method 
public function fireTestFailure(failure:Failure):void

Invoke to tell all registered IRunListeners that an atomic test failed.

Parameters

failure:Failure — The Failure indicating why the test ended up failing.

fireTestFinished()method 
public function fireTestFinished(description:IDescription):void

Invoke to tell all registered IRunListeners that an atomic test finished. Always invoke #fireTestFinished(IDescription) if you invoke #fireTestStarted(IDescription) as listeners are likely to expect them to come in pairs.

Parameters

description:IDescription — The IDescription of the test that finished.

fireTestIgnored()method 
public function fireTestIgnored(description:IDescription):void

Invoke to tell all registered IRunListeners that an atomic test was ignored.

Parameters

description:IDescription — The IDescription of the ignored test.

fireTestRunFinished()method 
public function fireTestRunFinished(result:Result):void

Invoke to tell all registered IRunListeners that the test run has finished.

Parameters

result:Result — The Result of the test run.

fireTestRunStarted()method 
public function fireTestRunStarted(description:IDescription):void

Invoke to tell all registered IRunListeners that the test run has started.

Parameters

description:IDescription — An IDescription of the top most IRunner.

fireTestStarted()method 
public function fireTestStarted(description:IDescription):void

Invoke to tell all registered IRunListeners that an atomic test has started.

Parameters

description:IDescription — An IDescription of the atomic test (generally a class and method name).

removeAllListeners()method 
public function removeAllListeners():void

Removes all IRunListener instances from the list of registered listeners in the IRunNotifier.

removeListener()method 
public function removeListener(listener:IRunListener):void

Removes an IRunListener from the list of registered listeners in the IRunNotifier.

Parameters

listener:IRunListener — The IRunListener to remove.