Skip to content

Commit e86aee7

Browse files
committed
fix tests
1 parent 8e19518 commit e86aee7

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

cucumber_cpp/library/engine/ContextManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ namespace cucumber_cpp::library::engine
8181
: contextManager{ contextManager }
8282
{}
8383

84-
ContextManager::ScopedFeautureContext ::~ScopedFeautureContext()
84+
ContextManager::ScopedFeautureContext::~ScopedFeautureContext()
8585
{
8686
contextManager.DisposeFeatureContext();
8787
}
@@ -90,7 +90,7 @@ namespace cucumber_cpp::library::engine
9090
: contextManager{ contextManager }
9191
{}
9292

93-
ContextManager::ScopedRuleContext ::~ScopedRuleContext()
93+
ContextManager::ScopedRuleContext::~ScopedRuleContext()
9494
{
9595
contextManager.DisposeRuleContext();
9696
}
@@ -99,7 +99,7 @@ namespace cucumber_cpp::library::engine
9999
: contextManager{ contextManager }
100100
{}
101101

102-
ContextManager::ScopedScenarioContext ::~ScopedScenarioContext()
102+
ContextManager::ScopedScenarioContext::~ScopedScenarioContext()
103103
{
104104
contextManager.DisposeScenarioContext();
105105
}

cucumber_cpp/library/engine/test/TestHookExecutor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ namespace cucumber_cpp::library::engine
5252

5353
TEST_F(TestHookExecutor, ExecuteBeforeStep)
5454
{
55-
ASSERT_FALSE(contextManagerInstance.StepContext().Contains("hookBeforeStep"));
56-
ASSERT_FALSE(contextManagerInstance.StepContext().Contains("hookAfterStep"));
55+
ASSERT_FALSE(contextManagerInstance.ScenarioContext().Contains("hookBeforeStep"));
56+
ASSERT_FALSE(contextManagerInstance.ScenarioContext().Contains("hookAfterStep"));
5757

5858
{
5959
auto scope = hookExecutor.StepStart();
60-
EXPECT_TRUE(contextManagerInstance.StepContext().Contains("hookBeforeStep"));
60+
EXPECT_TRUE(contextManagerInstance.ScenarioContext().Contains("hookBeforeStep"));
6161
}
62-
EXPECT_TRUE(contextManagerInstance.StepContext().Contains("hookAfterStep"));
62+
EXPECT_TRUE(contextManagerInstance.ScenarioContext().Contains("hookAfterStep"));
6363
}
6464
}

cucumber_cpp/library/engine/test_helper/ContextManagerInstance.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ namespace cucumber_cpp::library::engine::test_helper
2222
{
2323
ContextManagerInstance()
2424
: cucumber_cpp::library::engine::ContextManager{ contextStorageFactory }
25-
, featureContextScope{ CreateFeatureContext(feature) }
26-
, ruleContextScope{ CreateRuleContext(rule) }
27-
, scenarioContextScope{ CreateScenarioContext(scenario) }
28-
, stepContextScope{ CreateStepContext(step) }
2925
{
3026
}
3127

@@ -35,10 +31,10 @@ namespace cucumber_cpp::library::engine::test_helper
3531
cucumber_cpp::library::engine::ScenarioInfo scenario{ rule, {}, {}, {}, {}, {} };
3632
cucumber_cpp::library::engine::StepInfo step{ scenario, {}, {}, {}, {}, {} };
3733

38-
ContextManager::ScopedFeautureContext featureContextScope;
39-
ContextManager::ScopedRuleContext ruleContextScope;
40-
ContextManager::ScopedScenarioContext scenarioContextScope;
41-
ContextManager::ScopedStepContext stepContextScope;
34+
ContextManager::ScopedFeautureContext featureContextScope{ CreateFeatureContext(feature) };
35+
ContextManager::ScopedRuleContext ruleContextScope{ CreateRuleContext(rule) };
36+
ContextManager::ScopedScenarioContext scenarioContextScope{ CreateScenarioContext(scenario) };
37+
ContextManager::ScopedStepContext stepContextScope{ CreateStepContext(step) };
4238
};
4339
}
4440

0 commit comments

Comments
 (0)