public Method getTestMethod() { if (getTestClass() != null) { return methodCalled(withNoArguments(description.getName()), getTestClass()); } else { return null; } }
public String getName() { if (noClassIsDefined()) { return description.getName(); } else if (isAGroup()) { return groupName(); } else { return stepName(); } }
private String annotatedStepNameWithParameters(String annotatedStepTemplate) { String annotatedStepName = annotatedStepTemplate; Iterable<String> parameters = getParamatersFrom(description.getName()); int counter = 0; for (String parameter : parameters) { String token = "{" + counter++ + "}"; annotatedStepName = StringUtils.replace(annotatedStepName, token, parameter); } return annotatedStepName; }
private String stepName() { String annotationTitle = getAnnotatedTitle(); if (!StringUtils.isEmpty(annotationTitle)) { return annotationTitle; } Optional<String> annotatedStepName = getAnnotatedStepName(); if (getAnnotatedStepName().isPresent() && (StringUtils.isNotEmpty(annotatedStepName.get()))) { return annotatedStepNameWithParameters(annotatedStepName.get()); } return humanize(description.getName()); }
public Method getTestMethodIfPresent() { return findMethodCalled(withNoArguments(description.getName()), getTestClass()); }