Class MockExecutor

java.lang.Object
com.github.mizosoft.methanol.testing.MockExecutor
All Implemented Interfaces:
Executor

public class MockExecutor extends Object implements Executor
An Executor that records submitted tasks and allows running them later.
  • Constructor Details

    • MockExecutor

      public MockExecutor()
  • Method Details

    • execute

      public void execute(Runnable command)
      Specified by:
      execute in interface Executor
    • hasNext

      public boolean hasNext()
    • runNext

      public void runNext()
    • runAll

      public void runAll()
    • taskCount

      public int taskCount()
    • reject

      public void reject(boolean on)
    • executeDirectly

      public void executeDirectly(boolean on)
    • awaitNext

      public boolean awaitNext(long timeout, TimeUnit unit)
    • toString

      public String toString()
      Overrides:
      toString in class Object