Package

zio.test

mock

Permalink

package mock

Visibility
  1. Public
  2. All

Type Members

  1. abstract class Capability[R <: Has[_], I, E, A] extends Base[R]

    Permalink

    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.

    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.

    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.

    Attributes
    protected
  2. sealed abstract class Expectation[R <: Has[_]] extends AnyRef

    Permalink

    An Expectation[R] is an immutable tree structure that represents expectations on environment R.

  3. abstract class Mock[R <: Has[_]] extends AnyRef

    Permalink

    A Mock[R] represents a mockable environenment R.

  4. trait Proxy extends AnyRef

    Permalink

    A Proxy provides the machinery to map mocked invocations to predefined results and check some constraints on the way.

  5. sealed trait Result[-I, +E, +A] extends AnyRef

    Permalink

    A Result[-I, +E, +A] represents the value or failure that will be returned by mock expectation when invoked.

  6. macro class mockable[A] extends Annotation with StaticAnnotation

    Permalink
    Annotations
    @compileTimeOnly( ... )

Value Members

  1. object Capability

    Permalink
  2. object Expectation

    Permalink
  3. object Mock

    Permalink
  4. object MockClock extends Mock[Clock]

    Permalink
  5. object MockConsole extends Mock[Console]

    Permalink
  6. object MockRandom extends Mock[Random]

    Permalink
  7. object MockSystem extends Mock[System]

    Permalink
  8. object Result

    Permalink
  9. package internal

    Permalink

Ungrouped