org.backuity.matchete

AssertionMatchers

Related Doc: package matchete

trait AssertionMatchers extends Matchers with AssertionFailureReporter with ToMatcherOps

Matchers that throw java.lang.AssertionError upon failure.

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

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 anyFormatter[T]: Formatter[T]

    print 'null' if the value is null

    print 'null' if the value is null

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

    Definition Classes
    AnyMatchers
  14. implicit def arrayFormatter[T]: Formatter[Array[T]]

    Definition Classes
    Formatters
  15. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    OrderedMatchers
  32. def clone(): AnyRef

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

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

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

    Definition Classes
    TraversableMatchers
  36. 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
  37. 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
  38. final def eq(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef → Any
  41. def fail(msg: String): Nothing

  42. final def failIf(expr: Boolean, msg: ⇒ String): Unit

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

    Definition Classes
    FailureReporter
  44. implicit val failureReporter: FailureReporter

    Definition Classes
    FailureReporter
  45. def finalize(): Unit

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

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

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

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

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

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

    Definition Classes
    Any
  52. 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
  53. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  57. 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
  58. def partialFunctionMatcher[T](description: String)(pf: PartialFunction[T, Unit])(implicit formatter: Formatter[T]): Matcher[T]

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

    Definition Classes
    CoreMatcherSupport
  60. implicit def setComparator[T](implicit elemFormatter: Formatter[T], setFormatter: Formatter[Set[T]]): MatcherComparator[Set[T]]

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

    Definition Classes
    StringMatchers
  62. implicit def stringComparator(implicit formatter: Formatter[String]): MatcherComparator[String]

    Definition Classes
    AnyMatchers
  63. implicit val stringFormatter: Formatter[String]

    Definition Classes
    Formatters
  64. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  65. 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
  66. 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
  67. implicit def toDeltaBuilder[T](t: T)(implicit arg0: Numeric[T]): DeltaBuilder[T]

    Definition Classes
    NumericMatchers
  68. def toString(): String

    Definition Classes
    AnyRef → Any
  69. implicit def traversableFormatter[T](implicit formatter: Formatter[T]): Formatter[Traversable[T]]

    Definition Classes
    Formatters
  70. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AssertionFailureReporter

Inherited from Matchers

Inherited from AnyMatchers

Inherited from BooleanMatchers

Inherited from NumericMatchers

Inherited from OrderedMatchers

Inherited from TraversableMatchers

Inherited from StringMatchers

Inherited from CoreMatcherSupport

Inherited from ToMatcherOps

Inherited from Formatters

Inherited from FailureReporter

Inherited from ExceptionMatchers

Inherited from AnyRef

Inherited from Any

Ungrouped