TestSystem

zio.test.TestSystem
See theTestSystem companion trait
object TestSystem extends Serializable

Attributes

Companion
trait
Source
TestSystem.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
TestSystem.type

Members list

Type members

Classlikes

final case class Data(properties: Map[String, String] = ..., envs: Map[String, String] = ..., lineSeparator: String = ...)

The state of the TestSystem.

The state of the TestSystem.

Attributes

Source
TestSystem.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Test(systemState: Atomic[Data]) extends TestSystem

Attributes

Source
TestSystem.scala
Supertypes
trait Product
trait Equals
trait TestSystem
trait Restorable
trait System
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def clearEnv(variable: => String)(implicit trace: Trace): UIO[Unit]

Accesses a TestSystem instance in the environment and clears the mapping of environment variables.

Accesses a TestSystem instance in the environment and clears the mapping of environment variables.

Attributes

Source
TestSystem.scala
def clearProperty(prop: => String)(implicit trace: Trace): UIO[Unit]

Accesses a TestSystem instance in the environment and clears the mapping of system properties.

Accesses a TestSystem instance in the environment and clears the mapping of system properties.

Attributes

Source
TestSystem.scala
def live(data: Data): Layer[Nothing, TestSystem]

Constructs a new TestSystem with the specified initial state. This can be useful for providing the required environment to an effect that requires a Console, such as with ZIO#provide.

Constructs a new TestSystem with the specified initial state. This can be useful for providing the required environment to an effect that requires a Console, such as with ZIO#provide.

Attributes

Source
TestSystem.scala
def putEnv(name: => String, value: => String)(implicit trace: Trace): UIO[Unit]

Accesses a TestSystem instance in the environment and adds the specified name and value to the mapping of environment variables.

Accesses a TestSystem instance in the environment and adds the specified name and value to the mapping of environment variables.

Attributes

Source
TestSystem.scala
def putProperty(name: => String, value: => String)(implicit trace: Trace): UIO[Unit]

Accesses a TestSystem instance in the environment and adds the specified name and value to the mapping of system properties.

Accesses a TestSystem instance in the environment and adds the specified name and value to the mapping of system properties.

Attributes

Source
TestSystem.scala
def save(implicit trace: Trace): UIO[UIO[Unit]]

Accesses a TestSystem instance in the environment and saves the system state in an effect which, when run, will restore the TestSystem to the saved state

Accesses a TestSystem instance in the environment and saves the system state in an effect which, when run, will restore the TestSystem to the saved state

Attributes

Source
TestSystem.scala
def setLineSeparator(lineSep: => String)(implicit trace: Trace): UIO[Unit]

Accesses a TestSystem instance in the environment and sets the line separator to the specified value.

Accesses a TestSystem instance in the environment and sets the line separator to the specified value.

Attributes

Source
TestSystem.scala

Concrete fields

The default initial state of the TestSystem with no environment variable or system property mappings and the system line separator set to the new line character.

The default initial state of the TestSystem with no environment variable or system property mappings and the system line separator set to the new line character.

Attributes

Source
TestSystem.scala
val any: ZLayer[TestSystem, Nothing, TestSystem]

Attributes

Source
TestSystem.scala
val default: Layer[Nothing, TestSystem]

Attributes

Source
TestSystem.scala

Implicits

Implicits

implicit val tag: Tag[TestSystem]

Attributes

Source
TestSystem.scala