MockServiceExtension

open class MockServiceExtension(project: Project)

Extension for configuring the mock service.

Constructors

Link copied to clipboard
constructor(project: Project)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var port: Int

The port the mock service shall listen upon.

Functions

Link copied to clipboard
fun routes(action: JavalinDefaultRoutingApi.() -> Unit)

Lets the user configure routes for the mock service.

Link copied to clipboard
fun start()

Starts the mock service. Fails if the service is already running.

Link copied to clipboard
fun stop()

Stops the mock service. Fails if the service is not running.

Link copied to clipboard
fun wrapTasks(name: String, vararg names: String)

Wraps tasks (selected by name) in such a way that the mock service is started before them, and stopped after them.