public final class CallBehaviorAdapter extends Object implements NetworkBehavior.Adapter<Call<?>>
| Constructor and Description |
|---|
CallBehaviorAdapter(Retrofit retrofit,
ExecutorService backgroundExecutor)
Create an instance with a normal
Retrofit instance and an executor service on which
the simulated delays will be created. |
| Modifier and Type | Method and Description |
|---|---|
Call<?> |
applyBehavior(NetworkBehavior behavior,
Call<?> value)
Apply
behavior to value so that it exhibits the configured network behavior
traits when interacted with. |
public CallBehaviorAdapter(Retrofit retrofit, ExecutorService backgroundExecutor)
Retrofit instance and an executor service on which
the simulated delays will be created. Instances of this class should be re-used so that the
behavior of every mock service is consistent.public Call<?> applyBehavior(NetworkBehavior behavior, Call<?> value)
NetworkBehavior.Adapterbehavior to value so that it exhibits the configured network behavior
traits when interacted with.applyBehavior in interface NetworkBehavior.Adapter<Call<?>>Copyright © 2015 Square, Inc.. All Rights Reserved.