mock<T> method

MockBuilder<T> mock<T>(
  1. Capsule<T> capsule
)

Creates a MockBuilder for this MockableContainer and the supplied capsule.

See also: MockBuilder.apply

Implementation

// NOTE: this returns a MockBuilder to get around a type system annoyance:
// `mock((use) => 123, (use) => false)` raises no analysis warnings/errors
MockBuilder<T> mock<T>(Capsule<T> capsule) => MockBuilder._(this, capsule);