Packages

trait TestSystem extends System with Restorable

TestSystem supports deterministic testing of effects involving system properties. Internally, TestSystem maintains mappings of environment variables and system properties that can be set and accessed. No actual environment variables or system properties will be accessed or set as a result of these actions.

import zio.system
import zio.test.TestSystem

for {
  _      <- TestSystem.putProperty("java.vm.name", "VM")
  result <- system.property("java.vm.name")
} yield result == Some("VM")
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestSystem
  2. Restorable
  3. System
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait UnsafeAPI extends Serializable
    Definition Classes
    System

Abstract Value Members

  1. abstract def clearEnv(variable: String)(implicit trace: Trace): UIO[Unit]
  2. abstract def clearProperty(prop: String)(implicit trace: Trace): UIO[Unit]
  3. abstract def env(variable: => String)(implicit trace: Trace): IO[SecurityException, Option[String]]
    Definition Classes
    System
  4. abstract def envOrElse(variable: => String, alt: => String)(implicit trace: Trace): IO[SecurityException, String]
    Definition Classes
    System
  5. abstract def envOrOption(variable: => String, alt: => Option[String])(implicit trace: Trace): IO[SecurityException, Option[String]]
    Definition Classes
    System
  6. abstract def envs(implicit trace: Trace): IO[SecurityException, Map[String, String]]
    Definition Classes
    System
  7. abstract def lineSeparator(implicit trace: Trace): UIO[String]
    Definition Classes
    System
  8. abstract def properties(implicit trace: Trace): IO[Throwable, Map[String, String]]
    Definition Classes
    System
  9. abstract def property(prop: => String)(implicit trace: Trace): IO[Throwable, Option[String]]
    Definition Classes
    System
  10. abstract def propertyOrElse(prop: => String, alt: => String)(implicit trace: Trace): IO[Throwable, String]
    Definition Classes
    System
  11. abstract def propertyOrOption(prop: => String, alt: => Option[String])(implicit trace: Trace): IO[Throwable, Option[String]]
    Definition Classes
    System
  12. abstract def putEnv(name: String, value: String)(implicit trace: Trace): UIO[Unit]
  13. abstract def putProperty(name: String, value: String)(implicit trace: Trace): UIO[Unit]
  14. abstract def save(implicit trace: Trace): UIO[UIO[Unit]]
    Definition Classes
    Restorable
  15. abstract def setLineSeparator(lineSep: String)(implicit trace: Trace): UIO[Unit]

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. def unsafe: UnsafeAPI
    Definition Classes
    System
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

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 Restorable

Inherited from System

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped