KMockRegistry

Thread-safe singleton registry storing all KMockHandler entries.

Functions

Link copied to clipboard

Removes all registered handlers.

Link copied to clipboard

Returns a list of registered routes for debugging.

Link copied to clipboard

Registers a single KMockHandler.

Link copied to clipboard
fun registerMany(vararg newHandlers: KMockHandler): KMockRegistry

Registers multiple KMockHandlers at once.

Link copied to clipboard
fun resolve(method: HttpMethod, path: String): Pair<KMockHandler, Map<String, String>>?

Finds the first handler matching method and path. Matches against a stable snapshot of the handlers list.