Class PowerMockJUnit47RunnerDelegateImpl.PowerMockJUnit47MethodRunner
java.lang.Object
org.junit.internal.runners.MethodRoadie
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl.PowerMockJUnit47MethodRunner
- Direct Known Subclasses:
PowerMockJUnit49RunnerDelegateImpl.PowerMockJUnit49MethodRunner
- Enclosing class:
PowerMockJUnit47RunnerDelegateImpl
protected class PowerMockJUnit47RunnerDelegateImpl.PowerMockJUnit47MethodRunner
extends PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class -
Field Summary
FieldsFields inherited from class PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
testMethod -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPowerMockJUnit47MethodRunner(Object testInstance, org.junit.internal.runners.TestMethod method, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description, boolean extendsFromTestCase) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.junit.runners.model.StatementapplyRuleToLastStatement(Method method, Object testInstance, Field field, org.junit.runners.model.Statement lastStatement) private org.junit.runners.model.Statementprivate voidevaluateStatement(org.junit.runners.model.Statement statement) voidexecuteTest(Method method, Object testInstance, Runnable test) private voidexecuteTestInSuper(Method method, Object testInstance, Runnable test) protected voidhandleException(org.junit.internal.runners.TestMethod testMethod, Throwable actualFailure) Since a JUnit 4.7 rule may potentially deal with "unexpected" exceptions we cannot handle the exception before the rule has been completely evaluated.Methods inherited from class PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
runBeforesThenTestThenAfters, runTestMethodMethods inherited from class org.junit.internal.runners.MethodRoadie
addFailure, run, runTest
-
Field Details
-
potentialTestFailure
-
-
Constructor Details
-
PowerMockJUnit47MethodRunner
protected PowerMockJUnit47MethodRunner(Object testInstance, org.junit.internal.runners.TestMethod method, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description, boolean extendsFromTestCase)
-
-
Method Details
-
executeTest
- Overrides:
executeTestin classPowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
-
createStatement
-
applyRuleToLastStatement
protected org.junit.runners.model.Statement applyRuleToLastStatement(Method method, Object testInstance, Field field, org.junit.runners.model.Statement lastStatement) throws IllegalAccessException - Throws:
IllegalAccessException
-
evaluateStatement
private void evaluateStatement(org.junit.runners.model.Statement statement) -
handleException
protected void handleException(org.junit.internal.runners.TestMethod testMethod, Throwable actualFailure) Since a JUnit 4.7 rule may potentially deal with "unexpected" exceptions we cannot handle the exception before the rule has been completely evaluated. Thus we just store the exception here and rethrow it after the test method has finished executing. In that way the rule may get a chance to handle the exception appropriately.- Overrides:
handleExceptionin classPowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
-
executeTestInSuper
-