Skip to content

Commit 2f35907

Browse files
committed
Deprecate constructors and run methods of TestStep
1 parent 5908ead commit 2f35907

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

core/src/main/java/cucumber/api/TestStep.java

+24
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,24 @@ public abstract class TestStep {
1717
"org.junit.AssumptionViolatedException",
1818
"org.junit.internal.AssumptionViolatedException"
1919
};
20+
2021
static {
2122
Arrays.sort(ASSUMPTION_VIOLATED_EXCEPTIONS);
2223
}
24+
25+
/**
26+
* @deprecated not part of the public api
27+
*/
28+
@Deprecated
2329
protected final DefinitionMatch definitionMatch;
2430

31+
/**
32+
* Creates a new test step from the matching step definition
33+
*
34+
* @param definitionMatch the matching step definition
35+
* @deprecated not part of the public api
36+
*/
37+
@Deprecated
2538
public TestStep(DefinitionMatch definitionMatch) {
2639
this.definitionMatch = definitionMatch;
2740
}
@@ -52,6 +65,15 @@ public List<cucumber.runtime.Argument> getDefinitionArgument() {
5265

5366
public abstract HookType getHookType();
5467

68+
/**
69+
* @param bus to which events should be broadcast
70+
* @param language in which the step is defined
71+
* @param scenario of which this step is part
72+
* @param skipSteps if this step should be skipped
73+
* @return result of running this step
74+
* @deprecated not part of the public api
75+
*/
76+
@Deprecated
5577
public Result run(EventBus bus, String language, Scenario scenario, boolean skipSteps) {
5678
Long startTime = bus.getTime();
5779
bus.send(new TestStepStarted(startTime, this));
@@ -69,10 +91,12 @@ public Result run(EventBus bus, String language, Scenario scenario, boolean skip
6991
return result;
7092
}
7193

94+
@Deprecated
7295
protected Result.Type nonExceptionStatus(boolean skipSteps) {
7396
return skipSteps ? Result.Type.SKIPPED : Result.Type.PASSED;
7497
}
7598

99+
@Deprecated
76100
protected Result.Type executeStep(String language, Scenario scenario, boolean skipSteps) throws Throwable {
77101
if (!skipSteps) {
78102
definitionMatch.runStep(language, scenario);

0 commit comments

Comments
 (0)