Trait/Object

org.scalatest.enablers

WheneverAsserting

Related Docs: object WheneverAsserting | package enablers

Permalink

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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WheneverAsserting
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Result

    Permalink

    The result type of the whenever method.

    The result type of the whenever method.

Abstract Value Members

  1. abstract def whenever(condition: Boolean)(fun: ⇒ T): Result

    Permalink

    Implementation method for Whenever's whenever syntax.

    Implementation method for Whenever's whenever syntax.

    condition

    the boolean condition that determines whether whenever will evaluate the fun function (condition is true) or throws DiscardedEvaluationException (condition is false)

    fun

    the function to evaluate if the specified condition is true