Assertion

final class Assertion[-A] extends AssertionM[A] with (=> A) => AssertResult

An Assertion[A] is capable of producing assertion results on an A. As a proposition, assertions compose using logical conjunction and disjunction, and can be negated.

Companion:
object
trait (=> A) => AssertResult
class AssertionM[A]
class Object
trait Matchable
class Any

Value members

Concrete methods

def &&[A1 <: A](that: => Assertion[A1]): Assertion[A1]

Returns a new assertion that succeeds only if both assertions succeed.

Returns a new assertion that succeeds only if both assertions succeed.

override def ??(string: String): Assertion[A]

A symbolic alias for label.

A symbolic alias for label.

Definition Classes
def apply(a: => A): AssertResult

Evaluates the assertion with the specified value.

Evaluates the assertion with the specified value.

override def canEqual(that: AssertionM[_]): Boolean
Definition Classes
override def equals(that: Any): Boolean
Definition Classes
AssertionM -> Any
override def hashCode: Int
Definition Classes
AssertionM -> Any
override def label(string: String): Assertion[A]

Labels this assertion with the specified string.

Labels this assertion with the specified string.

Definition Classes
override def negate: Assertion[A]

Returns the negation of this assertion.

Returns the negation of this assertion.

Definition Classes
def runM: (=> A) => AssertResultM
def test(a: A): Boolean

Tests the assertion to see if it would succeed on the given element.

Tests the assertion to see if it would succeed on the given element.

override def toString: String

Provides a meaningful string rendering of the assertion.

Provides a meaningful string rendering of the assertion.

Definition Classes
def ||[A1 <: A](that: => Assertion[A1]): Assertion[A1]

Returns a new assertion that succeeds if either assertion succeeds.

Returns a new assertion that succeeds if either assertion succeeds.

Inherited methods

def &&[A1 <: A](that: => AssertionM[A1]): AssertionM[A1]

Returns a new assertion that succeeds only if both assertions succeed.

Returns a new assertion that succeeds only if both assertions succeed.

Inherited from:
AssertionM
def andThen[A](g: AssertResult => A): (=> A) => A
Inherited from:
Function1
def compose[A](g: A => => A): A => AssertResult
Inherited from:
Function1
def ||[A1 <: A](that: => AssertionM[A1]): AssertionM[A1]

Returns a new assertion that succeeds if either assertion succeeds.

Returns a new assertion that succeeds if either assertion succeeds.

Inherited from:
AssertionM

Concrete fields

val run: (=> A) => AssertResult