trait WheneverAsserting[T] extends AnyRef
Supertrait for WheneverAsserting
typeclasses, which are used to implement and determine the result
type of Whenever's whenever
method.
Currently, an Whenever expression will have result type Assertion
, if the function passed has result type Assertion
,
else it will have result type Unit
.
- Source
- WheneverAsserting.scala
- Alphabetic
- By Inheritance
- WheneverAsserting
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
abstract
type
Result
The result type of the
whenever
method.The result type of the
whenever
method.
Abstract Value Members
-
abstract
def
whenever(condition: Boolean)(fun: ⇒ T): Result
Implementation method for Whenever's
whenever
syntax.Implementation method for Whenever's
whenever
syntax.- condition
the boolean condition that determines whether
whenever
will evaluate thefun
function (condition
is true) or throwsDiscardedEvaluationException
(condition
is false)- fun
the function to evaluate if the specified
condition
is true