@Test public void shouldEnrichFeature() { List<Feature> features = FeatureParser.parse(getClass().getResource("/json-output/enrichment/calc.json").getPath()); assertThat(features).isNotNull().hasSize(1); String output = new CukedoctorFeatureRenderer((DocumentAttributes) null).renderFeatures(features, CukedoctorDocumentBuilder.Factory.newInstance().createNestedBuilder()); assertThat(output.replaceAll("\r\n|\r|\n", newLine())).contains(("[[Calculator, Calculator]]" + newLine() + "=== *Calculator*" + newLine() + "" + newLine() + "==== Scenario: Adding numbers" + newLine() + "You can use *asciidoc markup* in _feature_ #description#." + newLine() + "" + newLine() + "NOTE: This is a very important feature!" + newLine() + "" + newLine() + "==========" + newLine() + "Given ::" + newLine() + "I have numbers 1 and 2 icon:thumbs-up[role=\"green\",title=\"Passed\"] [small right]#(114ms)#" + newLine() + "" + newLine() + "IMPORTANT: Asciidoc markup inside *steps* must be surrounded by *curly brackets*." + newLine() + "" + newLine() + "When ::" + newLine() + "I sum the numbers icon:thumbs-up[role=\"green\",title=\"Passed\"] [small right]#(000ms)#" + newLine() + "" + newLine() + "NOTE: Steps comments are placed *before* each steps so this comment is for the *WHEN* step." + newLine() + "" + newLine() + "Then ::" + newLine() + "I should have 3 as result icon:thumbs-up[role=\"green\",title=\"Passed\"] [small right]#(001ms)#" + newLine() + "" + newLine() + "* this is a list of itens inside a feature step" + newLine() + "" + newLine() + "* there is no multiline comment in gherkin" + newLine() + "" + newLine() + "** second level list item" + newLine() + "" + newLine() + "==========" + newLine() + "" + newLine() + "")); }
@Override public String renderFeatures(List<Feature> features) { docBuilder.clear(); if(!cukedoctorConfig.isHideFeaturesSection()) { docBuilder.titleThenNest(bold(i18n.getMessage("title.features"))).newLine(); } for (Feature feature : features) { docBuilder.append(renderFeature(feature)); } return docBuilder.toString(); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { @Override public String renderFeatures(List<Feature> features) { docBuilder.clear(); if(!cukedoctorConfig.isHideFeaturesSection()) { docBuilder.titleThenNest(bold(i18n.getMessage("title.features"))).newLine(); } for (Feature feature : features) { docBuilder.append(renderFeature(feature)); } return docBuilder.toString(); } }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { @Override public String renderFeatures(List<Feature> features) { docBuilder.clear(); if(!cukedoctorConfig.isHideFeaturesSection()) { docBuilder.titleThenNest(bold(i18n.getMessage("title.features"))).newLine(); } for (Feature feature : features) { docBuilder.append(renderFeature(feature)); } return docBuilder.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { @Override public String renderFeatures(List<Feature> features) { docBuilder.clear(); if(!cukedoctorConfig.isHideFeaturesSection()) { docBuilder.titleThenNest(bold(i18n.getMessage("title.features"))).newLine(); } for (Feature feature : features) { docBuilder.append(renderFeature(feature)); } return docBuilder.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); @Override String renderFeature(Feature feature); @Override String renderFeatures(List<Feature> features); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { @Override public String renderFeatures(List<Feature> features) { docBuilder.clear(); if(!cukedoctorConfig.isHideFeaturesSection()) { docBuilder.titleThenNest(bold(i18n.getMessage("title.features"))).newLine(); } for (Feature feature : features) { docBuilder.append(renderFeature(feature)); } return docBuilder.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); @Override String renderFeature(Feature feature); @Override String renderFeatures(List<Feature> features);  }