A Capability[R, I, E, A]
represents a capability of environment R
that takes an input I
and returns an effect that may fail witn an error E
or produce a single A
.
An Expectation[R]
is an immutable tree structure that represents
expectations on environment R
.
A Mock[R]
represents a mockable environenment 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.
A
Capability[R, I, E, A]
represents a capability of environmentR
that takes an inputI
and returns an effect that may fail witn an errorE
or produce a singleA
.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 availableEffect
,Method
,Sink
orStream
type members.