org.specs2.matcher

MatchersImplicits

trait MatchersImplicits extends Expectations

This trait provides implicit definitions from MatchResults and Booleans to Results.

It also allows to:

- create matchers from functions - create matchers for seqs and sets from single matchers

Linear Supertypes
Expectations, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MatchersImplicits
  2. Expectations
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqual [T] extends AnyRef

  2. class Descriptible [T] extends AnyRef

  3. class MatchResultFunctionVerification [U, T] extends AnyRef

  4. class MatcherFunction [S, T] extends AnyRef

  5. class MatcherFunction2 [T] extends AnyRef

  6. class SeqMatcher [S, T] extends Matcher[Seq[T]]

    The SeqMatcher class is a matcher matching a sequence of objects with a matcher returned by a function.

  7. class SetMatcher [S, T] extends Matcher[Set[T]]

    The SetMatcher class is a matcher matching a set of objects with a matcher returned by a function.

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. implicit def asResult [T] (r: MatchResult[T]): Result

    implicit definition to transform any MatchResult to a Result

    implicit definition to transform any MatchResult to a Result

    Attributes
    implicit
  8. def atLeastOnce [T, U] (values: GenTraversable[T])(f: (T) ⇒ MatchResult[U]): MatchResult[Seq[T]]

    verify the function f for at least one value

  9. def atLeastOnceWhen [T, U] (values: GenTraversable[T])(f: PartialFunction[T, MatchResult[U]]): MatchResult[Seq[T]]

    verify the function f for at least one value, where the PartialFunction is defined

  10. implicit def canBeEqual [T] (t: ⇒ T): CanBeEqual[T]

    A value can be tested against another with the === operator.

    A value can be tested against another with the === operator. It is equivalent to writting a must_== b

    Attributes
    implicit
    Definition Classes
    Expectations
  11. def checkFailure [T] (m: MatchResult[T]): MatchResult[T]

    this method can be overriden to throw exceptions when checking the match result

    this method can be overriden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    Expectations
  12. def checkResultFailure (r: Result): Result

    this method can be overriden to throw exceptions when checking the result

    this method can be overriden to throw exceptions when checking the result

    Attributes
    protected
    Definition Classes
    Expectations
  13. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def createExpectable [T] (t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    Expectations
  15. def createExpectable [T] (t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    Expectations
  16. def createExpectable [T] (t: ⇒ T, alias: String): Expectable[T]

    returns

    an Expectable with a description

    Definition Classes
    Expectations
  17. def createExpectable [T] (t: ⇒ T): Expectable[T]

    returns

    an Expectable

    Definition Classes
    Expectations
  18. implicit def describe [T] (t: ⇒ T): Descriptible[T]

    describe a value with the aka method

    describe a value with the aka method

    Attributes
    implicit
    Definition Classes
    Expectations
  19. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  20. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  21. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def forall [T, U] (values: GenTraversable[T])(f: (T) ⇒ MatchResult[U]): MatchResult[Seq[T]]

    verify the function f for all the values, stopping after the first failure

  23. def forallWhen [T, U] (values: GenTraversable[T])(f: PartialFunction[T, MatchResult[U]]): MatchResult[Seq[T]]

    verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined

  24. def foreach [T, U] (values: GenTraversable[T])(f: (T) ⇒ MatchResult[U]): MatchResult[Seq[T]]

    verify the function f for all the values, and collect all failures

  25. def foreachWhen [T, U] (values: GenTraversable[T])(f: PartialFunction[T, MatchResult[U]]): MatchResult[Seq[T]]

    verify the function f for all the values, and collect all failures, where the PartialFunction is defined

  26. implicit def fromMatchResult (r: ⇒ org.specs2.matcher.MatchResult[_]): Boolean

    implicit definition to accept any MatchResult as a Boolean value.

    implicit definition to accept any MatchResult as a Boolean value. It is true if the MatchResult is not an Error or a Failure

    Attributes
    implicit
  27. implicit def functionAndKoMessageToMatcher [T] (f: ((T) ⇒ Boolean, (T) ⇒ String)): Matcher[T]

    This method transform a function to a Matcher

    This method transform a function to a Matcher

    Attributes
    implicit
  28. implicit def functionAndMessagesToMatcher [T] (f: ((T) ⇒ Boolean, (T) ⇒ String, (T) ⇒ String)): Matcher[T]

    This method transform a function, with function descriptors to a Matcher

    This method transform a function, with function descriptors to a Matcher

    Attributes
    implicit
  29. implicit def functionToMatcher [T] (f: ((T) ⇒ Boolean, String)): Matcher[T]

    This method transform a function to a Matcher

    This method transform a function to a Matcher

    Attributes
    implicit
  30. implicit def functionToMatcher2 [T] (f: ((T) ⇒ Boolean, String, String)): Matcher[T]

    This method transform a function to a Matcher

    This method transform a function to a Matcher

    Attributes
    implicit
  31. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  32. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  33. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  34. implicit def matchResultFunctionToMatcher [T] (f: (T) ⇒ org.specs2.matcher.MatchResult[_]): Matcher[T]

    This method transform a function returning a MatchResult to a Matcher

    This method transform a function returning a MatchResult to a Matcher

    Attributes
    implicit
  35. implicit def matcherFunction [S, T] (f: (S) ⇒ Matcher[T]): MatcherFunction[S, T]

    Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers

    Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers

    Attributes
    implicit
  36. implicit def matcherFunction2 [T] (f: (T) ⇒ Matcher[T]): MatcherFunction2[T]

    Attributes
    implicit
  37. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  38. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  39. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  40. implicit def pairFunctionToMatcher [T] (f: (T) ⇒ (Boolean, String)): Matcher[T]

    This method transform a function returning a pair (Boolean, String for ko message) to a Matcher

    This method transform a function returning a pair (Boolean, String for ko message) to a Matcher

    Attributes
    implicit
  41. implicit def seqToResult [T] (r: Seq[MatchResult[T]]): Result

    implicit definition to transform a Seq of MatchResults to a Result

    implicit definition to transform a Seq of MatchResults to a Result

    Attributes
    implicit
  42. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  43. implicit def toResult (b: Boolean): Result

    implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

    implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

    Attributes
    implicit
  44. def toString (): String

    Definition Classes
    AnyRef → Any
  45. implicit def tripletFunctionToMatcher [T] (f: (T) ⇒ (Boolean, String, String)): Matcher[T]

    This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher

    This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher

    Attributes
    implicit
  46. implicit def verifyFunction [U, T] (t: (U) ⇒ MatchResult[T]): MatchResultFunctionVerification[U, T]

    Attributes
    implicit
  47. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  48. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  49. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Expectations

Inherited from AnyRef

Inherited from Any