org.specs2.matcher

AlwaysMatcher

case class AlwaysMatcher [T] () extends Matcher[T] with Product with Serializable

This matcher always matches any value of type T

Linear Supertypes
Serializable, Serializable, Product, Equals, Matcher[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. AlwaysMatcher
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Matcher
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AlwaysMatcher ()

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 ^^ [S] (f: (S) ⇒ Expectable[T], dummy: Int): Matcher[S]

    Adapt a matcher to another.

    Adapt a matcher to another. ex: be_==("message") ^^ (_.getMessage aka "trimmed") can be applied to an exception

    The dummy value is used to help to disambiguate with the overloaded ^^ function

    Definition Classes
    Matcher
  7. def ^^ [S] (f: (S) ⇒ T): Matcher[S]

    Adapt a matcher to another.

    Adapt a matcher to another. ex: be_==("message") ^^ (_.getMessage) can be applied to an exception

    Definition Classes
    Matcher
  8. def and [S <: T] (m: ⇒ Matcher[S]): Matcher[S]

    the logical and between 2 matchers

    the logical and between 2 matchers

    Definition Classes
    Matcher
    See also

    MatchResult.and

  9. def apply [S <: T] (e: Expectable[S]): MatchResult[S]

    apply this matcher to an Expectable

    apply this matcher to an Expectable

    returns

    a MatchResult describing the outcome of the match

    Definition Classes
    AlwaysMatcher → Matcher
  10. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  11. def atLeastOnce : Matcher[Traversable[T]]

    returns

    a Matcher matching at least one element of a sequence against the current matcher

    Definition Classes
    Matcher
  12. def canEqual (arg0: Any): Boolean

    Definition Classes
    AlwaysMatcher → Equals
  13. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def eq (arg0: AnyRef): Boolean

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

    Definition Classes
    AlwaysMatcher → Equals → AnyRef → Any
  16. def eventually (retries: Int, sleep: Duration): Matcher[T]

    returns

    a matcher that needs to eventually match, after a given number of retries and a sleep time

    Definition Classes
    Matcher
  17. def eventually : Matcher[T]

    returns

    a matcher that needs to eventually match, after 40 retries and a sleep time of 100 milliseconds

    Definition Classes
    Matcher
  18. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. def forall : Matcher[Traversable[T]]

    returns

    a Matcher matching all the elements of a sequence against the current matcher, stopping after the first failure

    Definition Classes
    Matcher
  20. def foreach : Matcher[Traversable[T]]

    returns

    a Matcher matching all the elements of a sequence against the current matcher, cumulating all failures

    Definition Classes
    Matcher
  21. def getClass (): java.lang.Class[_]

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

    Definition Classes
    AlwaysMatcher → AnyRef → Any
  23. def iff (b: Boolean, m: String = ""): Matcher[T]

    when the condition is true the matcher is applied, when it's false, the matcher must fail

    when the condition is true the matcher is applied, when it's false, the matcher must fail

    Definition Classes
    Matcher
  24. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  25. def lazily : Matcher[() ⇒ T]

    The lazily operator returns a Matcher which will match a function returning the expected value

    The lazily operator returns a Matcher which will match a function returning the expected value

    Definition Classes
    Matcher
  26. def mute : Matcher[T]

    returns

    a Matcher with no messages

    Definition Classes
    Matcher
  27. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  28. def not : Matcher[T]

    negate a Matcher

    negate a Matcher

    Definition Classes
    Matcher
    See also

    MatchResult.not

  29. def notify (): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef
  31. def or [S <: T] (m: ⇒ Matcher[S]): Matcher[S]

    the logical or between 2 matchers

    the logical or between 2 matchers

    Definition Classes
    Matcher
    See also

    MatchResult.or

  32. def orPending (m: String): Matcher[T]

    returns

    a Pending MatchResult if this matcher fails, prefixing the failure message with a pending message. If the pending message is empty, only the failure message is printed

    Definition Classes
    Matcher
  33. def orPending : Matcher[T]

    returns

    a Pending MatchResult if this matcher fails

    Definition Classes
    Matcher
  34. def orSkip (m: String): Matcher[T]

    returns

    a Skip MatchResult if this matcher fails, prefixing the failure message with a skip message. If the skip message is empty, only the failure message is printed

    Definition Classes
    Matcher
  35. def orSkip : Matcher[T]

    returns

    a Skip MatchResult if this matcher fails

    Definition Classes
    Matcher
  36. def productArity : Int

    Definition Classes
    AlwaysMatcher → Product
  37. def productElement (arg0: Int): Any

    Definition Classes
    AlwaysMatcher → Product
  38. def productIterator : Iterator[Any]

    Definition Classes
    Product
  39. def productPrefix : String

    Definition Classes
    AlwaysMatcher → Product
  40. def result [S <: T] (other: MatchResultMessage, value: Expectable[S]): MatchResult[S]

    returns

    a MatchResult using the messages embedded in a MatchResultMessage (i.e. an accumulation of messages from other matches)

    Attributes
    protected
    Definition Classes
    Matcher
  41. def result [S <: T] (other: org.specs2.matcher.MatchResult[_], value: Expectable[S]): MatchResult[S]

    returns

    a MatchResult copied on another one, but with a different expectable

    Attributes
    protected
    Definition Classes
    Matcher
  42. def result [S <: T] (test: ⇒ Boolean, okMessage: ⇒ String, koMessage: ⇒ String, value: Expectable[S], expected: String, actual: String): MatchResult[S]

    This convenience method can be used to evaluate a boolean condition and return an appropriate MatchResult

    This convenience method can be used to evaluate a boolean condition and return an appropriate MatchResult

    returns

    a MatchResult with an okMessage, a koMessage, the expectable value and the expected/actual values as string to display a failure comparison if necessary

    Attributes
    protected
    Definition Classes
    Matcher
  43. def result [S <: T] (test: ⇒ Boolean, okMessage: ⇒ String, koMessage: ⇒ String, value: Expectable[S]): MatchResult[S]

    This convenience method can be used to evaluate a boolean condition and return an appropriate MatchResult

    This convenience method can be used to evaluate a boolean condition and return an appropriate MatchResult

    returns

    a MatchResult with an okMessage, a koMessage and the expectable value

    Attributes
    protected
    Definition Classes
    Matcher
  44. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  45. def test : (T) ⇒ Boolean

    returns

    a test function corresponding to this matcher

    Definition Classes
    Matcher
  46. def toString (): String

    Definition Classes
    AlwaysMatcher → AnyRef → Any
  47. def unless (b: Boolean, m: String = ""): Matcher[T]

    only apply this matcher if the condition is false

    only apply this matcher if the condition is false

    Definition Classes
    Matcher
  48. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  51. def when (b: Boolean, m: String = ""): Matcher[T]

    only apply this matcher if the condition is true

    only apply this matcher if the condition is true

    Definition Classes
    Matcher

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Matcher[T]

Inherited from AnyRef

Inherited from Any