Class PowerMockJUnit47RunnerDelegateImpl.PowerMockJUnit47MethodRunner

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PowerMockJUnit47MethodRunner​(java.lang.Object testInstance, org.junit.internal.runners.TestMethod method, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description, boolean extendsFromTestCase)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.junit.runners.model.Statement applyRuleToLastStatement​(java.lang.reflect.Method method, java.lang.Object testInstance, java.lang.reflect.Field field, org.junit.runners.model.Statement lastStatement)  
      private org.junit.runners.model.Statement createStatement​(java.lang.reflect.Method method, java.lang.Object testInstance, java.lang.Runnable test, java.util.Set<java.lang.reflect.Field> rules)  
      private void evaluateStatement​(org.junit.runners.model.Statement statement)  
      void executeTest​(java.lang.reflect.Method method, java.lang.Object testInstance, java.lang.Runnable test)  
      private void executeTestInSuper​(java.lang.reflect.Method method, java.lang.Object testInstance, java.lang.Runnable test)  
      protected void handleException​(org.junit.internal.runners.TestMethod testMethod, java.lang.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 org.junit.internal.runners.MethodRoadie

        addFailure, run, runTest
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • potentialTestFailure

        private java.lang.Throwable potentialTestFailure
    • Constructor Detail

      • PowerMockJUnit47MethodRunner

        protected PowerMockJUnit47MethodRunner​(java.lang.Object testInstance,
                                               org.junit.internal.runners.TestMethod method,
                                               org.junit.runner.notification.RunNotifier notifier,
                                               org.junit.runner.Description description,
                                               boolean extendsFromTestCase)
    • Method Detail

      • createStatement

        private org.junit.runners.model.Statement createStatement​(java.lang.reflect.Method method,
                                                                  java.lang.Object testInstance,
                                                                  java.lang.Runnable test,
                                                                  java.util.Set<java.lang.reflect.Field> rules)
      • applyRuleToLastStatement

        protected org.junit.runners.model.Statement applyRuleToLastStatement​(java.lang.reflect.Method method,
                                                                             java.lang.Object testInstance,
                                                                             java.lang.reflect.Field field,
                                                                             org.junit.runners.model.Statement lastStatement)
                                                                      throws java.lang.IllegalAccessException
        Throws:
        java.lang.IllegalAccessException
      • evaluateStatement

        private void evaluateStatement​(org.junit.runners.model.Statement statement)
      • handleException

        protected void handleException​(org.junit.internal.runners.TestMethod testMethod,
                                       java.lang.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:
        handleException in class PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner
      • executeTestInSuper

        private void executeTestInSuper​(java.lang.reflect.Method method,
                                        java.lang.Object testInstance,
                                        java.lang.Runnable test)