Class DialogMock<T>

  • Type Parameters:
    T - the actual dialog result type.

    public abstract class DialogMock<T>
    extends java.lang.Object
    Base class for mocking of standard dialog results during a test run.
    • Constructor Summary

      Constructors 
      Constructor Description
      DialogMock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void offerResult​(@Nullable java.util.function.Supplier<T> resultSupplier)
      Adds a result to the result queue.
      void offerResult​(@Nullable T result)
      Adds a result to the result queue.
      protected @Nullable java.util.function.Supplier<T> pollResult()
      Gets the next result from the result queue.
      • Methods inherited from class java.lang.Object

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

      • DialogMock

        public DialogMock()
    • Method Detail

      • offerResult

        public void offerResult​(@Nullable T result)
        Adds a result to the result queue.
        Parameters:
        result - the result to add.
      • offerResult

        public void offerResult​(@Nullable java.util.function.Supplier<T> resultSupplier)
        Adds a result to the result queue.
        Parameters:
        resultSupplier - the result to add.
      • pollResult

        protected @Nullable java.util.function.Supplier<T> pollResult()
        Gets the next result from the result queue.
        Returns:
        the next result from the result queue or null if the result queue is empty.