use of io.cucumber.messages.types.StepDefinitionPattern in project cucumber-jvm by cucumber.
the class CachingGlue method emitStepDefined.
private void emitStepDefined(CoreStepDefinition coreStepDefinition) {
bus.send(new StepDefinedEvent(bus.getInstant(), new io.cucumber.plugin.event.StepDefinition(coreStepDefinition.getStepDefinition().getLocation(), coreStepDefinition.getExpression().getSource())));
io.cucumber.messages.types.StepDefinition messagesStepDefinition = new io.cucumber.messages.types.StepDefinition();
messagesStepDefinition.setId(coreStepDefinition.getId().toString());
messagesStepDefinition.setPattern(new StepDefinitionPattern(coreStepDefinition.getExpression().getSource(), getExpressionType(coreStepDefinition)));
coreStepDefinition.getDefinitionLocation().ifPresent(reference -> messagesStepDefinition.setSourceReference(createSourceReference(reference)));
Envelope envelope = new Envelope();
envelope.setStepDefinition(messagesStepDefinition);
bus.send(envelope);
}
Aggregations