org.backuity.matchete

AssertionMatchers

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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. implicit def SizedArray[T]: Sized[Array[T]]

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

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

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

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

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

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

    Definition Classes
    CoreMatcherSupport
  13. implicit def anyComparator[T](implicit formatter: Formatter[T]): MatcherComparator[T]

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

    print 'null' if the value is null

    print 'null' if the value is null

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

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

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

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

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

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

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

    Definition Classes
    NumericMatchers
  22. def beEmpty[T](implicit arg0: (T) ⇒ Any { def isEmpty: Boolean }, formatter: Formatter[T]): Matcher[T]

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    OrderedMatchers
  34. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def contain[T](matchers: Matcher[T]*): EagerMatcher[Traversable[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

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

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

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

    order does not matter and elements might be duplicated

    order does not matter and elements might be duplicated

    Definition Classes
    TraversableMatchers
  39. def containExactly[T](matchers: Matcher[T]*): EagerMatcher[Traversable[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
  40. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Definition Classes
    FailureReporter
  46. implicit val failureReporter: FailureReporter

    Definition Classes
    FailureReporter
  47. def finalize(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    CoreMatcherSupport
  62. implicit def seqComparator[T](implicit elemFormatter: Formatter[T], seqFormatter: Formatter[Seq[T]]): MatcherComparator[Seq[T]]

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

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

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

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

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

    Definition Classes
    AnyRef
  68. def throwA[T <: Throwable](implicit arg0: Manifest[T]): ThrowMatcher[T] { ... /* 3 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
  69. def throwAn[T <: Throwable](implicit arg0: Manifest[T]): ThrowMatcher[T] { ... /* 3 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
  70. implicit def toDeltaBuilder[T](t: T)(implicit arg0: Numeric[T]): DeltaBuilder[T]

    Definition Classes
    NumericMatchers
  71. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. 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