WebserviceMockServer

class WebserviceMockServer(androidContext: Context, val port: Int = DEFAULT_PORT)

Runs an HTTP server on port after start is called.

Delegates HTTP requests to one of the registered WebserviceMock instances based on the request URI prefix.

See also

Constructors

Link copied to clipboard
fun WebserviceMockServer(androidContext: Context, port: Int = DEFAULT_PORT)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface WebserviceMockServerEventListener : TraceEventListener

Properties

Link copied to clipboard
val port: Int

Functions

Link copied to clipboard
fun getLastCapturedResponseTimestampMs(mockFilter: (WebserviceMock) -> Boolean): Long?
Link copied to clipboard
fun registerWebserviceMock(webserviceMockConfig: WebserviceMockConfig, testDescription: String)

Registers a WebserviceMock instance.

Link copied to clipboard
fun start()

Starts the HTTP server.

Link copied to clipboard
fun stop()

Stops the HTTP server.