Object/Trait

zio.test

TestClock

Related Docs: trait TestClock | package test

Permalink

object TestClock extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestClock
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class Data(duration: zio.Duration, sleeps: List[(zio.Duration, Promise[Nothing, Unit])], timeZone: ZoneId) extends Product with Serializable

    Permalink

    Data represents the state of the TestClock, including the clock time and time zone.

  2. final case class Sleep(duration: zio.Duration, promise: Promise[Nothing, Unit], fiberId: FiberId) extends Product with Serializable

    Permalink

    Sleep represents the state of a scheduled effect, including the time the effect is scheduled to run, a promise that can be completed to resume execution of the effect, and the fiber executing the effect.

  3. sealed abstract class SuspendedWarningData extends AnyRef

    Permalink
  4. final case class Test(clockState: Atomic[Data], live: Live, annotations: Annotations, warningState: Synchronized[WarningData], suspendedWarningState: Synchronized[SuspendedWarningData]) extends Clock with TestClock with TestClockPlatformSpecific with Product with Serializable

    Permalink
  5. sealed abstract class WarningData extends AnyRef

    Permalink

    WarningData describes the state of the warning message that is displayed if a test is using time by is not advancing the TestClock.

    WarningData describes the state of the warning message that is displayed if a test is using time by is not advancing the TestClock. The possible states are Start if a test has not used time, Pending if a test has used time but has not adjusted the TestClock, and Done if a test has adjusted the TestClock or the warning message has already been displayed.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object SuspendedWarningData

    Permalink
  5. object WarningData

    Permalink
  6. def adjust(duration: ⇒ zio.Duration)(implicit trace: Trace): UIO[Unit]

    Permalink

    Accesses a TestClock instance in the environment and increments the time by the specified duration, running any actions scheduled for on or before the new time in order.

  7. def adjustWith[R, E, A](duration: ⇒ zio.Duration)(zio: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]

    Permalink
  8. val any: ZLayer[TestClock, Nothing, TestClock]

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val default: ZLayer[Live with Annotations, Nothing, TestClock]

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def live(data: Data)(implicit trace: Trace): ZLayer[Annotations with Live, Nothing, TestClock]

    Permalink

    Constructs a new Test object that implements the TestClock interface.

    Constructs a new Test object that implements the TestClock interface. This can be useful for mixing in with implementations of other interfaces.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def save(implicit trace: Trace): UIO[UIO[Unit]]

    Permalink

    Accesses a TestClock instance in the environment and saves the clock state in an effect which, when run, will restore the TestClock to the saved state.

  23. def setDateTime(dateTime: ⇒ OffsetDateTime)(implicit trace: Trace): UIO[Unit]

    Permalink

    Accesses a TestClock instance in the environment and sets the clock time to the specified OffsetDateTime, running any actions scheduled for on or before the new time in order.

  24. def setTime(duration: ⇒ zio.Duration)(implicit trace: Trace): UIO[Unit]

    Permalink

    Accesses a TestClock instance in the environment and sets the clock time to the specified time in terms of duration since the epoch, running any actions scheduled for on or before the new time in order.

  25. def setTimeZone(zone: ⇒ ZoneId)(implicit trace: Trace): UIO[Unit]

    Permalink

    Accesses a TestClock instance in the environment, setting the time zone to the specified time zone.

    Accesses a TestClock instance in the environment, setting the time zone to the specified time zone. The clock time in terms of nanoseconds since the epoch will not be altered and no scheduled actions will be run as a result of this effect.

  26. def sleeps(implicit trace: Trace): UIO[List[zio.Duration]]

    Permalink

    Accesses a TestClock instance in the environment and returns a list of times that effects are scheduled to run.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def timeZone(implicit trace: Trace): UIO[ZoneId]

    Permalink

    Accesses a TestClock instance in the environment and returns the current time zone.

  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped