public class FeaturesRunner
extends org.junit.runners.BlockJUnit4ClassRunner
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
FeaturesRunner.FeatureCallable |
protected class |
FeaturesRunner.InvokeMethod |
| Modifier and Type | Field and Description |
|---|---|
protected Set<Class<? extends RunnerFeature>> |
featureClasses |
protected List<RunnerFeature> |
features |
protected ConditionalIgnoreRule |
ignoreRule |
protected com.google.inject.Injector |
injector
Guice injector.
|
protected TargetResourceLocator |
locator |
protected RandomBug |
randomBugRule |
protected static AnnotationScanner |
scanner |
| Constructor and Description |
|---|
FeaturesRunner(Class<?> classToRun) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterMethodRun(org.junit.runners.model.FrameworkMethod method,
Object test) |
protected void |
afterRun() |
protected void |
afterTeardown() |
protected void |
beforeMethodRun(org.junit.runners.model.FrameworkMethod method,
Object test) |
protected void |
beforeRun() |
protected void |
beforeSetup() |
protected void |
configureBindings(com.google.inject.Binder binder) |
protected com.google.inject.Injector |
createInjector() |
Object |
createTest() |
<T extends Annotation> |
getConfig(Class<T> type) |
<T extends Annotation> |
getConfig(org.junit.runners.model.FrameworkMethod method,
Class<T> type)
Get the annotation on the test method, if no annotation has been found,
get the annotation from the test class (See
getConfig(Class)) |
<T extends RunnerFeature> |
getFeature(Class<T> type) |
List<RunnerFeature> |
getFeatures() |
com.google.inject.Injector |
getInjector()
Gets the Guice injector.
|
static AnnotationScanner |
getScanner() |
Path |
getTargetTestBasepath() |
Class<?> |
getTargetTestClass() |
URL |
getTargetTestResource(String name) |
protected void |
initialize() |
protected void |
invokeFeatures(List<RunnerFeature> features,
FeaturesRunner.FeatureCallable callable) |
protected void |
loadFeature(HashSet<Class<?>> cycles,
Set<Class<? extends RunnerFeature>> features,
Class<? extends RunnerFeature> clazz) |
void |
loadFeatures(Class<?> classToRun) |
protected org.junit.runners.model.Statement |
methodInvoker(org.junit.runners.model.FrameworkMethod method,
Object test) |
void |
resetInjector() |
static <T> List<T> |
reversed(List<T> list) |
protected List<org.junit.rules.MethodRule> |
rules(Object target) |
void |
run(org.junit.runner.notification.RunNotifier notifier) |
protected void |
runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier) |
protected void |
start() |
protected void |
stop() |
protected void |
testCreated(Object test) |
String |
toString() |
protected void |
validateZeroArgConstructor(List<Throwable> errors) |
collectInitializationErrors, computeTestMethods, describeChild, getChildren, getTestRules, methodBlock, possiblyExpectingExceptions, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, withAfters, withBefores, withPotentialTimeoutprotected static final AnnotationScanner scanner
protected com.google.inject.Injector injector
protected final Set<Class<? extends RunnerFeature>> featureClasses
protected final List<RunnerFeature> features
protected final TargetResourceLocator locator
protected final ConditionalIgnoreRule ignoreRule
protected final RandomBug randomBugRule
public FeaturesRunner(Class<?> classToRun) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic static AnnotationScanner getScanner()
public Class<?> getTargetTestClass()
public Path getTargetTestBasepath()
public URL getTargetTestResource(String name) throws IOException
IOExceptionprotected void loadFeature(HashSet<Class<?>> cycles, Set<Class<? extends RunnerFeature>> features, Class<? extends RunnerFeature> clazz) throws Exception
Exceptionpublic <T extends RunnerFeature> T getFeature(Class<T> type)
public List<RunnerFeature> getFeatures()
public <T extends Annotation> T getConfig(Class<T> type)
public <T extends Annotation> T getConfig(org.junit.runners.model.FrameworkMethod method, Class<T> type)
getConfig(Class))protected void beforeMethodRun(org.junit.runners.model.FrameworkMethod method,
Object test)
throws Exception
Exceptionprotected void afterMethodRun(org.junit.runners.model.FrameworkMethod method,
Object test)
throws Exception
Exceptionprotected void beforeSetup()
protected void afterTeardown()
protected void configureBindings(com.google.inject.Binder binder)
public com.google.inject.Injector getInjector()
public void resetInjector()
protected com.google.inject.Injector createInjector()
public void run(org.junit.runner.notification.RunNotifier notifier)
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected void runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier)
runChild in class org.junit.runners.BlockJUnit4ClassRunnerpublic Object createTest() throws Exception
createTest in class org.junit.runners.BlockJUnit4ClassRunnerExceptionprotected void validateZeroArgConstructor(List<Throwable> errors)
validateZeroArgConstructor in class org.junit.runners.BlockJUnit4ClassRunnerprotected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method,
Object test)
methodInvoker in class org.junit.runners.BlockJUnit4ClassRunnerprotected List<org.junit.rules.MethodRule> rules(Object target)
rules in class org.junit.runners.BlockJUnit4ClassRunnerprotected void invokeFeatures(List<RunnerFeature> features, FeaturesRunner.FeatureCallable callable)
Copyright © 2019 Nuxeo SA. All rights reserved.