All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cucumber.runner.UnskipableStep Maven / Gradle / Ivy

There is a newer version: 7.18.1
Show newest version
package cucumber.runner;

import cucumber.api.HookType;
import cucumber.api.Result;
import cucumber.api.Scenario;
import cucumber.api.TestStep;
import cucumber.runtime.DefinitionMatch;
import gherkin.pickles.Argument;
import gherkin.pickles.PickleStep;

import java.util.List;

public class UnskipableStep extends TestStep {
    private final HookType hookType;

    public UnskipableStep(HookType hookType, DefinitionMatch definitionMatch) {
        super(definitionMatch);
        this.hookType = hookType;
    }

    protected Result.Type executeStep(String language, Scenario scenario, boolean skipSteps) throws Throwable {
        definitionMatch.runStep(language, scenario);
        return Result.Type.PASSED;
    }

    @Override
    public boolean isHook() {
        return true;
    }

    @Override
    public PickleStep getPickleStep() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getStepLocation() {
        throw new UnsupportedOperationException();
    }

    @Override
    public int getStepLine() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getStepText() {
        throw new UnsupportedOperationException();
    }

    @Override
    public List getStepArgument() {
        throw new UnsupportedOperationException();
    }

    @Override
    public HookType getHookType() {
        return hookType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy