A Capability[R, I, E, A]
represents a capability of environment R
that takes an input I
and returns an effect that may fail with an error E
or produce a single A
.
A Capability[R, I, E, A]
represents a capability of environment R
that takes an input I
and returns an effect that may fail with an error E
or produce a single A
.
To represent polymorphic capabilities you must use one of lazy Capability.Poly
types which
allow you to delay the declaration of some types to call site.
To construct capability tags you should start by creating a Mock[R]
and extend publicly
available Effect
, Method
, Sink
or Stream
type members.
An Expectation[R]
is an immutable tree structure that represents
expectations on environment R
.
A Mock[R]
represents a mockable environment R
.
A Proxy
provides the machinery to map mocked invocations to predefined results
and check some constraints on the way.
A Result[-I, +E, +A]
represents the value or failure that will be returned
by mock expectation when invoked.