use of io.cucumber.plugin.event.HookType in project cucumber-jvm by cucumber.
the class TeamCityPlugin method extractName.
private String extractName(TestStep step) {
if (step instanceof PickleStepTestStep) {
PickleStepTestStep pickleStepTestStep = (PickleStepTestStep) step;
return pickleStepTestStep.getStep().getText();
}
if (step instanceof HookTestStep) {
HookTestStep hook = (HookTestStep) step;
HookType hookType = hook.getHookType();
switch(hookType) {
case BEFORE:
return "Before";
case AFTER:
return "After";
case BEFORE_STEP:
return "BeforeStep";
case AFTER_STEP:
return "AfterStep";
default:
return hookType.name().toLowerCase(Locale.US);
}
}
return "Unknown step";
}
Aggregations