A variant of flatMap that ignores the value returned by this expectation.
Returns an expectation that models the execution of this expectation,
followed by passing of its value to the specified continuation function k,
followed by the expectation that it returns.
Returns an expectation that models the execution of this expectation,
followed by passing of its value to the specified continuation function k,
followed by the expectation that it returns.
{{ val mockClock = (MockClock.sleep(equalTo(1.second)) returns unit).flatMap(_ => MockClock.nanoTime returns value(5L)) }}
Converts this Expectation to ZManaged mock environment.
Returns empty expectation.
Returns empty expectation.
This is required for the for-comprehension syntax.
A named alias for *>
An
Expectation[-M, +E, +A]is an immutable data structure that represents expectations on moduleMcapabilities.This structure is a monad, because we need the sequential composability and in Scala we get the convenient for-comprehension syntax for free.
Emptymodels expectation for no calls, the monadicunitvalueCallmodels a call onMmodules capability that takes argumentsIand returns an effect that may fail with an errorEor produce a singleAFlatMapmodels sequential composition of expectationsThe whole structure is not supposed to be consumed directly by the end user, instead it should be converted into a mocked environment (wrapped in Managed) either explicitly via
managedEnvmethod or via implicit conversion.