Tabnine Logo
SelectionFilter
Code IndexAdd Tabnine to your IDE (free)

How to use
SelectionFilter
in
de.smartics.testdoc.report.export.doc

Best Java code snippets using de.smartics.testdoc.report.export.doc.SelectionFilter (Showing top 10 results out of 315)

origin: de.smartics.testdoc/testdoc-report

/**
 * Checks if all categories are accepted.
 *
 * @param categories the categories to be accepted.
 * @return <code>true</code> if all categories are accepted,
 *         <code>false</code> if at least one category is rejected.
 */
private boolean acceptsAllOf(final List<String> categories)
{
 if (categories.isEmpty())
 {
  return excludeCategories != ALL; // NOPMD
 }
 for (final String category : categories)
 {
  if (!acceptCategory(category))
  {
   return false;
  }
 }
 return true;
}
origin: de.smartics.testdoc/testdoc-report

if (excludeCategories == ALL) // NOPMD
 return acceptIncludes(type);
   return acceptIncludes(type);
origin: de.smartics.testdoc/testdoc-report

/**
 * Checks if the scenario is accepted.
 *
 * @param scenario the scenario to check.
 * @return true when accepted false otherwise.
 */
public boolean acceptScenario(final ScenarioTestDoc scenario)
{
 return acceptsAllOf(scenario.getCategories());
}
origin: de.smartics.testdoc/maven-testdoc-report-plugin

private ReportConfig createReportConfig() throws MavenReportException
{
 final InformationFilter.Builder builder = new InformationFilter.Builder();
 builder.setShowIndexOfIndices(showIndexOfIndices);
 builder.setShowNumbering(showNumbering);
 builder.setShowCategories(showCategories);
 builder.setShowTestCase(showTestCase);
 builder.setShowTestStatus(showTestStatus);
 final InformationFilter filter = builder.build();
 final SelectionFilter selectionFilter =
   new SelectionFilter(includeCategories, excludeCategories);
 final Comparator<UnitTestDoc> comparator = createComparator();
 final ReportConfig config =
   new ReportConfig(selectionFilter, filter, junitManager, imageHelper,
     reports, comparator);
 return config;
}
origin: de.smartics.testdoc/testdoc-report

/**
 * 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);
}
origin: de.smartics.testdoc/testdoc-report

/**
 * 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);
}
origin: de.smartics.testdoc/testdoc-report

/**
 * 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);
}
origin: de.smartics.testdoc/testdoc-maven-report-plugin

private ReportConfig createReportConfig() throws MavenReportException
{
 final InformationFilter.Builder builder = new InformationFilter.Builder();
 builder.setShowIndexOfIndices(showIndexOfIndices);
 builder.setShowNumbering(showNumbering);
 builder.setShowCategories(showCategories);
 builder.setShowTestCase(showTestCase);
 builder.setShowTestStatus(showTestStatus);
 final InformationFilter filter = builder.build();
 final SelectionFilter selectionFilter =
   new SelectionFilter(includeCategories, excludeCategories);
 final Comparator<UnitTestDoc> comparator = createComparator();
 final ReportConfig config =
   new ReportConfig(selectionFilter, filter, junitManager, imageHelper,
     reports, comparator);
 return config;
}
origin: de.smartics.testdoc/testdoc-report

/**
 * Filters scenarios by their categories.
 *
 * @param scenarios the scenarios to filter.
 * @return the filtered scenarios.
 */
public List<ScenarioTestDoc> filterScenarios(
  final List<ScenarioTestDoc> scenarios)
{
 final List<ScenarioTestDoc> filtered =
   new ArrayList<ScenarioTestDoc>(scenarios.size());
 for (final ScenarioTestDoc scenario : scenarios)
 {
  final List<String> categories = scenario.getCategories();
  if (acceptsAllOf(categories))
  {
   filtered.add(scenario);
  }
 }
 return filtered;
}
origin: de.smartics.testdoc/testdoc-report

/**
 * Filters the list of categories to retain only those that are accepted by
 * {@link #acceptCategory(String)}.
 *
 * @param categories the category list to filter.
 * @return a copy of the given <code>categories</code> containing only those
 *         categories that are accepted.
 */
public List<String> filterCategories(final List<String> categories)
{
 if (categories == null)
 {
  return null;
 }
 if (excludeCategories != ALL && excludeCategories.isEmpty()) // NOPMD
 {
  return new ArrayList<String>(categories);
 }
 final List<String> copy = new ArrayList<String>(categories.size());
 for (final String category : categories)
 {
  if (acceptCategory(category))
  {
   copy.add(category);
  }
 }
 return copy;
}
de.smartics.testdoc.report.export.docSelectionFilter

Javadoc

Filter on test cases based on categories.

Most used methods

  • <init>
    Default constructor.
  • acceptCategory
    Checks whether or not the category is accepted to display the so tagged scenario.
  • acceptIncludes
  • acceptsAllOf
    Checks if all categories are accepted.
  • filterCategories
    Filters the list of categories to retain only those that are accepted by #acceptCategory(String).
  • filterScenarios
    Filters scenarios by their categories.
  • provideCategories
    If there are no filter elements, a default filter is created.

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now