Interface StatusReplyInbox<T>


public interface StatusReplyInbox<T>
A akka.actor.testkit.typed.scaladsl.ReplyInbox which specially handles akka.pattern.StatusReply.

Note that there is no provided ability to expect a specific Throwable, as it's recommended to prefer a string error message or to enumerate failures with specific types.

Not intended for user creation: the akka.actor.testkit.typed.scaladsl.BehaviorTestKit will provide these to denote that at most a single reply is expected.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    expectDone(scala.$eq$colon$eq<T,Done> ev)
    Assert that the successful value of the status reply is akka.Done.
    void
    expectErrorMessage(String errorMessage)
    Assert that the status reply is a failure with this error message and remove the status reply.
    Assert that this inbox has *never* received a reply.
    void
    expectValue(T expectedValue)
    Assert that the status reply is a success with this value and remove the status reply.
    boolean
     
    Get and remove the error value of the status reply.
    Get and remove the status reply.
    Get and remove the successful value of the status reply.
  • Method Details

    • expectDone

      void expectDone(scala.$eq$colon$eq<T,Done> ev)
      Assert that the successful value of the status reply is akka.Done. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.
    • expectErrorMessage

      void expectErrorMessage(String errorMessage)
      Assert that the status reply is a failure with this error message and remove the status reply. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.
    • expectNoReply

      StatusReplyInbox<T> expectNoReply()
      Assert that this inbox has *never* received a reply.
    • expectValue

      void expectValue(T expectedValue)
      Assert that the status reply is a success with this value and remove the status reply. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.
    • hasReply

      boolean hasReply()
    • receiveError

      Throwable receiveError()
      Get and remove the error value of the status reply. This will fail if the status reply is a success. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.
    • receiveStatusReply

      StatusReply<T> receiveStatusReply()
      Get and remove the status reply. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.
    • receiveValue

      T receiveValue()
      Get and remove the successful value of the status reply. This will fail if the status reply is an error. Subsequent calls to any receive or expect method will fail and hasReply will be false after calling this method.