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

Abstract Value Members

  1. abstract def clearEnv(variable: String)(implicit trace: ZTraceElement): UIO[Unit]
  2. abstract def clearProperty(prop: String)(implicit trace: ZTraceElement): UIO[Unit]
  3. abstract def env(variable: => String)(implicit trace: ZTraceElement): IO[SecurityException, Option[String]]
    Definition Classes
    System
  4. abstract def envOrElse(variable: => String, alt: => String)(implicit trace: ZTraceElement): IO[SecurityException, String]
    Definition Classes
    System
  5. abstract def envOrOption(variable: => String, alt: => Option[String])(implicit trace: ZTraceElement): IO[SecurityException, Option[String]]
    Definition Classes
    System
  6. abstract def envs(implicit trace: ZTraceElement): IO[SecurityException, Map[String, String]]
    Definition Classes
    System
  7. abstract def lineSeparator(implicit trace: ZTraceElement): UIO[String]
    Definition Classes
    System
  8. abstract def properties(implicit trace: ZTraceElement): IO[Throwable, Map[String, String]]
    Definition Classes
    System
  9. abstract def property(prop: => String)(implicit trace: ZTraceElement): IO[Throwable, Option[String]]
    Definition Classes
    System
  10. abstract def propertyOrElse(prop: => String, alt: => String)(implicit trace: ZTraceElement): IO[Throwable, String]
    Definition Classes
    System
  11. abstract def propertyOrOption(prop: => String, alt: => Option[String])(implicit trace: ZTraceElement): IO[Throwable, Option[String]]
    Definition Classes
    System
  12. abstract def putEnv(name: String, value: String)(implicit trace: ZTraceElement): UIO[Unit]
  13. abstract def putProperty(name: String, value: String)(implicit trace: ZTraceElement): UIO[Unit]
  14. abstract def save(implicit trace: ZTraceElement): UIO[UIO[Unit]]
    Definition Classes
    Restorable
  15. abstract def setLineSeparator(lineSep: String)(implicit trace: ZTraceElement): 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. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  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()

Inherited from Restorable

Inherited from System

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped