OTest2
A C++ testing framework
|
Generic scenario object. More...
#include <scenario.h>
Public Member Functions | |
Scenario () | |
Ctor. More... | |
virtual | ~Scenario () |
Dtor. More... | |
Scenario (const Scenario &)=delete | |
Scenario & | operator= (const Scenario &)=delete |
virtual ScenarioPtr | filterScenario (TagsStack &tags_, ScenarioContainerPtr parent_, const RunnerFilter &filter_) const =0 |
Filter the scenario. More... | |
virtual std::pair< std::string, ObjectRepeaterPtr > | createRepeater (const Context &context_) const =0 |
Create repeater object for testing object represented by this scenario object. More... | |
virtual void | enterObject (const Context &context_) const noexcept=0 |
Enter the testing object. More... | |
virtual void | leaveObject (const Context &context_) const noexcept=0 |
Report leaving of the testing object. More... | |
virtual ScenarioIterPtr | getChildren () const =0 |
Get iterator of children object. More... | |
Generic scenario object.
The scenario is responsible for scheduling of test runs. Generally, it works as a kind of registry of suites and test cases. The scenario can be filtered by tags or object names. The test run then follows data in the scenario object.
Definition at line 47 of file scenario.h.
OTest2::Scenario::Scenario | ( | ) |
Ctor.
Definition at line 23 of file scenario.cpp.
|
virtual |
Dtor.
Definition at line 27 of file scenario.cpp.
|
delete |
|
pure virtual |
Create repeater object for testing object represented by this scenario object.
[in] | context_ | The OTest2 context |
[out] | object_name_ | Name of the testing object |
Implemented in OTest2::ScenarioCase, OTest2::ScenarioSuite, and OTest2::ScenarioRoot.
|
pure virtualnoexcept |
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. |
Implemented in OTest2::ScenarioCase, OTest2::ScenarioSuite, and OTest2::ScenarioRoot.
|
pure virtual |
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 |
Implemented in OTest2::ScenarioCase, OTest2::ScenarioSuite, and OTest2::ScenarioRoot.
|
pure virtual |
Get iterator of children object.
Implemented in OTest2::ScenarioCase, OTest2::ScenarioSuite, and OTest2::ScenarioRoot.
|
pure virtualnoexcept |
Report leaving of the testing object.
context_ | The OTest2 context. Current object path is still set. |
Implemented in OTest2::ScenarioCase, OTest2::ScenarioSuite, and OTest2::ScenarioRoot.