OTest2
A C++ testing framework
|
A scenario object representing one test suite. More...
#include <scenariosuite.h>
Classes | |
struct | Impl |
Public Member Functions | |
ScenarioSuite (const std::string &name_, const Tags &tags_, ObjectRepeaterFactoryPtr repeater_factory_) | |
Create scenario object of a test suite. More... | |
virtual | ~ScenarioSuite () |
Dtor. More... | |
ScenarioSuite (const ScenarioSuite &)=delete | |
ScenarioSuite & | operator= (const ScenarioSuite &)=delete |
virtual ScenarioPtr | filterScenario (TagsStack &tags_, ScenarioContainerPtr parent_, const RunnerFilter &filter_) const override |
Filter the scenario. More... | |
virtual std::pair< std::string, ObjectRepeaterPtr > | createRepeater (const Context &context_) const override |
Create repeater object for testing object represented by this scenario object. More... | |
virtual void | enterObject (const Context &context_) const noexcept override |
Enter the testing object. More... | |
virtual void | leaveObject (const Context &context_) const noexcept override |
Report leaving of the testing object. More... | |
virtual ScenarioIterPtr | getChildren () const override |
Get iterator of children object. More... | |
virtual void | appendScenario (ScenarioPtr scenario_) override |
Append new sub-scenario into the container. More... | |
virtual bool | isEmpty () const noexcept |
Check whether the container is empty. More... | |
![]() | |
ScenarioContainer () | |
Ctor. More... | |
virtual | ~ScenarioContainer () |
Dtor. More... | |
ScenarioContainer (const ScenarioContainer &)=delete | |
ScenarioContainer & | operator= (const ScenarioContainer &)=delete |
![]() | |
Scenario () | |
Ctor. More... | |
virtual | ~Scenario () |
Dtor. More... | |
Scenario (const Scenario &)=delete | |
Scenario & | operator= (const Scenario &)=delete |
A scenario object representing one test suite.
Definition at line 35 of file scenariosuite.h.
|
explicit |
Create scenario object of a test suite.
name_ | Name of the suite |
tags_ | Tags assigned to the object |
repeater_factory_ | Factory of the repeater objects of the suite |
Definition at line 76 of file scenariosuite.cpp.
|
virtual |
Dtor.
Definition at line 84 of file scenariosuite.cpp.
|
delete |
|
overridevirtual |
Append new sub-scenario into the container.
scenario_ | The appended scenario |
Implements OTest2::ScenarioContainer.
Definition at line 139 of file scenariosuite.cpp.
|
overridevirtual |
Create repeater object for testing object represented by this scenario object.
[in] | context_ | The OTest2 context |
[out] | object_name_ | Name of the testing object |
Implements OTest2::Scenario.
Definition at line 113 of file scenariosuite.cpp.
|
overridevirtualnoexcept |
Enter the testing object.
This method is responsible for report of entering of the testing object. It may modify object's parameters and it must report the object into the reporter.
As constructor methods may throw an exception causing failure of the test, we report the entering into the object before actual creation of the object.
context_ | The OTest2 context. Current object path is ready. |
Implements OTest2::Scenario.
Definition at line 118 of file scenariosuite.cpp.
|
overridevirtual |
Filter the scenario.
This method filters the scenario object. Objects which don't match the filters are removed.
tags_ | Stack of object names and tags |
parent_ | Parent container |
filter_ | Used filter |
Implements OTest2::Scenario.
Definition at line 88 of file scenariosuite.cpp.
|
overridevirtual |
Get iterator of children object.
Implements OTest2::Scenario.
Definition at line 135 of file scenariosuite.cpp.
|
virtualnoexcept |
Check whether the container is empty.
Implements OTest2::ScenarioContainer.
Definition at line 145 of file scenariosuite.cpp.
|
overridevirtualnoexcept |
Report leaving of the testing object.
context_ | The OTest2 context. Current object path is still set. |
Implements OTest2::Scenario.
Definition at line 126 of file scenariosuite.cpp.
|
delete |