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, CanBeEqual, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MatchersImplicits
  2. Expectations
  3. CanBeEqual
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation [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): CanBeEqualExpectation[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 writing a must_== b

    Attributes
    implicit
    Definition Classes
    CanBeEqual
  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. def createExpectableWithShowAs [T] (t: ⇒ T, showAs: ⇒ String): Expectable[T]

    returns

    an Expectable with a function to show the element T

    Definition Classes
    Expectations
  19. 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
  20. def eq (arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. 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

  24. 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

  25. 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

  26. 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

  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. def getClass (): java.lang.Class[_]

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

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

    Attributes
    final
    Definition Classes
    Any
  35. 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
  36. def matchResultToResult [T] (m: MatchResult[T]): Result

    this method can be overriden to intercept the transformation of a MatchResult to a Result

    this method can be overriden to intercept the transformation of a MatchResult to a Result

    Attributes
    protected
    Definition Classes
    Expectations
  37. 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
  38. implicit def matcherFunction2 [T] (f: (T) ⇒ Matcher[T]): MatcherFunction2[T]

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  42. 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
  43. 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
  44. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  45. 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
  46. def toString (): String

    Definition Classes
    AnyRef → Any
  47. 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
  48. implicit def verifyFunction [U, T] (t: (U) ⇒ MatchResult[T]): MatchResultFunctionVerification[U, T]

    Attributes
    implicit
  49. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Expectations

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any