Trait/Object

org.scalatest.enablers

Messaging

Related Docs: object Messaging | package enablers

Permalink

trait Messaging[T] extends AnyRef

Supertrait for Messaging typeclasses.

Trait Messaging is a typeclass trait for objects that can be queried for message. Objects of type T for which an implicit Messaging[T] is available can be used with the should have message syntax. You can enable the have message matcher syntax on your own type U by defining a Messaging[U] for the type and making it available implicitly.

ScalaTest provides an implicit Messaging instance for java.lang.Throwable and arbitary object with message(), message, getMessage() or getMessage method in the Messaging companion object.

Source
Messaging.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Messaging
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def messageOf(obj: T): String

    Permalink

    Returns the message of the passed object.

    Returns the message of the passed object.

    obj

    object whose message to return

    returns

    the message of the passed object