public BackgroundExec convertBackground(Background background) { BackgroundExec backgroundExec = new BackgroundExec(background.getKeyword(), background.getName()); backgroundExec.declareComments(convertComments(background.getComments())); backgroundExec.declareDescription(background.getDescription()); return backgroundExec; }
@Override public void background(Background background) { featureElementName = background.getName(); featureElementRange = background.getLineRange(); backgroundEvents = new ArrayList<BasicStatement>(); backgroundEvents.add(background); }
@Override public void background(Background background) { getFeatureElements().add(background.toMap()); }
public void background(Background background) { LOG.log(Level.FINE, "Background: {0}", background.getName()); if (currentBackground != null) { LOG.log(Level.SEVERE, "Background: {" + background.getName() + "} received before previous background: {" + currentBackground.getName()+ "} handled"); throw new CucumberModelException("Background: {" + background.getName() + "} received before previous background: {" + currentBackground.getName()+ "} handled"); } currentBackground = new BackgroundResult(background); }
@Override public void background(Background background) { afterHooks(true); inBackground = true; stepPrefix = background.getKeyword().toUpperCase() + AbstractReporter.COLON_INFIX; }
@Override public void background(String keyword, String name, String description, Integer line) { formatter.background(new Background(stash.comments, keyword, name, description, line)); stash.reset(); }
public void background(Background background) { out.append(keywords.lifecycle()+background.getName()).append("\n") .append(keywords.before()+"\n"); }
private BasicStatement featureElement(Map o) { String type = (String) o.get("type"); if (type.equals("background")) { return new Background(comments(o), keyword(o), name(o), description(o), line(o)); } else if (type.equals("scenario")) { return new Scenario(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o)); } else if (type.equals("scenario_outline")) { return new ScenarioOutline(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o)); } else { return null; } }
@Override public void background(Background background) { log.debug("background: {}", background.getName()); currentStep = null; stepIterator = null; BackgroundExec backgroundExec = converter.convertBackground(background); currentFeature.background(backgroundExec); currentStepContainer = backgroundExec; }