cxxtools::unit::BasicTestMethod< C, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void > Class Template Reference

#include <cxxtools/unit/testmethod.h>

Inheritance diagram for cxxtools::unit::BasicTestMethod< C, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void, cxxtools::Void >:
cxxtools::unit::TestMethod cxxtools::unit::Test cxxtools::Connectable cxxtools::NonCopyable

Public Types

typedef C ClassT
typedef void(C::* MemFuncT )()

Public Member Functions

 BasicTestMethod (const std::string &name, C &object, MemFuncT ptr)
void exec (const SerializationInfo *si, unsigned argCount)
virtual void run ()
 Runs the test.
- Public Member Functions inherited from cxxtools::unit::TestMethod
 TestMethod (const std::string &name)
virtual ~TestMethod ()
- Public Member Functions inherited from cxxtools::unit::Test
virtual ~Test ()
 Destructor.
const std::string & name () const
void reportStart (const TestContext &ctx)
 Reports the start of a test.
void reportFinish (const TestContext &ctx)
 Finished notification.
void reportSuccess (const TestContext &ctx)
 Success notification.
void reportAssertion (const TestContext &ctx, const Assertion &ass)
 Assertion notification.
void reportException (const TestContext &ctx, const std::exception &ex)
 Exception notification.
void reportError (const TestContext &ctx)
 Error notification.
void reportMessage (const std::string &msg)
 Message notification.
void setParent (Test *test)
Testparent ()
const Testparent () const
void attachReporter (Reporter &r)
 Add reporter for test events.
void detachReporter (Reporter &r)
- Public Member Functions inherited from cxxtools::Connectable
 Connectable ()
 Default constructor.
virtual ~Connectable ()
 Closes all connections.
virtual void onConnectionOpen (const Connection &c)
 Registers a Connection with the Connectable.
virtual void onConnectionClose (const Connection &c)
 Unregisters a Connection from the Connectable.
size_t connectionCount () const

Additional Inherited Members

- Protected Member Functions inherited from cxxtools::unit::Test
 Test (const std::string &name)
 Construct a test by name.
- Protected Attributes inherited from cxxtools::Connectable
std::list< Connection_connections
 A list of all current connections.

Member Typedef Documentation

Constructor & Destructor Documentation

Member Function Documentation

Runs the test.

Derived test classes are supposed to implement this method to run the test procedure. A derived class should send the 'started' signal at the begin of the test and send the 'finished' signal at the end of the test. If the test was successful, the 'success' signal is sent, otheriwse one of the signals indicating a failrue. In case of a failed assertion, the signal 'assertion' is sent, if a regular std::exception was the cause of the error the signal 'exception' is sent and and the signal 'error' indicates an unknown exception or error. This method should not propagate any exceptions

Reimplemented from cxxtools::unit::TestMethod.


The documentation for this class was generated from the following file: