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
    
    object MyTest extends ZIOSpecDefault {
      def spec = suite("clock")(
        test("time is non-zero") {
          for {
            time <- Live.live(nanoTime)
          } yield assertTrue(time >= 0L)
        }
      )
    }
    Definition Classes
    zio
  • object TestConsole extends Serializable
    Definition Classes
    test
  • Data
  • Test

case class Test(consoleState: Atomic[Data], live: Live, annotations: Annotations, debugState: FiberRef[Boolean]) extends TestConsole with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Test
  2. Product
  3. Equals
  4. TestConsole
  5. Restorable
  6. Console
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Test(consoleState: Atomic[Data], live: Live, annotations: Annotations, debugState: FiberRef[Boolean])

Type Members

  1. trait UnsafeAPI extends AnyRef
    Definition Classes
    Console

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. val annotations: Annotations
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clearInput(implicit trace: Trace): UIO[Unit]

    Clears the contents of the input buffer.

    Clears the contents of the input buffer.

    Definition Classes
    TestTestConsole
  7. def clearOutput(implicit trace: Trace): UIO[Unit]

    Clears the contents of the output buffer.

    Clears the contents of the output buffer.

    Definition Classes
    TestTestConsole
  8. def clearOutputErr(implicit trace: Trace): UIO[Unit]

    Clears the contents of the output error buffer.

    Clears the contents of the output error buffer.

    Definition Classes
    TestTestConsole
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  10. val consoleState: Atomic[Data]
  11. def debug[R, E, A](zio: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]

    Runs the specified effect with the TestConsole set to debug mode, so that console output is rendered to standard output in addition to being written to the output buffer.

    Runs the specified effect with the TestConsole set to debug mode, so that console output is rendered to standard output in addition to being written to the output buffer.

    Definition Classes
    TestTestConsole
  12. val debugState: FiberRef[Boolean]
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def feedLines(lines: String*)(implicit trace: Trace): UIO[Unit]

    Writes the specified sequence of strings to the input buffer.

    Writes the specified sequence of strings to the input buffer. The first string in the sequence will be the first to be taken. These strings will be taken before any strings that were previously in the input buffer.

    Definition Classes
    TestTestConsole
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val live: Live
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. def output(implicit trace: Trace): UIO[Vector[String]]

    Returns the contents of the output buffer.

    Returns the contents of the output buffer. The first value written to the output buffer will be the first in the sequence.

    Definition Classes
    TestTestConsole
  22. def outputErr(implicit trace: Trace): UIO[Vector[String]]

    Returns the contents of the error output buffer.

    Returns the contents of the error output buffer. The first value written to the error output buffer will be the first in the sequence.

    Definition Classes
    TestTestConsole
  23. def print(line: => Any)(implicit trace: Trace): IO[IOException, Unit]

    Writes the specified string to the output buffer.

    Writes the specified string to the output buffer.

    Definition Classes
    TestConsole
  24. def printError(line: => Any)(implicit trace: Trace): IO[IOException, Unit]

    Writes the specified string to the error buffer.

    Writes the specified string to the error buffer.

    Definition Classes
    TestConsole
  25. def printLine(line: => Any)(implicit trace: Trace): IO[IOException, Unit]

    Writes the specified string to the output buffer followed by a newline character.

    Writes the specified string to the output buffer followed by a newline character.

    Definition Classes
    TestConsole
  26. def printLineError(line: => Any)(implicit trace: Trace): IO[IOException, Unit]

    Writes the specified string to the error buffer followed by a newline character.

    Writes the specified string to the error buffer followed by a newline character.

    Definition Classes
    TestConsole
  27. def productElementNames: Iterator[String]
    Definition Classes
    Product
  28. def readLine(implicit trace: Trace): IO[IOException, String]

    Takes the first value from the input buffer, if one exists, or else fails with an EOFException.

    Takes the first value from the input buffer, if one exists, or else fails with an EOFException.

    Definition Classes
    TestConsole
  29. def readLine(prompt: String)(implicit trace: Trace): IO[IOException, String]
    Definition Classes
    Console
  30. def save(implicit trace: Trace): UIO[UIO[Unit]]

    Saves the TestConsole's current state in an effect which, when run, will restore the TestConsole state to the saved state.

    Saves the TestConsole's current state in an effect which, when run, will restore the TestConsole state to the saved state.

    Definition Classes
    TestRestorable
  31. def silent[R, E, A](zio: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]

    Runs the specified effect with the TestConsole set to silent mode, so that console output is only written to the output buffer and not rendered to standard output.

    Runs the specified effect with the TestConsole set to silent mode, so that console output is only written to the output buffer and not rendered to standard output.

    Definition Classes
    TestTestConsole
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. val unsafe: UnsafeAPI
    Definition Classes
    TestConsole
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Product

Inherited from Equals

Inherited from TestConsole

Inherited from Restorable

Inherited from Console

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped