InteractionResponse.Builder
public class InteractionResponse.Builder
Builder for InteractionResponse
Summary
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
InteractionResponse |
build()Builds an |
InteractionResponse.Builder |
setRemoteError(@Nullable InteractionResponse.RemoteError remoteError)Set the |
InteractionResponse.Builder |
setResultProto(@NonNull byte[] protoByteArray)Set the result proto as a byte array. |
InteractionResponse.Builder |
setStatus(@NonNull InteractionResponse.Status status) |
Public constructors
Public methods
build
public InteractionResponse build()
Builds an InteractionResponse object.
| Returns | |
|---|---|
InteractionResponse |
an |
| Throws | |
|---|---|
androidx.test.espresso.remote.RemoteProtocolException |
when conflicting properties are set. You can either set an |
androidx.test.espresso.remote.RemoteProtocolException |
when the provided proto byte array cannot be parsed into a protocol buffer of type |
setRemoteError
public InteractionResponse.Builder setRemoteError(@Nullable InteractionResponse.RemoteError remoteError)
Set the RemoteError for this InteractionResponse
| Parameters | |
|---|---|
@Nullable InteractionResponse.RemoteError remoteError |
the remote error to set |
| Returns | |
|---|---|
InteractionResponse.Builder |
fluent interface |
setResultProto
public InteractionResponse.Builder setResultProto(@NonNull byte[] protoByteArray)
Set the result proto as a byte array. This byte array will be parsed into an InteractionResultProto. Providing an invalid byte byte array will result in a RemoteProtocolException when the build method is called!
| Parameters | |
|---|---|
@NonNull byte[] protoByteArray |
the proto byte array to set |
| Returns | |
|---|---|
InteractionResponse.Builder |
fluent interface |