Trait/Object

zio.test.mock

Expectation

Related Docs: object Expectation | package mock

Permalink

sealed trait Expectation[R <: Has[_]] extends AnyRef

An Expectation[R] is an immutable tree structure that represents expectations on environment R.

Self Type
Expectation[R]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Expectation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &&[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Operator alias for and.

  4. def ++[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Operator alias for andThen.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def and[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Compose two expectations, producing a new expectation to satisfy both.

    Compose two expectations, producing a new expectation to satisfy both.

    {{ val mockEnv = (MockClock.sleep(equalTo(1.second)) returns unit) and (MockConsole.getStrLn returns value("foo")) }}

  7. def andThen[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Compose two expectations, producing a new expectation to satisfy both sequentially.

    Compose two expectations, producing a new expectation to satisfy both sequentially.

    {{ val mockEnv = (MockClock.sleep(equalTo(1.second)) returns unit) andThen (MockConsole.getStrLn returns value("foo")) }}

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def atLeast(min: Int): Expectation[R]

    Permalink

    Repeated this expectation producing a new expectation to satisfy the itself sequentially at least given number of times.

  10. def atMost(max: Int): Expectation[R]

    Permalink

    Repeated this expectation producing a new expectation to satisfy the itself sequentially at most given number of times.

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  21. def or[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Compose two expectations, producing a new expectation to satisfy one of them.

    Compose two expectations, producing a new expectation to satisfy one of them.

    {{ val mockEnv = (MockClock.sleep(equalTo(1.second)) returns unit) or (MockConsole.getStrLn returns value("foo")) }}

  22. def repeats(range: Range): Expectation[R]

    Permalink

    Repeates this expectation withing given bounds, producing a new expectation to satisfy the itself sequentially given number of times.

    Repeates this expectation withing given bounds, producing a new expectation to satisfy the itself sequentially given number of times.

    {{ val mockEnv = (MockClock.sleep(equalTo(1.second)) returns unit).repeats(1, 5) }}

    NOTE: once another repetition starts executing, it must be completed in order to satisfy the composite expectation. For example (A ++ B).repeats(1, 2) will be satisfied by either A->B (one repetition) or A->B->A->B (two repetitions), but will fail on A->B->A (incomplete second repetition).

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

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def ||[R0 <: Has[_]](that: Expectation[R0])(implicit tag: zio.Tagged[R with R0]): Expectation[R with R0]

    Permalink

    Operator alias for or.

Inherited from AnyRef

Inherited from Any

Ungrouped