sealed abstract class Expectation[R <: Has[_]] extends AnyRef
An Expectation[R]
is an immutable tree structure that represents
expectations on environment R
.
- Self Type
- Expectation[R]
- Alphabetic
- By Inheritance
- Expectation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&&[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
Operator alias for
and
. -
def
++[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
Operator alias for
andThen
. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
and[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
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)) and MockConsole.getStrLn(value("foo"))
-
def
andThen[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
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)) andThen MockConsole.getStrLn(value("foo"))
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
atLeast(min: Int): Expectation[R]
Lower-bounded variant of
repeated
, produces a new expectation to satisfy itself sequentially at least given number of times. -
def
atMost(max: Int): Expectation[R]
Upper-bounded variant of
repeated
, produces a new expectation to satisfy itself sequentially at most given number of times. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exactly(times: Int): Expectation[R]
Produces a new expectation to satisfy itself exactly the given number of times.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
optional: Expectation[R]
Alias for
atMost(1)
, produces a new expectation to satisfy itself at most once. -
def
or[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
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)) or MockConsole.getStrLn(value("foo"))
-
def
repeats(range: Range): Expectation[R]
Repeats this expectation withing given bounds, producing a new expectation to satisfy itself sequentially given number of times.
Repeats this expectation withing given bounds, producing a new expectation to satisfy itself sequentially given number of times.
val mockEnv = MockClock.sleep(equalTo(1.second)).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).
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
thrice: Expectation[R]
Alias for
exactly(3)
, produces a new expectation to satisfy itself exactly three times. -
def
toLayer: ULayer[R]
Converts this expectation to ZLayer.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
twice: Expectation[R]
Alias for
exactly(2)
, produces a new expectation to satisfy itself exactly two times. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
||[R0 <: Has[_]](that: Expectation[R0])(implicit arg0: zio.Tag[R0]): Expectation[R with R0]
Operator alias for
or
.