Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.Clock.nanoTime
    import Assertion.isGreaterThan
    
    object MyTest extends DefaultRunnableSpec {
      def spec = suite("clock")(
        test("time is non-zero") {
          for {
            time <- Live.live(nanoTime)
          } yield assertTrue(time >= 0)
        }
      )
    }
    Definition Classes
    zio
  • package mock
    Definition Classes
    test
  • package internal
    Definition Classes
    mock
  • Capability
  • Expectation
  • Mock
  • MockClock
  • MockConsole
  • MockRandom
  • MockSystem
  • Proxy
  • Result
  • mockable

abstract class Capability[R, I, E, A] extends Base[R]

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.

Attributes
protected
Self Type
Capability[R, I, E, A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Capability
  2. Base
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Capability(mock: Mock[R])(implicit arg0: zio.Tag[R], arg1: zio.Tag[I], arg2: zio.Tag[E], arg3: zio.Tag[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(returns: Result[I, E, A])(implicit ev: <:<[I, Unit]): Expectation[R]
  5. def apply(assertion: Assertion[I], result: Result[I, E, A])(implicit ev: =!=[I, Unit]): Expectation[R]
  6. def apply(assertion: Assertion[I])(implicit ev1: =!=[I, Unit], ev2: <:<[A, Unit]): Expectation[R]
  7. def apply()(implicit ev1: =:=[I, Unit], ev2: <:<[A, Unit]): Expectation[R]
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. val errorTag: zio.LightTypeTag
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. val id: UUID
    Definition Classes
    Base
  17. val inputTag: zio.LightTypeTag
  18. def isEqual[R0, I0, E0, A0](that: Capability[R0, I0, E0, A0]): Boolean
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. val mock: Mock[R]
    Definition Classes
    CapabilityBase
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. val outputTag: zio.LightTypeTag
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. val toString: String

    Render method fully qualified name.

    Render method fully qualified name.

    Definition Classes
    Base → AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Base[R]

Inherited from AnyRef

Inherited from Any

Ungrouped