package mock
- Alphabetic
- By Inheritance
- mock
- BuildFromCompat
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type BuildFrom[-From, -A, +C] = scala.collection.BuildFrom[From, A, C]
- Definition Classes
- BuildFromCompat
- abstract class Capability[R <: Has[_], I, E, A] extends Base[R]
A
Capability[R, I, E, A]
represents a capability of environmentR
that takes an inputI
and returns an effect that may fail with an errorE
or produce a singleA
.A
Capability[R, I, E, A]
represents a capability of environmentR
that takes an inputI
and returns an effect that may fail with 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.- Attributes
- protected
- sealed abstract class Expectation[R <: Has[_]] extends AnyRef
An
Expectation[R]
is an immutable tree structure that represents expectations on environmentR
. - abstract class Mock[R <: Has[_]] extends AnyRef
A
Mock[R]
represents a mockable environmentR
. - abstract class Proxy extends AnyRef
A
Proxy
provides the machinery to map mocked invocations to predefined results and check some constraints on the way. - sealed abstract class Result[-I, +E, +A] extends AnyRef
A
Result[-I, +E, +A]
represents the value or failure that will be returned by mock expectation when invoked. - macro class mockable[A] extends Annotation with StaticAnnotation
- Annotations
- @compileTimeOnly("enable macro paradise to expand macro annotations")
Value Members
- object Capability
- object Expectation
- object Mock
- object MockClock extends Mock[Clock]
- object MockConsole extends Mock[Console]
- object MockRandom extends Mock[Random]
- object MockSystem extends Mock[System]
- object Result