lightbulb_outline Please take our October 2018 developer survey. Start survey

InteractionResponse.Builder

public static class InteractionResponse.Builder
extends Object

java.lang.Object
   ↳ android.support.test.espresso.remote.InteractionResponse.Builder


Builder for InteractionResponse

Summary

Public constructors

InteractionResponse.Builder()

Public methods

InteractionResponse build()

Builds an InteractionResponse object.

InteractionResponse.Builder setRemoteError(InteractionResponse.RemoteError remoteError)

Set the InteractionResponse.RemoteError for this InteractionResponse

InteractionResponse.Builder setResultProto(byte[] protoByteArray)

Set the result proto as a byte array.

InteractionResponse.Builder setStatus(InteractionResponse.Status status)

Inherited methods

From class java.lang.Object

Public constructors

InteractionResponse.Builder

InteractionResponse.Builder ()

Public methods

build

InteractionResponse build ()

Builds an InteractionResponse object.

Returns
InteractionResponse an InteractionResponse object.

Throws
RemoteProtocolException when conflicting properties are set. You can either set an InteractionResponse.Status with an optional InteractionResponse.RemoteError error in case that the status is Error or set the proto byte array not both. Setting both values would result in an override, therefore setting both properties will result in an exception.
RemoteProtocolException when the provided proto byte array cannot be parsed into a protocol buffer of type UiInteraction.InteractionResultProto

setRemoteError

InteractionResponse.Builder setRemoteError (InteractionResponse.RemoteError remoteError)

Set the InteractionResponse.RemoteError for this InteractionResponse

Parameters
remoteError InteractionResponse.RemoteError: the remote error to set

Returns
InteractionResponse.Builder fluent interface InteractionResponse.Builder

setResultProto

InteractionResponse.Builder setResultProto (byte[] protoByteArray)

Set the result proto as a byte array. This byte array will be parsed into an UiInteraction.InteractionResultProto. Providing an invalid byte byte array will result in a RemoteProtocolException when the build() method is called!

Parameters
protoByteArray byte: the proto byte array to set

Returns
InteractionResponse.Builder fluent interface InteractionResponse.Builder

setStatus

InteractionResponse.Builder setStatus (InteractionResponse.Status status)

Parameters
status InteractionResponse.Status

Returns
InteractionResponse.Builder