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

Class StepCallChainTest

tests/unit/StepCallChainTest.cpp:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72static const InvokeArgs NO_INVOKE_ARGS;
73
74class StepCallChainTest : public ::testing::Test {
75protected:
76 HookRegistrar::aroundhook_list_type aroundHooks;
77 std::stringstream markers;
78
79 InvokeResult execStep(const InvokeResult& result) {
80 const FakeStepInfo step(&markers, result);
81 StepCallChain scc(0, &step, &NO_INVOKE_ARGS, aroundHooks);
82 return scc.exec();
83 }
84
85 void execStepAndCheckSuccess() {
86 InvokeResult result;
87 result = execStep(InvokeResult::success());
88 EXPECT_TRUE(result.isSuccess());
89 result = execStep(InvokeResult::failure("Failed"));
90 EXPECT_FALSE(result.isSuccess());
91 }
92};
93
94TEST_F(StepCallChainTest, failsIfNoStep) {
95 StepCallChain scc(0, NULL, &NO_INVOKE_ARGS, aroundHooks);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected