| 72 | static const InvokeArgs NO_INVOKE_ARGS; |
| 73 | |
| 74 | class StepCallChainTest : public ::testing::Test { |
| 75 | protected: |
| 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 | |
| 94 | TEST_F(StepCallChainTest, failsIfNoStep) { |
| 95 | StepCallChain scc(0, NULL, &NO_INVOKE_ARGS, aroundHooks); |
nothing calls this directly
no outgoing calls
no test coverage detected