Test

final case class Test(clockState: Ref[Data], live: Service, annotations: Service, warningState: RefM[WarningData], suspendedWarningState: RefM[SuspendedWarningData]) extends Service with Service
trait Product
trait Equals
trait Service
trait Service
class Object
trait Matchable
class Any

Value members

Concrete methods

def adjust(duration: Duration): UIO[Unit]

Increments the current clock time by the specified duration. Any effects that were scheduled to occur on or before the new time will be run in order.

Increments the current clock time by the specified duration. Any effects that were scheduled to occur on or before the new time will be run in order.

Returns the current clock time as an OffsetDateTime.

Returns the current clock time as an OffsetDateTime.

Returns the current clock time in the specified time unit.

Returns the current clock time in the specified time unit.

Sets the current clock time to the specified OffsetDateTime. Any effects that were scheduled to occur on or before the new time will be run in order.

Sets the current clock time to the specified OffsetDateTime. Any effects that were scheduled to occur on or before the new time will be run in order.

def setTime(duration: Duration): UIO[Unit]

Sets the current clock time to the specified time in terms of duration since the epoch. Any effects that were scheduled to occur on or before the new time will immediately be run in order.

Sets the current clock time to the specified time in terms of duration since the epoch. Any effects that were scheduled to occur on or before the new time will immediately be run in order.

def setTimeZone(zone: ZoneId): UIO[Unit]

Sets the time zone to the specified time zone. The clock time in terms of nanoseconds since the epoch will not be adjusted and no scheduled effects will be run as a result of this method.

Sets the time zone to the specified time zone. The clock time in terms of nanoseconds since the epoch will not be adjusted and no scheduled effects will be run as a result of this method.

def sleep(duration: Duration): UIO[Unit]

Semantically blocks the current fiber until the clock time is equal to or greater than the specified duration. Once the clock time is adjusted to on or after the duration, the fiber will automatically be resumed.

Semantically blocks the current fiber until the clock time is equal to or greater than the specified duration. Once the clock time is adjusted to on or after the duration, the fiber will automatically be resumed.

Returns a set of all fibers in this test.

Returns a set of all fibers in this test.

Inherited methods

Inherited from:
Service
Inherited from:
Product

Concrete fields

lazy val nanoTime: UIO[Long]

Returns the current clock time in nanoseconds.

Returns the current clock time in nanoseconds.

val save: UIO[UIO[Unit]]

Saves the TestClock's current state in an effect which, when run, will restore the TestClock state to the saved state

Saves the TestClock's current state in an effect which, when run, will restore the TestClock state to the saved state

lazy val sleeps: UIO[List[Duration]]

Returns a list of the times at which all queued effects are scheduled to resume.

Returns a list of the times at which all queued effects are scheduled to resume.

lazy val timeZone: UIO[ZoneId]

Returns the time zone.

Returns the time zone.