Class

org.specs2.matcher

ContainWithResult

Related Doc: package matcher

Permalink

case class ContainWithResult[T](check: ValueCheck[T], timesMin: Option[Times] = Some(1.times), timesMax: Option[Times] = None, checkAll: Boolean = true) extends Matcher[Traversable[T]] with Product with Serializable

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

Instance Constructors

  1. new ContainWithResult(check: ValueCheck[T], timesMin: Option[Times] = Some(1.times), timesMax: Option[Times] = None, checkAll: Boolean = true)

    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 ^^[S](f: (S) ⇒ Expectable[Traversable[T]], 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
  5. def ^^[S](f: (S) ⇒ Traversable[T]): 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
  6. def and[S <: Traversable[T]](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

  7. def apply[S <: Traversable[T]](t: 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
    ContainWithResultMatcher
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def atLeast(n: Int): ContainWithResult[T]

    Permalink
  10. def atLeast(times: Times): ContainWithResult[T]

    Permalink
  11. def atLeastOnce: ContainWithResult[T]

    Permalink
  12. def atMost(n: Int): ContainWithResult[T]

    Permalink
  13. def atMost(times: Times): ContainWithResult[T]

    Permalink
  14. def atMostOnce: ContainWithResult[T]

    Permalink
  15. def between(min: Int, max: Int): ContainWithResult[T]

    Permalink
  16. def between(min: Times, max: Times): ContainWithResult[T]

    Permalink
  17. val check: ValueCheck[T]

    Permalink
  18. val checkAll: Boolean

    Permalink
  19. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  21. def eventually(retries: Int, sleep: (Int) ⇒ Duration): Matcher[Traversable[T]]

    Permalink

    sleep

    the function applied on the retry number (first is 1)

    returns

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

    aResult mustEqual(expected).eventually(retries = 2, _ * 100.milliseconds)
    Definition Classes
    Matcher
  22. def eventually(retries: Int, sleep: Duration): Matcher[Traversable[T]]

    Permalink

    returns

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

    Definition Classes
    Matcher
  23. def eventually: Matcher[Traversable[T]]

    Permalink

    returns

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

    Definition Classes
    Matcher
  24. def exactly(n: Int): ContainWithResult[T]

    Permalink
  25. def exactly(times: Times): ContainWithResult[T]

    Permalink
  26. def failure[S <: Traversable[T]](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
  27. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def forall: ContainWithResult[T]

    Permalink
  29. def foreach: ContainWithResult[T]

    Permalink
  30. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  33. def lazily: Matcher[() ⇒ Traversable[T]]

    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
  34. def mute: Matcher[Traversable[T]]

    Permalink

    returns

    a Matcher with no messages

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

    Permalink
    Definition Classes
    AnyRef
  36. def not: Matcher[Traversable[T]]

    Permalink

    negate a Matcher

    negate a Matcher

    Definition Classes
    Matcher
    See also

    MatchResult.not

  37. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  39. def or[S <: Traversable[T]](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

  40. def orPending(message: (String) ⇒ String): Matcher[Traversable[T]]

    Permalink

    returns

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

    Definition Classes
    Matcher
  41. def orPending(m: String): Matcher[Traversable[T]]

    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
  42. def orPending: Matcher[Traversable[T]]

    Permalink

    returns

    a Pending MatchResult if this matcher fails

    Definition Classes
    Matcher
  43. def orSkip(message: (String) ⇒ String): Matcher[Traversable[T]]

    Permalink

    returns

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

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

    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
  45. def orSkip: Matcher[Traversable[T]]

    Permalink

    returns

    a Skip MatchResult if this matcher fails

    Definition Classes
    Matcher
  46. def result[S <: Traversable[T]](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
  47. def result[S <: Traversable[T]](other: Result, value: Expectable[S]): MatchResult[S]

    Permalink

    returns

    a Match Result from another result

    Attributes
    protected
    Definition Classes
    Matcher
  48. def result[S <: Traversable[T]](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
  49. def result[S <: Traversable[T]](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
  50. def result[S <: Traversable[T]](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
  51. def result[S <: Traversable[T]](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
  52. def result[S <: Traversable[T]](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
  53. def setMessage(message: String): Matcher[Traversable[T]]

    Permalink

    returns

    set a new failure message of a matcher

    Definition Classes
    Matcher
  54. def success[S <: Traversable[T]](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
  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  56. def test: (Traversable[T]) ⇒ Boolean

    Permalink

    returns

    a test function corresponding to this matcher

    Definition Classes
    Matcher
  57. val timesMax: Option[Times]

    Permalink
  58. val timesMin: Option[Times]

    Permalink
  59. def unless(b: Boolean, m: String = ""): Matcher[Traversable[T]]

    Permalink

    only apply this matcher if the condition is false

    only apply this matcher if the condition is false

    Definition Classes
    Matcher
  60. def updateMessage(f: (String) ⇒ String): Matcher[Traversable[T]]

    Permalink

    returns

    update the failure message of a matcher

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

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

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

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

    Permalink

    only apply this matcher if the condition is true

    only apply this matcher if the condition is true

    Definition Classes
    Matcher

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Matcher[Traversable[T]]

Inherited from AnyRef

Inherited from Any

Ungrouped