public PickleStepDefinitionMatch(List<Argument> arguments, StepDefinition stepDefinition, String featurePath, PickleStep step) { super(arguments, stepDefinition.getLocation(false)); this.stepDefinition = stepDefinition; this.featurePath = featurePath; this.step = step; }
@Override public String getCodeLocation() { return stepDefinition.getLocation(false); }
private static String createMessage(StepDefinition a, StepDefinition b) { return String.format("Duplicate step definitions in %s and %s", a.getLocation(true), b.getLocation(true)); } }
private CucumberException registerTypeInConfiguration(Exception e) { return new CucumberException(String.format("" + "Could not convert arguments for step [%s] defined at '%s'.\n" + "It appears you did not register a data table type. The details are in the stacktrace below.", //TODO: Add doc URL stepDefinition.getPattern(), stepDefinition.getLocation(true) ), e); }
private CucumberException couldNotConvertArguments(Exception e) { return new CucumberException(String.format( "Could not convert arguments for step [%s] defined at '%s'.\n" + "The details are in the stacktrace below.", stepDefinition.getPattern(), stepDefinition.getLocation(true) ), e); }
private CucumberException arityMismatch(int parameterCount) { List<String> arguments = createArgumentsForErrorMessage(); return new CucumberException(String.format( "Step [%s] is defined with %s parameters at '%s'.\n" + "However, the gherkin step has %s arguments%sStep text: %s", stepDefinition.getPattern(), parameterCount, stepDefinition.getLocation(true), arguments.size(), formatArguments(arguments), step.getText() )); }
public StepDefinitionDTO(UUID glueId, long id, StepDefinition stepDefinition) { this.glueId = glueId; this.id = id; this.pattern = stepDefinition.getPattern(); this.parameterCount = stepDefinition.getParameterCount(); this.location = stepDefinition.getLocation(false); this.detailedLocation = stepDefinition.getLocation(true); }