OTest2
A C++ testing framework
|
Scenario object representing entire test. More...
#include <scenarioroot.h>
Classes | |
struct | Impl |
Public Member Functions | |
ScenarioRoot (const std::string &name_) | |
Ctor. More... | |
virtual | ~ScenarioRoot () |
Dtor. More... | |
ScenarioRoot (const ScenarioRoot &)=delete | |
ScenarioRoot & | operator= (const ScenarioRoot &)=delete |
void | setName (const std::string &name_) |
Set name of the scenario (the name of the entire test) More... | |
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 override |
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 |
Scenario object representing entire test.
Definition at line 30 of file scenarioroot.h.
|
explicit |
|
virtual |
Dtor.
Definition at line 102 of file scenarioroot.cpp.
|
delete |
|
overridevirtual |
Append new sub-scenario into the container.
scenario_ | The appended scenario |
Implements OTest2::ScenarioContainer.
Definition at line 150 of file scenarioroot.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 124 of file scenarioroot.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 129 of file scenarioroot.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 112 of file scenarioroot.cpp.
|
overridevirtual |
Get iterator of children object.
Implements OTest2::Scenario.
Definition at line 146 of file scenarioroot.cpp.
|
overridevirtualnoexcept |
Check whether the container is empty.
Implements OTest2::ScenarioContainer.
Definition at line 156 of file scenarioroot.cpp.
|
overridevirtualnoexcept |
Report leaving of the testing object.
context_ | The OTest2 context. Current object path is still set. |
Implements OTest2::Scenario.
Definition at line 137 of file scenarioroot.cpp.
|
delete |
void OTest2::ScenarioRoot::setName | ( | const std::string & | name_ | ) |
Set name of the scenario (the name of the entire test)
name_ | The name |
Definition at line 106 of file scenarioroot.cpp.