cucumber.runtime.StepDefinitionMatch Java Examples

The following examples show how to use cucumber.runtime.StepDefinitionMatch. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StepUtils.java    From allure-java with Apache License 2.0 5 votes vote down vote up
protected Step extractStep(final StepDefinitionMatch match) {
    try {
        final Field step = match.getClass().getDeclaredField("step");
        step.setAccessible(true);
        return (Step) step.get(match);
    } catch (ReflectiveOperationException e) {
        //shouldn't ever happen
        LOG.error(e.getMessage(), e);
        throw new CucumberException(e);
    }
}
 
Example #2
Source File: AllureReporter.java    From allure-cucumberjvm with Apache License 2.0 5 votes vote down vote up
private Step extractStep(StepDefinitionMatch match) {
    try {
        Field step = match.getClass().getDeclaredField("step");
        step.setAccessible(true);
        return (Step) step.get(match);
    } catch (ReflectiveOperationException e) {
        //shouldn't ever happen
        LOG.error(e.getMessage(), e);
        throw new CucumberException(e);
    }
}