Class ShadowCall
java.lang.Object
org.robolectric.shadows.ShadowCall
Robolectric test for
Call.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid"Forgets" that sendRttRequest() was called.getId()booleanDetermines whether respondToRttRequest() was called.booleanDetermines whether sendRttRequest() was called.protected voidrespondToRttRequest(int id, boolean accept) protected voidvoidsetDetails(Call.Details details) Sets theCall.Detailsof theCall.voidsetInCallAdapter(Object adapter) Sets theInCallAdapterof theCall.voidsetState(int state) Sets the state of theCall.voidSimulates the destruction of the call by notifying all registeredCall.Callbackinstances.voidtriggerDetailsChanged(Call.Details details) Simulates a call details change by notifying all registeredCall.Callbackinstances.voidtriggerStateChanged(int state) Simulates a call state change by notifying all registeredCall.Callbackinstances.
-
Constructor Details
-
ShadowCall
public ShadowCall()
-
-
Method Details
-
sendRttRequest
-
hasSentRttRequest
public boolean hasSentRttRequest()Determines whether sendRttRequest() was called.- Returns:
- true if sendRttRequest() was called, false otherwise.
-
clearHasSentRttRequest
public void clearHasSentRttRequest()"Forgets" that sendRttRequest() was called. -
respondToRttRequest
-
hasRespondedToRttRequest
public boolean hasRespondedToRttRequest()Determines whether respondToRttRequest() was called.- Returns:
- True if respondToRttRequest() was called, false otherwise.
-
setState
public void setState(int state) Sets the state of theCall.- Parameters:
state- the new state of the call (e.g.,Call.STATE_RINGING).
-
setDetails
Sets theCall.Detailsof theCall.- Parameters:
details- the details to attach to this call.
-
triggerStateChanged
public void triggerStateChanged(int state) Simulates a call state change by notifying all registeredCall.Callbackinstances.- Parameters:
state- the new call state to pass to the callbacks.
-
triggerDetailsChanged
Simulates a call details change by notifying all registeredCall.Callbackinstances.- Parameters:
details- the new call details to pass to the callbacks.
-
triggerCallDestroyed
public void triggerCallDestroyed()Simulates the destruction of the call by notifying all registeredCall.Callbackinstances. -
setInCallAdapter
Sets theInCallAdapterof theCall.- Parameters:
adapter- the adapter to attach to this call.
-
getId
-