Interface StatusReplyInbox<T>


  • public interface StatusReplyInbox<T>
    A ReplyInbox which specially handles 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 BehaviorTestKit will provide these to denote that at most a single reply is expected.

    • Method Detail

      • expectDone

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

        void expectErrorMessage​(java.lang.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

        java.lang.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.