Class

org.specs2.matcher

BeEqualTo

Related Doc: package matcher

Permalink

class BeEqualTo extends EqualityMatcher[Any]

Equality Matcher

Linear Supertypes
EqualityMatcher[Any], AdaptableMatcher[Any], Matcher[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BeEqualTo
  2. EqualityMatcher
  3. AdaptableMatcher
  4. Matcher
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BeEqualTo(t: ⇒ Any)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ^^(f: (Any) ⇒ Any): AdaptableMatcher[Any]

    Permalink

    Adapts a matcher by changing the actual value before doing the match ex: be_==("message") ^^ (_.trim) will do the comparison on a trimmed String before match

    Adapts a matcher by changing the actual value before doing the match ex: be_==("message") ^^ (_.trim) will do the comparison on a trimmed String before match

    Definition Classes
    AdaptableMatcher
  5. def ^^[S](f: (S) ⇒ Expectable[Any], dummy: Int = 0): Matcher[S]

    Permalink

    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
  6. def ^^[S](f: (S) ⇒ Any): Matcher[S]

    Permalink

    Adapt a matcher to another.

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

    Definition Classes
    Matcher
  7. def ^^^(f: (Any) ⇒ Any, ok: (String) ⇒ String = identity, ko: (String) ⇒ String = identity): AdaptableMatcher[Any]

    Permalink

    Adapt a matcher with both the expected and actual values ex: be_==("message") ^^^ (_.trim) will do the comparison on both trimmed strings

    Adapt a matcher with both the expected and actual values ex: be_==("message") ^^^ (_.trim) will do the comparison on both trimmed strings

    Definition Classes
    AdaptableMatcher
  8. def adapt(f: (Any) ⇒ Any, okFunction: (String) ⇒ String, koFunction: (String) ⇒ String): EqualityMatcher[Any]

    Permalink

    returns

    a matcher changing its expected value and possibly adding more information to the ok and ko messages

    Definition Classes
    EqualityMatcherAdaptableMatcher
  9. def and[S <: Any](m: ⇒ Matcher[S]): Matcher[S]

    Permalink

    the logical and between 2 matchers

    the logical and between 2 matchers

    Definition Classes
    Matcher
    See also

    MatchResult.and

  10. def apply[S <: Any](b: Expectable[S]): MatchResult[S]

    Permalink

    apply this matcher to an Expectable

    apply this matcher to an Expectable

    returns

    a MatchResult describing the outcome of the match

    Definition Classes
    EqualityMatcherMatcher
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def eventually(retries: Int, sleep: Duration): Matcher[Any]

    Permalink

    returns

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

    Definition Classes
    Matcher
  16. def eventually: Matcher[Any]

    Permalink

    returns

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

    Definition Classes
    Matcher
  17. def expected: Any

    Permalink
    Definition Classes
    EqualityMatcher
  18. def failure[S <: Any](message: ⇒ String, value: Expectable[S]): MatchResult[S]

    Permalink

    This method can be used to create a failed match result

    This method can be used to create a failed match result

    Attributes
    protected
    Definition Classes
    Matcher
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def iff(b: Boolean): Matcher[Any]

    Permalink

    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
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. val ko: (String) ⇒ String

    Permalink
    Attributes
    protected
    Definition Classes
    EqualityMatcher
  25. def lazily: Matcher[() ⇒ Any]

    Permalink

    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[Any]

    Permalink

    returns

    a Matcher with no messages

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

    Permalink
    Definition Classes
    AnyRef
  28. def not: Matcher[Any]

    Permalink

    negate a Matcher

    negate a Matcher

    Definition Classes
    Matcher
    See also

    MatchResult.not

  29. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  31. val ok: (String) ⇒ String

    Permalink
    Attributes
    protected
    Definition Classes
    EqualityMatcher
  32. def or[S <: Any](m: ⇒ Matcher[S]): Matcher[S]

    Permalink

    the logical or between 2 matchers

    the logical or between 2 matchers

    Definition Classes
    Matcher
    See also

    MatchResult.or

  33. def orPending(message: (String) ⇒ String): Matcher[Any]

    Permalink

    returns

    a Pending MatchResult if this matcher fails, modifying the failure message with a pending message.

    Definition Classes
    Matcher
  34. def orPending(m: String): Matcher[Any]

    Permalink

    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
  35. def orPending: Matcher[Any]

    Permalink

    returns

    a Pending MatchResult if this matcher fails

    Definition Classes
    Matcher
  36. def orSkip(message: (String) ⇒ String): Matcher[Any]

    Permalink

    returns

    a Skip MatchResult if this matcher fails, modifying the failure message with a skip message.

    Definition Classes
    Matcher
  37. def orSkip(m: String): Matcher[Any]

    Permalink

    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
  38. def orSkip: Matcher[Any]

    Permalink

    returns

    a Skip MatchResult if this matcher fails

    Definition Classes
    Matcher
  39. def result[S <: Any](other: MatchResultMessages.MatchResultMessage, value: Expectable[S]): MatchResult[S]

    Permalink

    returns

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

    Attributes
    protected
    Definition Classes
    Matcher
  40. def result[S <: Any](other: Result, value: Expectable[S]): MatchResult[S]

    Permalink

    returns

    a Match Result from another result

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

    Permalink

    returns

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

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

    Permalink

    returns

    a MatchResult with an okMessage, a koMessage, the expectable value and details about the failure if any

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

    Permalink

    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
  44. def result[S <: Any](triplet: ⇒ (Boolean, String, String), value: Expectable[S]): MatchResult[S]

    Permalink

    returns

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

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

    Permalink

    returns

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

    Attributes
    protected
    Definition Classes
    Matcher
  46. def setMessage(message: String): Matcher[Any]

    Permalink

    returns

    set a new failure message of a matcher

    Definition Classes
    Matcher
  47. def success[S <: Any](message: ⇒ String, value: Expectable[S]): MatchResult[S]

    Permalink

    This method can be used to create a successful match result

    This method can be used to create a successful match result

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

    Permalink
    Definition Classes
    AnyRef
  49. def test: (Any) ⇒ Boolean

    Permalink

    returns

    a test function corresponding to this matcher

    Definition Classes
    Matcher
  50. def toString(): String

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

    Permalink

    only apply this matcher if the condition is false

    only apply this matcher if the condition is false

    Definition Classes
    Matcher
  52. def updateMessage(f: (String) ⇒ String): Matcher[Any]

    Permalink

    returns

    update the failure message of a matcher

    Definition Classes
    Matcher
  53. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def when(b: Boolean, m: String = ""): Matcher[Any]

    Permalink

    only apply this matcher if the condition is true

    only apply this matcher if the condition is true

    Definition Classes
    Matcher

Inherited from EqualityMatcher[Any]

Inherited from AdaptableMatcher[Any]

Inherited from Matcher[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped