MCPcopy Create free account
hub / github.com/cucumber/cucumber-cpp / FakeStepInfo

Class FakeStepInfo

tests/unit/StepCallChainTest.cpp:7–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace cucumber::internal;
6
7class FakeStepInfo : public StepInfo {
8public:
9 FakeStepInfo(std::stringstream* markersPtr, const InvokeResult& result) :
10 StepInfo("FAKE", ""),
11 latestArgsPtr(0),
12 markersPtr(markersPtr),
13 result(result) {
14 }
15
16 InvokeResult invokeStep(const InvokeArgs* pArgs) const override {
17 latestArgsPtr = pArgs;
18 (*markersPtr) << "S";
19 return result;
20 }
21
22 const InvokeArgs* getLatestArgsPassed() const {
23 return latestArgsPtr;
24 }
25
26private:
27 mutable const InvokeArgs* latestArgsPtr;
28 std::stringstream* markersPtr;
29 const InvokeResult result;
30};
31
32class MarkingAroundStepHook : public AroundStepHook {
33public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected