retrofit-mock
Module Contents
alltypes
Module Contents
class
BehaviorDelegate
<
T
:
Any
!
>
Module Contents
fun
<
R
:
Any
!
>
returning
(
call
:
Call
<
R
>
!
)
:
T
fun
returningResponse
(
@Nullable
response
:
Any
?
)
:
T
class
Calls
Module Contents
static
fun
<
T
:
Any
!
>
defer
(
callable
:
Callable
<
Call
<
T
>
!
>
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
failure
(
failure
:
IOException
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
failure
(
failure
:
Throwable
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
response
(
@Nullable
successValue
:
T
?
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
response
(
response
:
Response
<
T
>
!
)
:
Call
<
T
>
!
class
MockRetrofit
Module Contents
fun
backgroundExecutor
(
)
:
Executor
!
class
Builder
Module Contents
Builder
(
retrofit
:
Retrofit
!
)
fun
backgroundExecutor
(
executor
:
ExecutorService
!
)
:
MockRetrofit.Builder
!
fun
build
(
)
:
MockRetrofit
!
fun
networkBehavior
(
behavior
:
NetworkBehavior
!
)
:
MockRetrofit.Builder
!
fun
<
T
:
Any
!
>
create
(
service
:
Class
<
T
>
!
)
:
BehaviorDelegate
<
T
>
!
fun
networkBehavior
(
)
:
NetworkBehavior
!
fun
retrofit
(
)
:
Retrofit
!
class
NetworkBehavior
Module Contents
fun
calculateDelay
(
unit
:
TimeUnit
!
)
:
Long
fun
calculateIsError
(
)
:
Boolean
fun
calculateIsFailure
(
)
:
Boolean
static
fun
create
(
)
:
NetworkBehavior
!
static
fun
create
(
random
:
Random
!
)
:
NetworkBehavior
!
fun
createErrorResponse
(
)
:
Response
<
*
>
!
fun
delay
(
unit
:
TimeUnit
!
)
:
Long
fun
errorPercent
(
)
:
Int
fun
failureException
(
)
:
Throwable
!
fun
failurePercent
(
)
:
Int
fun
setDelay
(
amount
:
Long
,
unit
:
TimeUnit
!
)
:
Unit
fun
setErrorFactory
(
errorFactory
:
Callable
<
Response
<
*
>
!
>
!
)
:
Unit
fun
setErrorPercent
(
errorPercent
:
Int
)
:
Unit
fun
setFailureException
(
exception
:
Throwable
!
)
:
Unit
fun
setFailurePercent
(
failurePercent
:
Int
)
:
Unit
fun
setVariancePercent
(
variancePercent
:
Int
)
:
Unit
fun
variancePercent
(
)
:
Int
package
retrofit2.mock
Module Contents
class
BehaviorDelegate
<
T
:
Any
!
>
Module Contents
fun
<
R
:
Any
!
>
returning
(
call
:
Call
<
R
>
!
)
:
T
fun
returningResponse
(
@Nullable
response
:
Any
?
)
:
T
class
Calls
Module Contents
static
fun
<
T
:
Any
!
>
defer
(
callable
:
Callable
<
Call
<
T
>
!
>
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
failure
(
failure
:
IOException
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
failure
(
failure
:
Throwable
!
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
response
(
@Nullable
successValue
:
T
?
)
:
Call
<
T
>
!
static
fun
<
T
:
Any
!
>
response
(
response
:
Response
<
T
>
!
)
:
Call
<
T
>
!
inline
fun
<
reified
T
>
MockRetrofit
.
create
(
)
:
BehaviorDelegate
<
T
>
class
MockRetrofit
Module Contents
fun
backgroundExecutor
(
)
:
Executor
!
class
Builder
Module Contents
Builder
(
retrofit
:
Retrofit
!
)
fun
backgroundExecutor
(
executor
:
ExecutorService
!
)
:
MockRetrofit.Builder
!
fun
build
(
)
:
MockRetrofit
!
fun
networkBehavior
(
behavior
:
NetworkBehavior
!
)
:
MockRetrofit.Builder
!
fun
<
T
:
Any
!
>
create
(
service
:
Class
<
T
>
!
)
:
BehaviorDelegate
<
T
>
!
fun
networkBehavior
(
)
:
NetworkBehavior
!
fun
retrofit
(
)
:
Retrofit
!
class
NetworkBehavior
Module Contents
fun
calculateDelay
(
unit
:
TimeUnit
!
)
:
Long
fun
calculateIsError
(
)
:
Boolean
fun
calculateIsFailure
(
)
:
Boolean
static
fun
create
(
)
:
NetworkBehavior
!
static
fun
create
(
random
:
Random
!
)
:
NetworkBehavior
!
fun
createErrorResponse
(
)
:
Response
<
*
>
!
fun
delay
(
unit
:
TimeUnit
!
)
:
Long
fun
errorPercent
(
)
:
Int
fun
failureException
(
)
:
Throwable
!
fun
failurePercent
(
)
:
Int
fun
setDelay
(
amount
:
Long
,
unit
:
TimeUnit
!
)
:
Unit
fun
setErrorFactory
(
errorFactory
:
Callable
<
Response
<
*
>
!
>
!
)
:
Unit
fun
setErrorPercent
(
errorPercent
:
Int
)
:
Unit
fun
setFailureException
(
exception
:
Throwable
!
)
:
Unit
fun
setFailurePercent
(
failurePercent
:
Int
)
:
Unit
fun
setVariancePercent
(
variancePercent
:
Int
)
:
Unit
fun
variancePercent
(
)
:
Int