/** * Filters scenarios by their categories according the the given report * configuration. * * @param scenarios the scenarios to filter. * @return the filtered scenarios. */ public List<ScenarioTestDoc> filterScenarios( final List<ScenarioTestDoc> scenarios) { return config.getSelectionFilter().filterScenarios(scenarios); }
/** * Creates the helper that essentially encapsulates the index of test * documentation. * * @param config the configuration to be used by the helper. * @return the created helper instance. */ public TestDocHelper createHelper(final ReportConfig config) { final UnitTestDocIndex index = readIndex(); return new TestDocHelper(index, config); }
/** * Filters the given categories according the the given report configuration. * * @param categories the categories to be filtered. * @return a copy of the given <code>categories</code> containing only those * categories that are accepted. */ public List<String> filter(final List<String> categories) { return config.getSelectionFilter().filterCategories(categories); }
/** * Convenience constructor to create an instance with a filter that accepts * all categories and shows defaults. * * @param index the index of test documentation. */ public TestDocHelper(final UnitTestDocIndex index) { this(index, new ReportConfig()); }
/** * Returns the configuration that tells which report information is to be * displayed. * * @return the configuration that tells which report information is to be * displayed. */ public InformationFilter getInformationFilter() { return testDocHelper.getInformationFilter(); }
/** * Registers a report with the given identifier and strategy. * <p> * Note that no report will be registered, if the factory of this instance is * not set. * </p> * * @param reportId the identifier of the report to register. * @param strategy the link constructor strategy to use. * @return <code>true</code> if the report has been created and registered, * <code>false</code> otherwise. */ public boolean registerReport(final ReportId reportId, final LinkConstructorStrategy strategy) { return registerReport(true, reportId, strategy); }
/** * Returns the ordered list of report IDs to render for the UUT. * * @return the ordered list of report IDs to render for the UUT. */ public List<ExternalReport> getUutReports() { return getReports(getUutReportIds()); }
/** * Returns the ordered list of report IDs to render for the test case. * * @return the ordered list of report IDs to render for the test case. */ public List<ExternalReport> getTestCaseReports() { return getReports(getTestCaseReportIds()); }
/** * Returns the manager to access JUnit report information. Is * <code>null</code> if the information is not to be included. * * @return the manager to access JUnit report information. */ public JUnitTestCaseManager getJunitManager() { return config.getJunitManager(); }
/** * Returns the comparator to use to sort the rendering of unit test * documentation. * * @return the comparator to use to sort the rendering of unit test * documentation. */ public Comparator<UnitTestDoc> getUnitTestDocComparator() { return config.getUnitTestDocComparator(); }
/** * Returns the configuration that tells which report information is to be * displayed. * * @return the configuration that tells which report information is to be * displayed. */ public InformationFilter getInformationFilter() { return config.getInformationFilter(); }
/** * Constructs instances of {@link InformationFilter}. * * @return the requested instance. */ public InformationFilter build() { return new InformationFilter(this); }
/** * Returns the configuration of links to images used in reports. * * @return the configuration of links to images used in reports. */ public ImageHelper getImageHelper() { return config.getImageHelper(); }
/** * Returns the external reports to reference to. * * @return the external reports. */ public ExternalReportReferences getReports() { return config.getReports(); }
/** * Default constructor. * * @param includeCategories the category names of test scenarios that should * be included. * @param excludeCategories the category names of test scenarios that should * be excluded. */ public SelectionFilter(final List<String> includeCategories, final List<String> excludeCategories) { this.includeCategories = provideCategories(includeCategories); this.excludeCategories = provideCategories(excludeCategories); }
/** * Returns the configuration that tells which report information is to be * displayed. * * @return the configuration that tells which report information is to be * displayed. */ public InformationFilter getInformationFilter() { return testDocHelper.getInformationFilter(); }
/** * Checks whether or not to include JUnit report information. * * @return <code>true</code> if the information is requested to be included, * <code>false</code> if it should be omitted. */ public boolean isJUnitReportInformationRequested() { return config.getJunitManager() != null; }
/** * Default constructor. * * @param messages the resource bundles with messages to display as labels in * the generated report. * @param testDocHelper the value for testDocHelper. */ protected AbstractReportExporter(final MessageHelper messages, final TestDocHelper testDocHelper) { this.messages = messages; this.testDocHelper = testDocHelper; this.informationFilter = testDocHelper.getInformationFilter(); }
/** * Default constructor. * * @param messages the resource bundles with messages to display as labels in * the generated report. * @param testDocHelper the value for testDocHelper. */ protected AbstractReportExporter(final MessageHelper messages, final TestDocHelper testDocHelper) { this.messages = messages; this.testDocHelper = testDocHelper; this.informationFilter = testDocHelper.getInformationFilter(); }