| 16 | }; |
| 17 | |
| 18 | class CukeCommandsFixture : public ::testing::Test, public CukeCommands { |
| 19 | typedef StepManagerTestDouble StepManager; |
| 20 | |
| 21 | public: |
| 22 | const static std::string STATIC_MATCHER; |
| 23 | |
| 24 | protected: |
| 25 | step_id_type stepId; |
| 26 | |
| 27 | template<class T> |
| 28 | void runStepBodyTest() { |
| 29 | addStepToManager<T>(STATIC_MATCHER); |
| 30 | const InvokeArgs spArgs(T::buildInvokeArgs()); |
| 31 | invoke(stepId, &spArgs); |
| 32 | } |
| 33 | |
| 34 | template<class T> |
| 35 | void addStepToManager(const std::string& matcher) { |
| 36 | stepId = StepManager::addStep(std::make_shared<StepInvoker<T>>(matcher, "")); |
| 37 | } |
| 38 | |
| 39 | void TearDown() override { |
| 40 | StepManager::clearSteps(); |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | const std::string CukeCommandsFixture::STATIC_MATCHER("MATCHER"); |
| 45 |
nothing calls this directly
no outgoing calls
no test coverage detected