Class SandboxTestRunner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable
    Direct Known Subclasses:
    RobolectricTestRunner

    public class SandboxTestRunner
    extends org.junit.runners.BlockJUnit4ClassRunner
    • Constructor Detail

      • SandboxTestRunner

        public SandboxTestRunner​(Class<?> klass)
                          throws org.junit.runners.model.InitializationError
        Throws:
        org.junit.runners.model.InitializationError
      • SandboxTestRunner

        public SandboxTestRunner​(Class<?> klass,
                                 Injector injector)
                          throws org.junit.runners.model.InitializationError
        Throws:
        org.junit.runners.model.InitializationError
    • Method Detail

      • classBlock

        protected org.junit.runners.model.Statement classBlock​(org.junit.runner.notification.RunNotifier notifier)
        Overrides:
        classBlock in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
      • afterClass

        protected void afterClass()
      • getSandbox

        @Nonnull
        protected Sandbox getSandbox​(org.junit.runners.model.FrameworkMethod method)
      • configureSandbox

        protected void configureSandbox​(Sandbox sandbox,
                                        org.junit.runners.model.FrameworkMethod method)
      • methodBlock

        protected org.junit.runners.model.Statement methodBlock​(org.junit.runners.model.FrameworkMethod method)
        Overrides:
        methodBlock in class org.junit.runners.BlockJUnit4ClassRunner
      • beforeTest

        protected void beforeTest​(Sandbox sandbox,
                                  org.junit.runners.model.FrameworkMethod method,
                                  Method bootstrappedMethod)
                           throws Throwable
        Throws:
        Throwable
      • afterTest

        protected void afterTest​(org.junit.runners.model.FrameworkMethod method,
                                 Method bootstrappedMethod)
      • finallyAfterTest

        protected void finallyAfterTest​(org.junit.runners.model.FrameworkMethod method)
      • getExtraShadows

        @Nonnull
        protected Class<?>[] getExtraShadows​(org.junit.runners.model.FrameworkMethod method)
      • withPotentialTimeout

        protected org.junit.runners.model.Statement withPotentialTimeout​(org.junit.runners.model.FrameworkMethod method,
                                                                         Object test,
                                                                         org.junit.runners.model.Statement next)
        Disables JUnit's normal timeout mode strategy.
        Overrides:
        withPotentialTimeout in class org.junit.runners.BlockJUnit4ClassRunner
        See Also:
        BlockJUnit4ClassRunner.methodInvoker(FrameworkMethod, Object), TimeLimitedStatement