public class EasyMockRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Mock
and TestSubject
annotations. Note
that this runner only works with JUnit 4.5 or higherConstructor and Description |
---|
EasyMockRunner(Class<?> klass) |
Modifier and Type | Method and Description |
---|---|
protected org.junit.runners.model.Statement |
withBefores(org.junit.runners.model.FrameworkMethod method,
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, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withPotentialTimeout
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
public EasyMockRunner(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, 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–2022 EasyMock contributors. All rights reserved.