Package akka.actor.testkit.typed.javadsl
Interface StatusReplyInbox<T>
-
public interface StatusReplyInbox<T>
AReplyInbox
which specially handlesStatusReply
.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
expectErrorMessage(java.lang.String errorMessage)
Assert that the status reply is a failure with this error message and remove the status reply.StatusReplyInbox<T>
expectNoReply()
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
hasReply()
java.lang.Throwable
receiveError()
Get and remove the error value of the status reply.StatusReply<T>
receiveStatusReply()
Get and remove the status reply.T
receiveValue()
Get and remove the successful value of the status reply.
-
-
-
Method Detail
-
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 anyreceive
orexpect
method will fail andhasReply
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 anyreceive
orexpect
method will fail andhasReply
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 anyreceive
orexpect
method will fail andhasReply
will be false after calling this method.
-
receiveStatusReply
StatusReply<T> receiveStatusReply()
Get and remove the status reply. Subsequent calls to anyreceive
orexpect
method will fail andhasReply
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 anyreceive
orexpect
method will fail andhasReply
will be false after calling this method.
-
-