Class DelegatingPowerMockRunner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, PowerMockJUnitRunnerDelegate

    public class DelegatingPowerMockRunner
    extends org.junit.runner.Runner
    implements PowerMockJUnitRunnerDelegate, org.junit.runner.manipulation.Filterable
    • Field Detail

      • testClassName

        private final java.lang.String testClassName
      • delegate

        private final org.junit.runner.Runner delegate
      • testClassLoader

        private final java.lang.ClassLoader testClassLoader
      • testMethods

        private final java.lang.reflect.Method[] testMethods
    • Constructor Detail

      • DelegatingPowerMockRunner

        public DelegatingPowerMockRunner​(java.lang.Class<?> klass)
                                  throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • DelegatingPowerMockRunner

        public DelegatingPowerMockRunner​(java.lang.Class<?> klass,
                                         java.lang.String[] methodsToRun)
                                  throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • DelegatingPowerMockRunner

        public DelegatingPowerMockRunner​(java.lang.Class<?> klass,
                                         java.lang.String[] methodsToRun,
                                         PowerMockTestListener[] listeners)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • determineTestMethods

        private static java.lang.reflect.Method[] determineTestMethods​(java.lang.Class<?> testClass,
                                                                       java.lang.String[] testMethodNames)
      • createDelegate

        private static org.junit.runner.Runner createDelegate​(java.lang.Class<?> testClass)
                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • withContextClassLoader

        private static <T> T withContextClassLoader​(java.lang.ClassLoader loader,
                                                    java.util.concurrent.Callable<T> callable)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • run

        public void run​(org.junit.runner.notification.RunNotifier notifier)
        Specified by:
        run in interface PowerMockJUnitRunnerDelegate
        Specified by:
        run in class org.junit.runner.Runner
      • getDescription

        public org.junit.runner.Description getDescription()
        Specified by:
        getDescription in interface org.junit.runner.Describable
        Specified by:
        getDescription in interface PowerMockJUnitRunnerDelegate
        Specified by:
        getDescription in class org.junit.runner.Runner
      • filter

        public void filter​(org.junit.runner.manipulation.Filter filter)
                    throws org.junit.runner.manipulation.NoTestsRemainException
        Specified by:
        filter in interface org.junit.runner.manipulation.Filterable
        Throws:
        org.junit.runner.manipulation.NoTestsRemainException