Top Description Constructors Methods
org.easymock

public Class EasyMockRunner

extends BlockJUnit4ClassRunner
Class Inheritance
Imports
org.junit.runners.BlockJUnit4ClassRunner, org.junit.runners.model.FrameworkMethod, .InitializationError, .Statement

JUnit runner used to process Mock and TestSubject annotations. Note that this runner only works with JUnit 4.5 or higher
Author
Henri Tremblay
Since
3.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Statement

Returns:

a statement to return to the caller
withBefores
(FrameworkMethod
test method class
method
,
Object
test class instance
target
,
Statement
current statement
statement
)

Overrides org.junit.runners.BlockJUnit4ClassRunner.withBefores.

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.
Inherited from org.junit.runners.BlockJUnit4ClassRunner:
collectInitializationErrorscomputeTestMethodscreateTestcreateTestdescribeChildgetChildrengetTestRulesisIgnoredmethodBlockmethodInvokerpossiblyExpectingExceptionsrulesrunChildtestNamevalidateConstructorvalidateFieldsvalidateInstanceMethodsvalidateNoNonStaticInnerClassvalidateOnlyOneConstructorvalidateTestMethodsvalidateZeroArgConstructorwithAfterswithPotentialTimeout

Constructor Detail

EasyMockRunnerback to summary
public EasyMockRunner(Class<?> klass) throws InitializationError

Method Detail

withBeforesback to summary
protected Statement withBefores(FrameworkMethod method, Object target, Statement statement)

Overrides org.junit.runners.BlockJUnit4ClassRunner.withBefores.

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. Using a statement wouldn't work.

Parameters
method:FrameworkMethod

test method class

target:Object

test class instance

statement:Statement

current statement

Returns:Statement

a statement to return to the caller

Annotations
@Override