InteractionResponse.Builder


class InteractionResponse.Builder


Builder for InteractionResponse

Summary

Public constructors

Public constructors

Builder

Builder()

Public functions

build

fun build(): InteractionResponse!

Builds an InteractionResponse object.

Throws
androidx.test.espresso.remote.RemoteProtocolException

when conflicting properties are set. You can either set an Status with an optional 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.

androidx.test.espresso.remote.RemoteProtocolException

when the provided proto byte array cannot be parsed into a protocol buffer of type InteractionResultProto

setRemoteError

fun setRemoteError(remoteError: InteractionResponse.RemoteError?): InteractionResponse.Builder!

Set the RemoteError for this InteractionResponse

Parameters
remoteError: InteractionResponse.RemoteError?

the remote error to set

Returns
InteractionResponse.Builder!

fluent interface Builder

setResultProto

fun setResultProto(protoByteArray: ByteArray): InteractionResponse.Builder!

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

Parameters
protoByteArray: ByteArray

the proto byte array to set

Returns
InteractionResponse.Builder!

fluent interface Builder