TestListener

   
TestListener

Description

The class TestListener (see Figure C-25) defines an interface for observers to receive test progress notifications from a TestResult . The method TestResult::addListener( ) is used to register a TestListener .

TestListener belongs to the namespace CppUnit . It is declared in TestListener.h , which also provides its default empty implementation.

Figure C-25. The class TestListener
figs/utf_ac25.gif

Declaration

 class TestListener 

Constructors/Destructors


virtual ~TestListener( )

A destructor.

Public Methods


virtual void addFailure(const TestFailure &failure)

A method called to notify the TestListener that a failure has occurred. The argument failure is a temporary object that is deleted after the call.


virtual void endTest(Test *test)

A method called to notify the TestListener that test has ended.


virtual void startTest(Test *test)

A method called to notify the TestListener that test is about to be run.

Protected/Private Methods

None.

Attributes

None.



Unit Test Frameworks
Unit Test Frameworks
ISBN: 0596006896
EAN: 2147483647
Year: 2006
Pages: 146
Authors: Paul Hamill

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net