@Test public void shouldEnrichFeatureWithListingWithinAdmonitionBlock() { List<Feature> features = FeatureParser.parse(getClass().getResource("/com/github/cukedoctor/json-output/comment-with-admonition-and-listing.json").getPath()); assertThat(features).isNotNull().hasSize(1); String output = new CukedoctorFeatureRenderer((DocumentAttributes) null).renderFeatures(features, CukedoctorDocumentBuilder.Factory.newInstance().createNestedBuilder()); assertThat(output.replaceAll("\r", "")).contains(("[[Enriched-feature, Enriched feature]]" + newLine() + "=== *Enriched feature*" + newLine() + "" + newLine() + "==== Scenario: Scenario with admonition and listing" + newLine() + "You can use *asciidoc markup* using feature comments." + newLine() + "" + newLine() + "==========" + newLine() + "Given ::" + newLine() + "I have admonition with a listing in feature comments. icon:thumbs-up[role=\"green\",title=\"Passed\"] [small right]#(032ms)#" + newLine() + "" + newLine() + "[TIP]" + newLine() + "====" + newLine() + "" + newLine() + "This is a tip with source code inside" + newLine() + "[source,java]" + newLine() + "----" + newLine() + "" + newLine() + "System.setProperty(\"INTRO_CHAPTER_DIR\",\"/home/some/external/folder\");" + newLine() + "----" + newLine() + "====" + newLine() + "" + newLine() + "==========" + newLine() + "").replaceAll("\r", "")); }
@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);  }