@Test public void shouldRenderFeatureScenariosWithMultipleSteps() { final Feature feature = FeatureBuilder.instance().aFeatureWithMultipleScenariosAndSteps(); List<Feature> features = new ArrayList<>(); features.add(feature); CukedoctorFeatureRenderer featureRenderer = new CukedoctorFeatureRenderer(); String resultDoc = featureRenderer.renderFeatureScenarios(feature, new CukedoctorDocumentBuilderImpl().createNestedBuilder().createNestedBuilder()); assertThat(resultDoc.replaceAll("\r", "")).isEqualTo(("==== Scenario: scenario icon:thumbs-down[role=\"red\",title=\"Failed\"]" + newLine() + "description" + newLine() + "" + newLine() + "==========" + newLine() + "Given::" + newLine() + "passing step icon:thumbs-up[role=\"green\",title=\"Passed\"] [small right]#(000ms)#" + newLine() + "When::" + newLine() + "failing step icon:thumbs-down[role=\"red\",title=\"Failed\"] [small right]#(000ms)#" + newLine() + "==========" + newLine() + "" + newLine() + "==== Scenario: scenario icon:thumbs-down[role=\"red\",title=\"Failed\"]" + newLine() + "description" + newLine() + "" + newLine() + "==========" + newLine() + "Then::" + newLine() + "skipped step icon:thumbs-down[role=\"purple\",title=\"Skipped\"] [small right]#(000ms)#" + newLine() + "==========" + newLine() + "" + newLine() + "==== Scenario: scenario icon:thumbs-down[role=\"red\",title=\"Failed\"]" + newLine() + "description" + newLine() + "" + newLine() + "==========" + newLine() + "Given::" + newLine() + "undefined step icon:thumbs-down[role=\"yellow\",title=\"Undefined\"] [small right]#(000ms)#" + newLine() + "==========" + newLine() + "" + newLine()).replaceAll("\r", "")); }
protected String renderFeatureScenarios(Feature feature, CukedoctorDocumentBuilder builder) { StringBuilder sb = new StringBuilder(); for (Scenario scenario : feature.getScenarios()) { sb.append(renderFeatureScenario(scenario, feature, builder)); } feature.setBackgroundRendered(false); return sb.toString(); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { protected String renderFeatureScenarios(Feature feature, CukedoctorDocumentBuilder builder) { StringBuilder sb = new StringBuilder(); for (Scenario scenario : feature.getScenarios()) { sb.append(renderFeatureScenario(scenario, feature, builder)); } feature.setBackgroundRendered(false); return sb.toString(); } }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { protected String renderFeatureScenarios(Feature feature, CukedoctorDocumentBuilder builder) { StringBuilder sb = new StringBuilder(); for (Scenario scenario : feature.getScenarios()) { sb.append(renderFeatureScenario(scenario, feature, builder)); } feature.setBackgroundRendered(false); return sb.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { protected String renderFeatureScenarios(Feature feature, CukedoctorDocumentBuilder builder) { StringBuilder sb = new StringBuilder(); for (Scenario scenario : feature.getScenarios()) { sb.append(renderFeatureScenario(scenario, feature, builder)); } feature.setBackgroundRendered(false); return sb.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); @Override String renderFeature(Feature feature); @Override String renderFeatures(List<Feature> features); }
CukedoctorFeatureRenderer extends AbstractBaseRenderer implements FeatureRenderer { protected String renderFeatureScenarios(Feature feature, CukedoctorDocumentBuilder builder) { StringBuilder sb = new StringBuilder(); for (Scenario scenario : feature.getScenarios()) { sb.append(renderFeatureScenario(scenario, feature, builder)); } feature.setBackgroundRendered(false); return sb.toString(); } CukedoctorFeatureRenderer();  CukedoctorFeatureRenderer(DocumentAttributes documentAttributes);  CukedoctorFeatureRenderer(CukedoctorConfig cukedoctorConfig); @Override String renderFeature(Feature feature); @Override String renderFeatures(List<Feature> features);  }