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")
- Alphabetic
- By Inheritance
- TestSystem
- Restorable
- System
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def clearEnv(variable: String)(implicit trace: Trace): UIO[Unit]
- abstract def clearProperty(prop: String)(implicit trace: Trace): UIO[Unit]
- abstract def env(variable: => String)(implicit trace: Trace): IO[SecurityException, Option[String]]
- Definition Classes
- System
- abstract def envOrElse(variable: => String, alt: => String)(implicit trace: Trace): IO[SecurityException, String]
- Definition Classes
- System
- abstract def envOrOption(variable: => String, alt: => Option[String])(implicit trace: Trace): IO[SecurityException, Option[String]]
- Definition Classes
- System
- abstract def envs(implicit trace: Trace): IO[SecurityException, Map[String, String]]
- Definition Classes
- System
- abstract def lineSeparator(implicit trace: Trace): UIO[String]
- Definition Classes
- System
- abstract def properties(implicit trace: Trace): IO[Throwable, Map[String, String]]
- Definition Classes
- System
- abstract def property(prop: => String)(implicit trace: Trace): IO[Throwable, Option[String]]
- Definition Classes
- System
- abstract def propertyOrElse(prop: => String, alt: => String)(implicit trace: Trace): IO[Throwable, String]
- Definition Classes
- System
- abstract def propertyOrOption(prop: => String, alt: => Option[String])(implicit trace: Trace): IO[Throwable, Option[String]]
- Definition Classes
- System
- abstract def putEnv(name: String, value: String)(implicit trace: Trace): UIO[Unit]
- abstract def putProperty(name: String, value: String)(implicit trace: Trace): UIO[Unit]
- abstract def save(implicit trace: Trace): UIO[UIO[Unit]]
- Definition Classes
- Restorable
- abstract def setLineSeparator(lineSep: String)(implicit trace: Trace): UIO[Unit]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unsafe: UnsafeAPI
- Definition Classes
- System
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()