StubHandle

A lightweight public handle to a registered stub.

Provides read-only access to the stub's name and invocation count without exposing the internal Stub type.

Returned by BuildingStep.respondsWith and related methods, and by MokksyServer.getStub, MokksyServer.allStubs, and MokksyServer.findAllUnmatchedStubs.

Properties

Link copied to clipboard
val id: StubId

Stable unique identifier for this stub, generated at creation time.

Link copied to clipboard
val name: String?

The optional name assigned at stub registration, or null if unnamed.

Functions

Link copied to clipboard

How many times this stub has been matched so far.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns a VerificationBuilder for specifying the expected invocation count.

Convenience shortcut — asserts this stub was called exactly times times.