private String annotatedStepNameWithParameters(String annotatedStepTemplate) { String annotatedStepName = annotatedStepTemplate; Iterable<String> parameters = getParamatersFrom(description.getName()); int counter = 0; for(String parameter : parameters) { annotatedStepName = annotatedStepName.replaceAll("\\{" + counter++ + "\\}", parameter); } return annotatedStepName; }
private String annotatedStepNameWithParameters(String annotatedStepTemplate) { String annotatedStepName = annotatedStepTemplate; Iterable<String> parameters = getParamatersFrom(description.getName()); int counter = 0; for(String parameter : parameters) { annotatedStepName = annotatedStepName.replaceAll("\\{" + counter++ + "\\}", parameter); } return annotatedStepName; }
public void stepStarted(ExecutedStepDescription description) { writeIndent(buffer); buffer.append(description.getName()).append("\n"); push(); }
public void stepStarted(ExecutedStepDescription description) { writeIndent(buffer); buffer.append(description.getName()).append("\n"); push(); }
public void stepStarted(ExecutedStepDescription description) { writeIndent(buffer); buffer.append(description.getName()).append("\n"); push(); }
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()); }
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()); }
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()); }
/** * Record a step that is not scheduled to be executed (e.g. a skipped or ignored step). */ public void skippedStepStarted(final ExecutedStepDescription executedStepDescription) { pushStep(executedStepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.skippedStepStarted(executedStepDescription); } }
/** * Record a step that is not scheduled to be executed (e.g. a skipped or ignored step). */ public void skippedStepStarted(final ExecutedStepDescription executedStepDescription) { pushStep(executedStepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.skippedStepStarted(executedStepDescription); } }
/** * Start the execution of a test step. */ public void stepStarted(final ExecutedStepDescription stepDescription) { pushStep(stepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.stepStarted(stepDescription); } }
/** * Record a step that is not scheduled to be executed (e.g. a skipped or ignored step). */ public void skippedStepStarted(final ExecutedStepDescription executedStepDescription) { pushStep(executedStepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.skippedStepStarted(executedStepDescription); } }
private Method findMethodCalled(final ExecutedStepDescription method, final Class<?> testClass) { return MethodFinder.inClass(testClass).getMethodNamed(withNoArguments(method.getName()), method.getArguments().size()); }
public String getName() { if (noClassIsDefined()) { return description.getName(); } else if (isAGroup()) { return groupName(); } else { return stepName(); } }
public Method getTestMethod() { if (getStepClass() != null) { return methodCalled(withNoArguments(getName()), getStepClass()); } else { return null; } }
public String getName() { if (noClassIsDefined()) { return description.getName(); } else if (isAGroup()) { return groupName(); } else { return stepName(); } }
public Method getTestMethod() { if (getTestClass() != null) { return methodCalled(withNoArguments(description.getName()), getTestClass()); } else { return null; } }
/** * Start the execution of a test step. */ public void stepStarted(final ExecutedStepDescription stepDescription, boolean isPrecondition) { pushStep(stepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.stepStarted(stepDescription); } if (isPrecondition) { baseStepListener.currentStepIsAPrecondition(); } }
public Method getTestMethod() { if (getStepClass() != null) { return methodCalled(withNoArguments(getName()), getStepClass()); } else { return null; } }
public Method getStepMethod() { if (getStepClass() != null) { if (ScreenplayInspector.isAScreenplayClass(getStepClass())) { return ScreenplayInspector.performAsMethodIn(getStepClass()); } else { return methodCalled(withNoArguments(getName()), getStepClass()); } } else { return null; } }