OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::TestRoot Class Reference

Root testing object. More...

#include <testroot.h>

Inheritance diagram for OTest2::TestRoot:
Inheritance graph
[legend]
Collaboration diagram for OTest2::TestRoot:
Collaboration graph
[legend]

Public Member Functions

 TestRoot (const std::string &name_)
 Ctor. More...
 
virtual ~TestRoot ()
 Dtor. More...
 
 TestRoot (const TestRoot &)=delete
 
TestRootoperator= (const TestRoot &)=delete
 
virtual std::string getName () const override
 Get object's name. More...
 
virtual bool startUpObject (const Context &context_, int index_) override
 Execute start-up function at specified index. More...
 
virtual void scheduleBody (const Context &context_, ScenarioPtr scenario_, ObjectPtr me_) override
 Schedule body of the testing object. More...
 
virtual void tearDownObject (const Context &context_, int index_) override
 Execute tear-down function at specified index. More...
 
- Public Member Functions inherited from OTest2::ObjectScenario
 ObjectScenario ()
 Dtor. More...
 
virtual ~ObjectScenario ()
 Dtor. More...
 
 ObjectScenario (const ObjectScenario &)=delete
 
ObjectScenariooperator= (const ObjectScenario &)=delete
 
- Public Member Functions inherited from OTest2::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object ()
 Ctor. More...
 
virtual ~Object ()
 Dtor. More...
 

Detailed Description

Root testing object.

Definition at line 32 of file testroot.h.

Constructor & Destructor Documentation

◆ TestRoot() [1/2]

OTest2::TestRoot::TestRoot ( const std::string &  name_)
explicit

Ctor.

Parameters
name_Name of the entire test

Definition at line 32 of file testroot.cpp.

◆ ~TestRoot()

OTest2::TestRoot::~TestRoot ( )
virtual

Dtor.

Definition at line 39 of file testroot.cpp.

◆ TestRoot() [2/2]

OTest2::TestRoot::TestRoot ( const TestRoot )
delete

Member Function Documentation

◆ getName()

std::string OTest2::TestRoot::getName ( ) const
overridevirtual

Get object's name.

Implements OTest2::Object.

Definition at line 43 of file testroot.cpp.

◆ operator=()

TestRoot& OTest2::TestRoot::operator= ( const TestRoot )
delete

◆ scheduleBody()

void OTest2::TestRoot::scheduleBody ( const Context context_,
ScenarioPtr  scenario_,
ObjectPtr  me_ 
)
overridevirtual

Schedule body of the testing object.

Parameters
context_The OTest2 context
scenario_The scenario representing this object
me_A shared pointer pointing this instance

Implements OTest2::ObjectScenario.

Definition at line 53 of file testroot.cpp.

◆ startUpObject()

bool OTest2::TestRoot::startUpObject ( const Context context_,
int  index_ 
)
overridevirtual

Execute start-up function at specified index.

Parameters
context_The OTest2 context
index_The zero based index of the start-up function
Returns
True if the start-up function exists and has been run

Implements OTest2::ObjectScenario.

Definition at line 47 of file testroot.cpp.

◆ tearDownObject()

void OTest2::TestRoot::tearDownObject ( const Context context_,
int  index_ 
)
overridevirtual

Execute tear-down function at specified index.

Parameters
context_The OTest2 context
index_The zero based index of the tear-down function

Implements OTest2::ObjectScenario.

Definition at line 62 of file testroot.cpp.


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