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 {
      suite("clock") {
        testM("time is non-zero") {
          assertM(nanoTime, isGreaterThan(0))
        }
      }
    }
    Definition Classes
    zio
  • package mock
    Definition Classes
    test
  • Expectation
  • Method
  • Mock
  • MockClock
  • MockConsole
  • MockException
  • MockRandom
  • MockSpec
  • MockSystem
  • Mockable

sealed trait MockSpec[-R, +E, +A] extends AnyRef

Self Type
MockSpec[R, E, A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MockSpec
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def &&&[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, (A, B)]

    Sequentially zips this specification with another, combining the results into a tuple.

  4. final def *>[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, B]

    A variant of flatMap that ignores the value produced by this mock specification.

  5. final def <*[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, A]

    Sequences the given mock specification after this specification, but ignores the value produced by the it.

  6. final def <*>[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, (A, B)]

    Alias for &&&.

  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def >>=[R1 <: R, E1 >: E, B](k: (A) => MockSpec[R1, E1, B]): MockSpec[R1, E1, B]

    Alias for flatMap.

    Alias for flatMap.

    val mockSpec = MockSpec.expectOut_(Console.Service.GetStrLn)("foo") >>= { input => MockSpec.expectIn(Console.Service.PutStrLn)(equalTo(input)) }
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def flatMap[R1 <: R, E1 >: E, B](k: (A) => MockSpec[R1, E1, B]): MockSpec[R1, E1, B]

    Returns a mock specification that models the expectations for execution of mock, followed by the passing of its value to the specified continuation function k, followed by the specification that it returns.

    Returns a mock specification that models the expectations for execution of mock, followed by the passing of its value to the specified continuation function k, followed by the specification that it returns.

    val mockSpec = MockSpec.expectOut_(Console.Service.GetStrLn)("foo").flatMap(input => MockSpec.expectIn(Console.Service.PutStrLn)(equalTo(input)))
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def managedEnv[R1 <: R](implicit mockable: Mockable[R1]): Managed[Nothing, R1]

    Creates a mock service for this specification and lifts it into ZManaged.

  19. final def map[B](f: (A) => B): MockSpec[R, E, B]

    Returns a mock specification whose success is mapped by the specified f function.

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def zip[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, (A, B)]

    A named alias for &&& or <*>.

  29. final def zipLeft[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, A]

    A named alias for <*.

  30. final def zipRight[R1 <: R, E1 >: E, B](that: => MockSpec[R1, E1, B]): MockSpec[R1, E1, B]

    A named alias for *>.

Inherited from AnyRef

Inherited from Any

Ungrouped