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 TypeMethodDescriptionvoidexpectDone(scala.$eq$colon$eq<T, Done> ev) Assert that the successful value of the status reply isakka.Done.voidexpectErrorMessage(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.voidexpectValue(T expectedValue) Assert that the status reply is a success with this value and remove the status reply.booleanhasReply()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
Assert that the successful value of the status reply isakka.Done. Subsequent calls to anyreceiveorexpectmethod will fail andhasReplywill be false after calling this method. -
expectErrorMessage
Assert that the status reply is a failure with this error message and remove the status reply. Subsequent calls to anyreceiveorexpectmethod will fail andhasReplywill be false after calling this method. -
expectNoReply
StatusReplyInbox<T> expectNoReply()Assert that this inbox has *never* received a reply. -
expectValue
Assert that the status reply is a success with this value and remove the status reply. Subsequent calls to anyreceiveorexpectmethod will fail andhasReplywill 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 anyreceiveorexpectmethod will fail andhasReplywill be false after calling this method. -
receiveStatusReply
StatusReply<T> receiveStatusReply()Get and remove the status reply. Subsequent calls to anyreceiveorexpectmethod will fail andhasReplywill 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 anyreceiveorexpectmethod will fail andhasReplywill be false after calling this method.
-