scenario.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CRUCIBLE_TESTING_SCENARIO_HPP #define CRUCIBLE_TESTING_SCENARIO_HPP #include "crucible/testing/outcome.hpp" #include <functional> #include <string> namespace crucible::testing::scenario { using ScenarioFunction = std::function<void()>; class Scenario final { public: Scenario(std::string const &group, std::string const &name, ScenarioFunction const &function); [[nodiscard]] auto get_group() const -> std::string; [[nodiscard]] auto get_name() const -> std::string; [[nodiscard]] auto execute() -> outcome::Outcome; private: std::string my_group {}; std::string my_name {}; ScenarioFunction my_function {}; }; } #endif // CRUCIBLE_TESTING_SCENARIO_HPP