@Test public void shouldNotRenderFeatureWithSkipDocsTag() { final Feature feature = FeatureBuilder.instance().aFeatureWithTwoScenarios(); final Feature featureToSkip = FeatureBuilder.instance().aFeatureWithTwoScenarios(); featureToSkip.getTags().add(new Tag("@skipDocs")); featureToSkip.setName("feature to skip"); featureToSkip.setId("skippedFeature"); List<Feature> features = new ArrayList<>(); features.add(feature); features.add(featureToSkip); String resultDoc = new CukedoctorFeatureRenderer(new DocumentAttributes()) .renderFeatures(features, CukedoctorDocumentBuilder.Factory.newInstance().createNestedBuilder()); assertThat(resultDoc). doesNotContain("feature to skip"). contains("[[Feature-name, Feature name]]" + newLine() + "=== *Feature name*" + newLine() + "" + newLine() + "ifndef::backend-pdf[]" + newLine() + "minmax::Feature-name[]" + newLine() + "endif::[]" + newLine() + "****" + newLine() + "Feature description" + newLine() + "****" + newLine() + "" + newLine() + "==== Scenario: scenario 1" + newLine() + "description" + newLine() + "" + newLine() + "==== Scenario: scenario 2" + newLine() + "description 2" + 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);  }