Test

zio.test.TestSystem.Test
final case class Test(systemState: Atomic[Data]) extends TestSystem

Attributes

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

Members list

Type members

Inherited classlikes

trait UnsafeAPI extends Serializable

Attributes

Inherited from:
System
Source
System.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

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

Clears the mapping of environment variables.

Clears the mapping of environment variables.

Attributes

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

Clears the mapping of system properties.

Clears the mapping of system properties.

Attributes

Source
TestSystem.scala
def env(variable: => String)(implicit trace: Trace): IO[SecurityException, Option[String]]

Returns the specified environment variable if it exists.

Returns the specified environment variable if it exists.

Attributes

Source
TestSystem.scala
def envOrElse(variable: => String, alt: => String)(implicit trace: Trace): IO[SecurityException, String]

Returns the specified environment variable if it exists or else the specified fallback value.

Returns the specified environment variable if it exists or else the specified fallback value.

Attributes

Source
TestSystem.scala
def envOrOption(variable: => String, alt: => Option[String])(implicit trace: Trace): IO[SecurityException, Option[String]]

Returns the specified environment variable if it exists or else the specified optional fallback value.

Returns the specified environment variable if it exists or else the specified optional fallback value.

Attributes

Source
TestSystem.scala
def envs(implicit trace: Trace): ZIO[Any, SecurityException, Map[String, String]]

Attributes

Source
TestSystem.scala
def lineSeparator(implicit trace: Trace): UIO[String]

Returns the system line separator.

Returns the system line separator.

Attributes

Source
TestSystem.scala
def properties(implicit trace: Trace): ZIO[Any, Throwable, Map[String, String]]

Attributes

Source
TestSystem.scala
def property(prop: => String)(implicit trace: Trace): IO[Throwable, Option[String]]

Returns the specified system property if it exists.

Returns the specified system property if it exists.

Attributes

Source
TestSystem.scala
def propertyOrElse(prop: => String, alt: => String)(implicit trace: Trace): IO[Throwable, String]

Returns the specified system property if it exists or else the specified fallback value.

Returns the specified system property if it exists or else the specified fallback value.

Attributes

Source
TestSystem.scala
def propertyOrOption(prop: => String, alt: => Option[String])(implicit trace: Trace): IO[Throwable, Option[String]]

Returns the specified system property if it exists or else the specified optional fallback value.

Returns the specified system property if it exists or else the specified optional fallback value.

Attributes

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

Adds the specified name and value to the mapping of environment variables maintained by this TestSystem.

Adds the specified name and value to the mapping of environment variables maintained by this TestSystem.

Attributes

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

Adds the specified name and value to the mapping of system properties maintained by this TestSystem.

Adds the specified name and value to the mapping of system properties maintained by this TestSystem.

Attributes

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

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

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

Attributes

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

Sets the system line separator maintained by this TestSystem to the specified value.

Sets the system line separator maintained by this TestSystem to the specified value.

Attributes

Source
TestSystem.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

override val unsafe: UnsafeAPI

Attributes

Source
TestSystem.scala