on

fun on(match: RequestMatch, vararg steps: Step): FakeHttpTransport(source)

Adds a stub: requests match accepts are answered by steps, in order, the last repeating. A stub added later wins over an earlier one that also matches.

Return

this transport, for chaining.

Parameters

match

the requests the stub answers.

steps

the script; at least one.

Throws