java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.easymock.EasyMockRunner
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
public class EasyMockRunner
extends org.junit.runners.BlockJUnit4ClassRunner
JUnit runner used to process
Mock and TestSubject annotations. Note
that this runner only works with JUnit 4.5 or higher- Since:
- 3.2
- Author:
- Henri Tremblay
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.junit.runners.model.StatementwithBefores(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@Beforeof our class being called.Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCount
-
Constructor Details
-
EasyMockRunner
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
withBefores
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@Beforeof our class being called. Using a statement wouldn't work.- Overrides:
withBeforesin classorg.junit.runners.BlockJUnit4ClassRunner- Parameters:
method- test method classtarget- test class instancestatement- current statement- Returns:
- a statement to return to the caller
-