ScenarioCheck

scalus.testing.ScenarioCheck
object ScenarioCheck

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

inline def check(inline condition: Boolean, inline message: String = ...): Scenario[Unit]

Check a condition, failing the scenario if false.

Check a condition, failing the scenario if false.

This is an inline macro that captures:

  • The predicate expression as a string
  • Optional message
  • Source file and line

Usage:

async[Scenario] {
   Scenario.check(balance >= 0).await
   Scenario.check(owner != null, "owner must be set").await
}

Attributes