public class LogCaptureFeature extends SimpleFeature
LogCaptureFeature.Filter
class is to be provided with the annotation
LogCaptureFeature.FilterWith
to select the log events to
capture.
A LogCaptureFeature.Result
instance is to be injected with
Inject
as an attribute of the test.
The method LogCaptureFeature.Result.assertHasEvent()
can then be
called from test methods to check that matching log calls (events) have been
captured.Modifier and Type | Class and Description |
---|---|
static interface |
LogCaptureFeature.Filter |
static interface |
LogCaptureFeature.FilterWith |
class |
LogCaptureFeature.NoLogCaptureFilterException |
class |
LogCaptureFeature.Result |
Constructor and Description |
---|
LogCaptureFeature() |
Modifier and Type | Method and Description |
---|---|
void |
afterMethodRun(FeaturesRunner runner,
org.junit.runners.model.FrameworkMethod method,
Object test)
After a test method was ran.
|
void |
beforeMethodRun(FeaturesRunner runner,
org.junit.runners.model.FrameworkMethod method,
Object test)
Before a test method is invoked.
|
void |
configure(FeaturesRunner runner,
com.google.inject.Binder binder)
Configures Guice bindings if any is required by the feature.
|
afterRun, afterTeardown, beforeRun, beforeSetup, initialize, start, stop, testCreated
public void configure(FeaturesRunner runner, com.google.inject.Binder binder)
RunnerFeature
configure
in interface RunnerFeature
configure
in class SimpleFeature
public void beforeMethodRun(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) throws Exception
RunnerFeature
beforeMethodRun
in interface RunnerFeature
beforeMethodRun
in class SimpleFeature
Exception
public void afterMethodRun(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) throws Exception
RunnerFeature
afterMethodRun
in interface RunnerFeature
afterMethodRun
in class SimpleFeature
Exception
Copyright © 2013 Nuxeo SA. All Rights Reserved.