toggle menu
DHIS2 Android SDK
1.11.1
androidJvm
switch theme
search in API
DHIS2 Android SDK
/
org.hisp.dhis.android.core.mockwebserver
/
Dhis2MockServer
Dhis2Mock
Server
class
Dhis2MockServer
(
fileReader
:
IFileReader
,
port
:
Int
)
Members
Constructors
Dhis2Mock
Server
Link copied to clipboard
constructor
(
port
:
Int
)
constructor
(
fileReader
:
IFileReader
,
port
:
Int
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
base
Endpoint
Link copied to clipboard
val
baseEndpoint
:
String
Functions
add
Response
Link copied to clipboard
fun
addResponse
(
method
:
String
,
path
:
String
,
responseName
:
String
,
responseCode
:
Int
,
contentType
:
String
=
CONTENT_TYPE_JSON
)
enqueue
Login
Responses
Link copied to clipboard
fun
enqueueLoginResponses
(
)
enqueue
Metadata
Responses
Link copied to clipboard
fun
enqueueMetadataResponses
(
)
enqueue
Mock
Response
Link copied to clipboard
@
JvmOverloads
fun
enqueueMockResponse
(
code
:
Int
=
OK_CODE
)
fun
enqueueMockResponse
(
fileName
:
String
)
fun
enqueueMockResponse
(
code
:
Int
,
fileName
:
String
)
fun
enqueueMockResponse
(
fileName
:
String
,
dateHeader
:
Date
)
enqueue
Mock
Response
Text
Link copied to clipboard
fun
enqueueMockResponseText
(
code
:
Int
,
response
:
String
?
)
enqueue
Mock
Response
With
Empty
Body
Link copied to clipboard
fun
enqueueMockResponseWithEmptyBody
(
code
:
Int
)
enqueue
System
Info
Response
Link copied to clipboard
fun
enqueueSystemInfoResponse
(
)
set
Dhis2Dispatcher
Link copied to clipboard
fun
setDhis2Dispatcher
(
)
set
Request
Dispatcher
Link copied to clipboard
fun
setRequestDispatcher
(
)
shutdown
Link copied to clipboard
fun
shutdown
(
)
take
Request
Link copied to clipboard
fun
takeRequest
(
)
:
RecordedRequest