public abstract class TestClasses extends Object implements com.oracle.bedrock.Option.Collectable, com.oracle.bedrock.Option, Serializable
Classes.
Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Modifier and Type | Class and Description |
|---|---|
static class |
TestClasses.AlwaysRunFilter
A JUnit test
Filter that always matches everything. |
protected static class |
TestClasses.ClassPathClasses
A
TestClasses instance that resolves test classes
from a specific ClassPath instance. |
static class |
TestClasses.IncludeExcludePredicate
A
Predicate that uses an inner predicate as well as this TestClasses
include and exclude patterns to filter Class files. |
static class |
TestClasses.SpecificClasses
A
TestClasses instance that uses a fixed set of Classes
as the set of tests to execute. |
protected static class |
TestClasses.TestFilter
A JUnit test
Filter that filters test Class
names and method names based on the set of included and
excluded TestClasses.TestMatchers. |
protected static class |
TestClasses.TestMatcher
A class that matches a class and method name
based on a pair of regular expressions.
|
| Constructor and Description |
|---|
TestClasses() |
| Modifier and Type | Method and Description |
|---|---|
static TestClasses |
empty()
Create an empty set of test classes.
|
TestClasses |
exclude(String... patterns)
Add the specified regular expression pattern to the set of
patterns to use to determine tests to be excluded in the
test run.
|
static TestClasses |
from(ClassPath classPath)
Create a
TestClasses option that will resolve test classes
from the specified ClassPath. |
Class<? extends com.oracle.bedrock.Option.Collector> |
getCollectorClass() |
protected Predicate<Class<?>> |
getTestClassPredicate()
Obtain the
Predicate to use when resolving the list
of classes to include in a test run. |
org.junit.runner.manipulation.Filter |
getTestFilter()
Obtain the
Filter instance to be used by the test run
to determine tests that will be executed. |
TestClasses |
include(String... patterns)
Add the specified regular expression pattern to the set of
patterns to use to determine tests to be included in the
test run.
|
static TestClasses |
of(Class<?>... classes)
Create a
TestClasses option that will resolve test classes
from the specified Class instances |
abstract Set<Class<?>> |
resolveTestClasses()
|
public TestClasses include(String... patterns)
NOTE: The exclude patterns take precedence over the include patterns, so if a test matches both include and exclude then it is excluded.
patterns - the regular expressions to use to match
tests included in the test runTestClasses instance for method chainingpublic TestClasses exclude(String... patterns)
NOTE: The exclude patterns take precedence over the include patterns, so if a test matches both include and exclude then it is excluded.
patterns - the regular expressions to use to match
tests included in the test runTestClasses instance for method chainingpublic org.junit.runner.manipulation.Filter getTestFilter()
Filter instance to be used by the test run
to determine tests that will be executed.Filter instance to be used by the test
run to determine tests that will be executedprotected Predicate<Class<?>> getTestClassPredicate()
Predicate to use when resolving the list
of classes to include in a test run.Predicate to use when resolving the list
of classes to include in a test runpublic Class<? extends com.oracle.bedrock.Option.Collector> getCollectorClass()
getCollectorClass in interface com.oracle.bedrock.Option.Collectablepublic static TestClasses of(Class<?>... classes)
TestClasses option that will resolve test classes
from the specified Class instancesclasses - the Classes to use to resolve test classesTestClasses option that will resolve test classes
from the specified Classespublic static TestClasses from(ClassPath classPath)
TestClasses option that will resolve test classes
from the specified ClassPath.classPath - the ClassPath to use to resolve test classesTestClasses option that will resolve test classes
from the specified ClassPath@OptionsByType.Default public static TestClasses empty()
Copyright © 2017. All rights reserved.