Class TestExecutorResource<T extends ExecutorService>

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class TestExecutorResource<T extends ExecutorService>
    extends org.junit.rules.ExternalResource
    Resource which starts/stops an ExecutorService for testing purposes.
    • Constructor Detail

      • TestExecutorResource

        public TestExecutorResource​(Supplier<T> serviceFactory)
    • Method Detail

      • before

        protected void before()
                       throws Throwable
        Overrides:
        before in class org.junit.rules.ExternalResource
        Throws:
        Throwable
      • getExecutor

        public T getExecutor()
      • after

        protected void after()
        Overrides:
        after in class org.junit.rules.ExternalResource