public final class IncludeCategories extends Object
FilterFactory
to include categories.
The Filter
that is created will filter out tests that are categorized with any of the
given categories.
Usage from command line:
--filter=org.junit.experimental.categories.IncludeCategories=pkg.of.Cat1,pkg.of.Cat2
Usage from API:
new IncludeCategories().createFilter(Cat1.class, Cat2.class);
FilterFactory.FilterNotCreatedException
Constructor and Description |
---|
IncludeCategories() |
Modifier and Type | Method and Description |
---|---|
Filter |
createFilter(FilterFactoryParams params)
Creates a
Categories.CategoryFilter given a
FilterFactoryParams argument. |
protected Filter |
createFilter(List<Class<?>> categories)
Creates a
Filter which is only passed by tests that are
categorized with any of the specified categories. |
protected Filter createFilter(List<Class<?>> categories)
Filter
which is only passed by tests that are
categorized with any of the specified categories.categories
- Category classes.public Filter createFilter(FilterFactoryParams params) throws FilterFactory.FilterNotCreatedException
Categories.CategoryFilter
given a
FilterFactoryParams
argument.createFilter
in interface FilterFactory
params
- Parameters needed to create the Filter
FilterFactory.FilterNotCreatedException
Copyright © 2002–2017 JUnit. All rights reserved.