public class EasyMockRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Mock
and TestSubject
annotations. Note
that this runner only works with JUnit 4.5 or higherConstructor | Description |
---|---|
EasyMockRunner(java.lang.Class<?> klass) |
Modifier and Type | Method | Description |
---|---|---|
protected org.junit.runners.model.Statement |
withBefores(org.junit.runners.model.FrameworkMethod method,
java.lang.Object target,
org.junit.runners.model.Statement statement) |
We are required to override a deprecated method because it's the only way the perform
the mock injection before the
@Before of our class being called. |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withPotentialTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public EasyMockRunner(java.lang.Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
protected org.junit.runners.model.Statement withBefores(org.junit.runners.model.FrameworkMethod method, java.lang.Object target, org.junit.runners.model.Statement statement)
@Before
of our class being called. Using a statement
wouldn't work.withBefores
in class org.junit.runners.BlockJUnit4ClassRunner
method
- test method classtarget
- test class instancestatement
- current statementCopyright © 2001-2019 EasyMock contributors. This documentation is provided under the terms of the Apache 2 licence.