org.backuity.matchete

MatcherSupport

Related Doc: package matchete

trait MatcherSupport extends CoreMatcherSupport with Matchers

Helper to build matchers. Provides core matchers.

See also

org.backuity.matchete.Matchers

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatcherSupport
  2. Matchers
  3. AnyMatchers
  4. BooleanMatchers
  5. NumericMatchers
  6. OrderedMatchers
  7. TraversableMatchers
  8. StringMatchers
  9. ExceptionMatchers
  10. CoreMatcherSupport
  11. ToMatcherOps
  12. FailureReporter
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def fail(msg: String): Nothing

    Definition Classes
    FailureReporter

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. implicit def SizedArray[T]: Sized[Array[T]]

    Definition Classes
    AnyMatchers
  5. implicit val SizedString: Sized[String]

    Definition Classes
    AnyMatchers
  6. implicit def SizedStructural[T <: AnyRef { def size: Int }]: Sized[T]

    Definition Classes
    AnyMatchers
  7. implicit def ToMatcherOpsFromAny[T](t: ⇒ T): MatcherOps[T]

    Definition Classes
    ToMatcherOps
  8. def a[T](implicit arg0: Manifest[T]): Matcher[Any]

    Definition Classes
    AnyMatchers
  9. def a[T](description: String)(pf: PartialFunction[T, Unit])(implicit arg0: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  10. def an[T](description: String)(pf: PartialFunction[T, Unit])(implicit arg0: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  11. implicit def anyComparator[T](implicit formatter: Formatter[T], diffable: Diffable[T]): MatcherComparator[T]

    Definition Classes
    AnyMatchers
  12. implicit def arrayComparator[T](implicit arrayFormatter: Formatter[Array[T]]): MatcherComparator[Array[T]]

    Definition Classes
    AnyMatchers
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def be[T](m: Matcher[T]): EagerMatcher[T]

    Definition Classes
    CoreMatcherSupport
  15. def be[T](description: String)(pf: PartialFunction[T, Unit])(implicit arg0: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  16. def beA[T](implicit arg0: Manifest[T]): Matcher[Any]

    Definition Classes
    AnyMatchers
  17. def beCloseTo[T](delta: Delta[T]): Matcher[T]

    Definition Classes
    NumericMatchers
  18. def beEmpty[T](implicit ev1: (T) ⇒ AnyRef { def isEmpty: Boolean }, formatter: Formatter[T]): Matcher[T]

    Definition Classes
    AnyMatchers
  19. def beEq[T <: AnyRef](expected: T)(implicit formatter: Formatter[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  20. def beEqualTo[T](expected: T)(implicit arg0: Formatter[T], arg1: MatcherComparator[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  21. def beFalse: Matcher[Boolean]

    Definition Classes
    BooleanMatchers
  22. def beLike[T](description: String)(pf: PartialFunction[T, Unit])(implicit arg0: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  23. def beNull[T <: AnyRef](implicit formatter: Formatter[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  24. def beTrue: Matcher[Boolean]

    Definition Classes
    BooleanMatchers
  25. def be_<[O](max: O)(implicit arg0: Ordering[O], arg1: Formatter[O]): Matcher[O]

    Definition Classes
    OrderedMatchers
  26. def be_<=[O](max: O)(implicit arg0: Ordering[O], arg1: Formatter[O]): Matcher[O]

    Definition Classes
    OrderedMatchers
  27. def be_==[T](expected: T)(implicit arg0: Formatter[T], arg1: MatcherComparator[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  28. def be_>[O](min: O)(implicit arg0: Ordering[O], arg1: Formatter[O]): Matcher[O]

    Definition Classes
    OrderedMatchers
  29. def be_>=[O](min: O)(implicit arg0: Ordering[O], arg1: Formatter[O]): Matcher[O]

    Definition Classes
    OrderedMatchers
  30. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def contain[T](matchers: Matcher[T]*): EagerMatcher[TraversableOnce[T]]

    Valid if all the matchers are contained.

    Valid if all the matchers are contained.

    Definition Classes
    TraversableMatchers
    Note

    an element might satisfy multiple matchers, it is the caller responsibility to not pass overlapping matchers

  32. def contain(substring: String)(implicit formatter: Formatter[String]): Matcher[String]

    Definition Classes
    StringMatchers
  33. def containAny[T](matchers: Matcher[T]*): EagerMatcher[TraversableOnce[T]]

    Definition Classes
    TraversableMatchers
  34. def containElements[T](others: T*)(implicit formatter: Formatter[T]): EagerMatcher[TraversableOnce[T]]

    order does not matter and elements might be duplicated

    order does not matter and elements might be duplicated

    Definition Classes
    TraversableMatchers
  35. def containExactly[T](matchers: Matcher[T]*): EagerMatcher[TraversableOnce[T]] { def checkAMatcherForEveryElement(elems: Traversable[T],failPrefix: String): Unit }

    Valid if the sizes match and there is

    Valid if the sizes match and there is

    • for each element a satisfied matcher
    • for each matcher an element satisfying it

    Things like these are therefore accepted:

    3 elements: e1, e2, e3
    3 matchers: m1, m2, m3
    
    e1 matches m1
    e2 matches m1
    e3 matches m2, m3

    It is the caller responsibility to not pass overlapping matchers.

    Definition Classes
    TraversableMatchers
  36. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. def equalTo[T](expected: T)(implicit arg0: Formatter[T], arg1: MatcherComparator[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  38. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  39. final def failIf(expr: Boolean, msg: ⇒ String): Unit

    Definition Classes
    FailureReporter
  40. def failIfDifferentStrings(actual: String, expected: String, msg: String): Unit

    Definition Classes
    FailureReporter
  41. implicit val failureReporter: FailureReporter

    Definition Classes
    FailureReporter
  42. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  43. def forAll[T](m: Matcher[T]): EagerMatcher[TraversableOnce[T]]

    Definition Classes
    TraversableMatchers
  44. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  46. def have[T](description: String)(pf: PartialFunction[T, Unit])(implicit arg0: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  47. def haveSize[T](size: Int)(implicit sized: Sized[T], formatter: Formatter[T]): EagerMatcher[T]

    Definition Classes
    AnyMatchers
  48. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  49. def matcher[T](description: String, validate: (T) ⇒ Boolean, failureDescription: (T) ⇒ String, nullMessage: String = ""): Matcher[T]

    A non-null matcher.

    A non-null matcher.

    description

    should be the same as the matcher name, for instance haveSize(0) should be "have size 0"

    validate

    function that returns true if the value matches the expectation

    failureDescription

    called upon failure, return the message thrown

    Definition Classes
    CoreMatcherSupport
  50. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  51. def not[T](matcher: Matcher[T])(implicit formatter: Formatter[T], manifest: Manifest[T]): Matcher[T]

    Definition Classes
    AnyMatchers
  52. final def notify(): Unit

    Definition Classes
    AnyRef
  53. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  54. def nullAcceptingMatcher[T](description: String, validate: (T) ⇒ Boolean, failureDescription: (T) ⇒ String): Matcher[T]

    A null accepting matcher.

    A null accepting matcher.

    description

    should be the same as the matcher name, for instance haveSize(0) should be "have size 0"

    validate

    function that returns true if the value matches the expectation

    failureDescription

    called upon failure, return the message thrown

    Definition Classes
    CoreMatcherSupport
  55. def partialFunctionMatcher[T](description: String)(pf: PartialFunction[T, Unit])(implicit formatter: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  56. def partialFunctionMatcher[T](description: String, descriptionNegation: String)(pf: PartialFunction[T, Unit])(implicit formatter: Formatter[T]): Matcher[T]

    Definition Classes
    CoreMatcherSupport
  57. def startWith(prefix: String)(implicit formatter: Formatter[String]): Matcher[String]

    Definition Classes
    StringMatchers
  58. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  59. def throwA[T <: Throwable](implicit arg0: Manifest[T]): ThrowMatcher[T] { ... /* 6 definitions in type refinement */ }

    fail if the thrown exception isn't a T or a T subclass

    fail if the thrown exception isn't a T or a T subclass

    Definition Classes
    ExceptionMatchers
  60. def throwAn[T <: Throwable](implicit arg0: Manifest[T]): ThrowMatcher[T] { ... /* 6 definitions in type refinement */ }

    fail if the thrown exception isn't a T or a T subclass

    fail if the thrown exception isn't a T or a T subclass

    Definition Classes
    ExceptionMatchers
  61. implicit def toDeltaBuilder[T](t: T)(implicit arg0: Numeric[T]): DeltaBuilder[T]

    Definition Classes
    NumericMatchers
  62. def toString(): String

    Definition Classes
    AnyRef → Any
  63. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Matchers

Inherited from AnyMatchers

Inherited from BooleanMatchers

Inherited from NumericMatchers

Inherited from OrderedMatchers

Inherited from TraversableMatchers

Inherited from StringMatchers

Inherited from ExceptionMatchers

Inherited from CoreMatcherSupport

Inherited from ToMatcherOps

Inherited from FailureReporter

Inherited from AnyRef

Inherited from Any

Ungrouped