public class FacesMockitoRunner
extends org.junit.runners.BlockJUnit4ClassRunner
JUnit runner for running mocked JSF environment.
It initialized MockFacesEnvironment and is able to inject mocked JSF classes held by MockFacesEnvironment to
current test instance.
Similarly to MockitoJUnitRunner, it uses MockitoAnnotations.initMocks(Object) on test instance to mock all
the test dependencies annotated by Mockito annotations.
| Constructor and Description |
|---|
FacesMockitoRunner(Class<?> klass)
Instantiates a new faces mockito runner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run(org.junit.runner.notification.RunNotifier notifier) |
protected void |
runAfter(Object target)
Run after each test
|
protected void |
runBefore(Object target)
Run before each test
|
protected org.junit.runners.model.Statement |
withAfters(org.junit.runners.model.FrameworkMethod method,
Object target,
org.junit.runners.model.Statement originalStatement) |
protected org.junit.runners.model.Statement |
withBefores(org.junit.runners.model.FrameworkMethod method,
Object target,
org.junit.runners.model.Statement originalStatement) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, testName, validateConstructor, validateInstanceMethods, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withPotentialTimeoutpublic FacesMockitoRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
klass - the classorg.junit.runners.model.InitializationError - the initialization errorpublic void run(org.junit.runner.notification.RunNotifier notifier)
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected org.junit.runners.model.Statement withBefores(org.junit.runners.model.FrameworkMethod method,
Object target,
org.junit.runners.model.Statement originalStatement)
withBefores in class org.junit.runners.BlockJUnit4ClassRunnerprotected org.junit.runners.model.Statement withAfters(org.junit.runners.model.FrameworkMethod method,
Object target,
org.junit.runners.model.Statement originalStatement)
withAfters in class org.junit.runners.BlockJUnit4ClassRunnerprotected void runBefore(Object target)
target - the target test instanceprotected void runAfter(Object target)
target - the target test instanceCopyright © 2014 JBoss by Red Hat. All Rights Reserved.