use of cucumber.runtime.CucumberException in project cucumber-jvm by cucumber.
the class HooksTest method only_allows_arguments_string_long_integer_closure.
@Test
public void only_allows_arguments_string_long_integer_closure() {
try {
Hooks.Before("TAG", 10L, 100, new MethodClosure(this, "dummyClosureCall"), 0.0);
fail("CucumberException was not thrown");
} catch (CucumberException e) {
assertEquals("An argument of the type java.lang.Double found, Before only allows the argument types " + "String - Tag, Long - timeout, Integer - order, and Closure", e.getMessage());
}
}
use of cucumber.runtime.CucumberException in project allure-cucumberjvm by allure-framework.
the class AllureReporter method extractStep.
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);
}
}
Aggregations