Asserting

class Asserting[F[_], A](self: F[A])

Provides various ways to make test assertions on an F[A].

Provides various ways to make test assertions on an F[A].

class Object
trait Matchable
class Any

Value members

Concrete methods

def assertNoException(F: Functor[F]): F[Assertion]

Asserts that the F[A] completes with an A and no exception is thrown.

Asserts that the F[A] completes with an A and no exception is thrown.

def assertThrows[E <: Throwable](F: Sync[F], ct: ClassTag[E]): F[Assertion]

Asserts that the F[A] fails with an exception of type E.

Asserts that the F[A] fails with an exception of type E.

def asserting(f: A => Assertion)(F: Sync[F]): F[Assertion]

Asserts that the F[A] completes with an A which passes the supplied function.

Asserts that the F[A] completes with an A which passes the supplied function.

Example
IO(1).asserting(_ shouldBe 1)