org.specs2

matcher

package matcher

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. matcher
  2. ReturnsSyntax
  3. ExpectationsCreation
  4. MatchResultStackTrace
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait ActionMatchers extends ValueChecks

    Matchers for Action values

  2. trait AdaptableMatcher[T] extends Matcher[T]

    Inherit this trait to provide a Matcher where both the actual and the expected values can be adapted with a function.

  3. case class AlwaysMatcher[T]() extends Matcher[T] with Product with Serializable

    This matcher always matches any value of type T

  4. class AndMatch[T] extends MatchResult[T]

  5. class AndNotMatch[T] extends MatchResult[T]

  6. trait AnyBeHaveMatchers extends BeHaveMatchers

    This trait allows to write expressions like

  7. trait AnyMatchers extends AnyBaseMatchers with AnyBeHaveMatchers

    This trait provides matchers which are applicable to any type of value

  8. class BeCloseTo[T] extends Matcher[T]

  9. class BeEqualTo extends EqualityMatcher[Any]

    Equality Matcher

  10. case class BeEqualTypedValueCheck[T](expected: T)(implicit evidence$4: Diffable[T]) extends ValueCheck[T] with Product with Serializable

    ValueCheck for a typed expected value.

  11. case class BeEqualValueCheck[T](expected: Any) extends ValueCheck[T] with Product with Serializable

    ValueCheck for an untyped expected value.

  12. class BeLessThan[T] extends Matcher[T]

  13. class BeLessThanOrEqualTo[T] extends Matcher[T]

  14. class BeMatching extends Matcher[String]

    Attributes
    protected[org.specs2]
  15. class BeMatchingPattern extends BeMatching

    Attributes
    protected[org.specs2]
  16. class BeMatchingRegex extends BeMatching

  17. class BeNull[T] extends Matcher[T]

  18. case class BeOneOf[T](t: Seq[T]) extends Matcher[T] with Product with Serializable

  19. class BeSignificantlyCloseTo[T] extends Matcher[T]

  20. class BeTheSameAs[T <: AnyRef] extends Matcher[T]

  21. class BeTrueMatcher extends Matcher[Boolean]

    Matcher for a boolean value which must be true

  22. class BeTypedEqualTo[T] extends EqualityMatcher[T]

    Typed equality Matcher with fallback comparison results

  23. case class BetweenMatcher[T](t1: T, t2: T, includeStart: Boolean = true, includeEnd: Boolean = true)(implicit evidence$49: (T) ⇒ Ordered[T]) extends Matcher[T] with Product with Serializable

  24. case class CanHaveDelta[S](n: S)(implicit evidence$33: Numeric[S]) extends Product with Serializable

    transient class allowing the creation of a delta

  25. case class ContainWithResult[T](check: ValueCheck[T], timesMin: Option[Times] = ..., timesMax: Option[Times] = scala.None, checkAll: Boolean = true) extends Matcher[GenTraversableOnce[T]] with Product with Serializable

  26. case class ContainWithResultSeq[T](checks: Seq[ValueCheck[T]], containsAtLeast: Boolean = true, containsAtMost: Boolean = false, eachCheck: Boolean = false, checkOrder: Boolean = false, negate: Boolean = false) extends Matcher[GenTraversableOnce[T]] with Product with Serializable

  27. case class DataTable(titles: Seq[String], rows: Seq[DataTableRow]) extends Product with Serializable

  28. case class DataTableRow(cells: Seq[String], result: Result) extends Product with Serializable

  29. trait DataTables extends ExpectationsCreation

    This trait provides implicit definitions and types to create DataTables.

  30. trait DisjunctionMatchers extends AnyRef

    Matchers for the \/ datatype

  31. trait EitherMatchers extends EitherBaseMatchers with EitherBeHaveMatchers

    Matchers for the Either datatype

  32. class EqualityMatcher[T] extends AdaptableMatcher[T]

  33. trait EventuallyMatchers extends EventuallyResults

    This trait adds the possibility to retry a given matcher until it succeeds.

  34. trait ExceptionMatchers extends ExceptionBaseMatchers with ExceptionBeHaveMatchers

    These matchers can be used to check if exceptions are thrown or not

  35. class Expectable[+T] extends AnyRef

    The Expectable class models anything which can be checked by applying a Matcher

  36. trait Expectations extends ExpectationsCreation with TypedEqual with ExpectationsDescription

    This trait provides implicit definitions to transform any value into an Expectable

  37. trait ExpectationsCreation extends MatchResultStackTrace

    Base trait to create expectations

  38. trait ExpectationsDescription extends ExpectationsCreation

  39. case class FailureValidationCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]Validation[a, _], T, T] with Product with Serializable

  40. case class FailureValidationMatcher[T]() extends OptionLikeMatcher[[a]Validation[a, _], T, T] with Product with Serializable

  41. trait FutureMatchers extends FutureBaseMatchers

    This trait is for transforming matchers of values to matchers of Futures

  42. case class LeftCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]Either[a, Any], T, T] with Product with Serializable

  43. case class LeftDisjunctionCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]\/[a, _], T, T] with Product with Serializable

  44. case class LeftDisjunctionMatcher[T]() extends OptionLikeMatcher[[a]\/[a, _], T, T] with Product with Serializable

  45. case class LeftMatcher[T]() extends OptionLikeMatcher[[a]Either[a, Any], T, T] with Product with Serializable

  46. trait MapMatchers extends MapBaseMatchers with MapBeHaveMatchers

    Matchers for Maps

  47. case class MatchFailure[T] extends MatchResult[T] with Product with Serializable

  48. class MatchFailureException[T] extends FailureException with MatchResultException[T]

    this class allows to throw a match failure result in an Exception

  49. case class MatchPending[T] extends MatchResult[T] with Product with Serializable

  50. class MatchPendingException[T] extends PendingException with MatchResultException[T]

    this class allows to throw a pending result in an Exception

  51. trait MatchResult[+T] extends ResultLike

    Result of a Match.

  52. trait MatchResultCombinators extends MatchResultLogicalCombinators with ResultLogicalCombinators

    This trait provides logical operators to combine match results where potentially a MatchResult expression throws an Exception, either because it is an error or because it is a ThrownExpectation

  53. trait MatchResultException[T] extends AnyRef

  54. trait MatchResultImplicits extends AnyRef

    Implicit conversions for MatchResults

  55. trait MatchResultLogicalCombinators extends Expectations

  56. trait MatchResultStackTrace extends AnyRef

    this trait allows to fill-in stack traces on match results for precise location

  57. case class MatchSkip[T] extends MatchResult[T] with Product with Serializable

  58. class MatchSkipException[T] extends SkipException with MatchResultException[T]

    this class allows to throw a skipped match result in an Exception

  59. case class MatchSuccess[T] extends MatchResult[T] with Product with Serializable

    The signature of this class constructor is unusual, with a useless implicit parameter.

  60. trait Matcher[-T] extends AnyRef

    The Matcher trait is the base trait for any Matcher.

  61. trait MatcherZipOperators extends ExpectationsCreation

    This trait provides 'zip' operators to create matchers on tuples based on "zipped" matchers on fields

  62. trait MatcherZipOperatorsCodeGeneration extends AnyRef

    Generation code for the MatcherZipOperators trait

  63. trait Matchers extends AnyMatchers with BeHaveMatchers with TraversableMatchers with MapMatchers with StringMatchers with ExceptionMatchers with NumericMatchers with OptionMatchers with EitherMatchers with TryMatchers with EventuallyMatchers with FutureMatchers with MatchersImplicits with ValueChecks with LanguageFeatures

    Trait aggregating the most common specs2 matchers

  64. trait Matchers1 extends AnyBaseMatchers with TraversableBaseMatchers with StringBaseMatchers with ExceptionBaseMatchers with NumericBaseMatchers with OptionBaseMatchers with EitherBaseMatchers with TryBaseMatchers with EventuallyMatchers with FutureBaseMatchers with ValueChecksBase

  65. trait MatchersCreation extends AnyRef

  66. trait MatchersImplicits extends MatchResultCombinators with MatcherZipOperators with MatchResultImplicits with ResultImplicits with MatchersCreation with SequenceMatchersCreation

    This trait provides implicit definitions from MatchResults and Booleans to Results.

  67. class MustExpectable[T] extends Expectable[T]

    This kind of expectable can be followed by the verb must to apply a matcher:

  68. trait MustExpectations extends MustExpectations1 with ExpectationsDescription with TypedEqual

    This trait provides implicit definitions to transform any value into a MustExpectable

  69. trait MustMatchers extends Matchers with MustExpectations

  70. trait MustThrownExpectables extends MustExpectations with MustThrownExpectations1

  71. trait MustThrownExpectations extends MustThrownExpectables with StandardResults with StandardMatchResults

    This trait provides implicit definitions to transform any value into a MustExpectable, throwing exceptions when a match fails

  72. trait MustThrownExpectationsCreation extends ThrownExpectationsCreation with MustExpectationsCreation

  73. trait MustThrownMatchers extends Matchers with MustThrownExpectations

  74. case class NeutralMatch[T] extends MatchResult[T] with Product with Serializable

  75. class NeutralMatcher[T] extends Matcher[T]

    This special matcher always return a NeutralMatch MatchResult (an implicit Success)

  76. case class NeverMatcher[T]() extends Matcher[T] with Product with Serializable

    This matcher never matches any value of type T

  77. trait NoExpectationsDescription extends ExpectationsDescription

  78. trait NoMatchResultStackTrace extends MatchResultStackTrace

    this trait doesn't fill-in stack traces

  79. trait NoMatcherZipOperatorsImplicits extends MatcherZipOperators

    This trait can be mixed in to remove the implicit definitions for zipping matchers

  80. trait NoMatcherZipOperatorsImplicitsCodeGeneration extends AnyRef

    code generation for the NoMatcherZipOperatorsImplicits trait

  81. trait NoMustExpectations extends MustExpectations

    This trait can be used to remove aka and must methods on any value

  82. trait NoShouldExpectations extends ShouldExpectations

    This trait can be used to remove aka and should methods on any value

  83. trait NoThrownExpectations extends Expectations

    This trait can be used to cancel the effect of thrown expectations.

  84. trait NoTypedEqual extends TypedEqual

    This trait can be used to suppress the TypedEqual implicit

  85. case class NotMatch[T] extends MatchResult[T] with Product with Serializable

  86. class NotMatcher[T] extends Matcher[T]

    This special matcher always return a NotMatch MatchResult.

  87. trait NumericMatchers extends NumericBaseMatchers with NumericBeHaveMatchers

    Matchers for Numerical values

  88. trait OperationMatchers extends ValueChecks

    Matchers for Operation values

  89. class OptionLikeCheckedMatcher[F[_], T, U] extends Matcher[F[T]]

  90. class OptionLikeMatcher[F[_], T, U] extends Matcher[F[T]]

  91. trait OptionMatchers extends OptionBaseMatchers with OptionBeHaveMatchers with ValueChecks

    Matchers for Options

  92. class OrMatch[T] extends MatchResult[T]

  93. class OrNotMatch[T] extends MatchResult[T]

  94. class OrderingMatcher[T] extends Matcher[Seq[T]]

  95. case class PlusOrMinus[S](n: S, delta: S) extends Product with Serializable

    class representing a numeric range

  96. trait ResultImplicits extends ExpectationsCreation

  97. trait ResultMatchers extends ResultBaseMatchers with ResultBeHaveMatchers

    Matchers for Results

  98. implicit class Returns[T] extends AnyRef

    Definition Classes
    ReturnsSyntax
  99. trait ReturnsSyntax extends ExpectationsCreation

    Those definitions help specifying the result messages for matchers

  100. case class RightCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]Either[Any, a], T, T] with Product with Serializable

  101. case class RightDisjunctionCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]\/[_, a], T, T] with Product with Serializable

  102. case class RightDisjunctionMatcher[T]() extends OptionLikeMatcher[[a]\/[_, a], T, T] with Product with Serializable

  103. case class RightMatcher[T]() extends OptionLikeMatcher[[a]Either[Any, a], T, T] with Product with Serializable

  104. trait Scope extends AnyRef

    This trait represents any Scope that is used to enclose expectations which might be thrown

  105. trait SequenceMatchersCreation extends ExpectationsCreation with ResultImplicits

  106. class ShouldExpectable[T] extends Expectable[T]

    This kind of expectable can be followed by the verb should to apply a matcher:

  107. trait ShouldExpectations extends Expectations

    This trait provides implicit definitions to transform any value into a ShouldExpectable

  108. trait ShouldMatchers extends Matchers with ShouldExpectations

  109. trait ShouldThrownExpectables extends ThrownExpectations with ShouldExpectations

  110. trait ShouldThrownExpectations extends ShouldThrownExpectables with StandardResults with StandardMatchResults

    This trait provides implicit definitions to transform any value into a ShouldExpectable, throwing exceptions when a match fails

  111. trait ShouldThrownMatchers extends Matchers with ShouldThrownExpectations

  112. case class SignificantFigures(number: Int) extends Product with Serializable

  113. case class SignificantTarget[T](target: T, significantFigures: SignificantFigures)(implicit evidence$48: Numeric[T]) extends Product with Serializable

  114. class SizedCheckedMatcher[T] extends Matcher[T]

  115. class SizedMatcher[T] extends Matcher[T]

  116. case class SomeCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[Option, T, T] with Product with Serializable

  117. case class SomeMatcher[T]() extends OptionLikeMatcher[Option, T, T] with Product with Serializable

  118. trait StandardMatchResults extends ExpectationsCreation

    This trait can be used in conjonction with Pattern matchers:

  119. trait StoredExpectations extends Expectations

    This trait evaluates expectations and stores them in a local variable for further usage

  120. case class StringMatcher(m: AdaptableMatcher[Any]) extends Product with Serializable

  121. trait StringMatchers extends StringBaseMatchers with StringBeHaveMatchers

    The StringMatchers trait provides matchers which are applicable to String objects

  122. case class SuccessValidationCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[[a]Validation[_, a], T, T] with Product with Serializable

  123. case class SuccessValidationMatcher[T]() extends OptionLikeMatcher[[a]Validation[_, a], T, T] with Product with Serializable

  124. trait ThrownExpectables extends ExpectationsCreation

  125. trait ThrownExpectations extends ThrownExpectationsCreation with ThrownStandardResults with ThrownStandardMatchResults

    Thrown expectations will throw a FailureException if a match fails

  126. trait ThrownExpectationsCreation extends ThrownExpectables

    Lightweight ThrownExpectations trait with less implicit methods

  127. trait ThrownMessages extends AnyRef

    This trait can be used to integrate failures and skip messages into specs2

  128. trait ThrownStandardMatchResults extends StandardMatchResults with ExpectationsCreation

  129. trait ThrownStandardResults extends StandardResults with ExpectationsCreation

  130. trait TraversableMatchers extends TraversableBaseMatchers with TraversableBeHaveMatchers with LazyParameters with TraversableBaseMatchersLowImplicits with ImplicitParameters with NumberOfTimes

    Matchers for traversables

  131. case class TryFailureCheckedMatcher[T](check: ValueCheck[Throwable]) extends OptionLikeCheckedMatcher[Try, T, Throwable] with Product with Serializable

  132. case class TryFailureMatcher[T]() extends OptionLikeMatcher[Try, T, Throwable] with Product with Serializable

  133. trait TryMatchers extends TryBaseMatchers with TryBeHaveMatchers

    Matchers for util.

  134. case class TrySuccessCheckedMatcher[T](check: ValueCheck[T]) extends OptionLikeCheckedMatcher[Try, T, T] with Product with Serializable

  135. case class TrySuccessMatcher[T]() extends OptionLikeMatcher[Try, T, T] with Product with Serializable

  136. trait TypedEqual extends AnyRef

    This trait adds some implicits to create expectations with the === sign

  137. trait ValidationMatchers extends AnyRef

    Matchers for the Validation datatype

  138. trait ValueCheck[T] extends AnyRef

    Common interface for checks of a value of type T:

  139. trait ValueChecks extends ValueChecksBase

    implicit conversions used to create ValueChecks

  140. trait ValueChecksBase extends ValueChecksLowImplicits

  141. trait ValueChecksLowImplicits extends AnyRef

  142. trait ConcurrentExecutionContext extends AnyRef

    Specification of the execution context to be used for executing futures This can be overridden to pass in your own execution context

  143. trait NoConcurrentExecutionContext extends ConcurrentExecutionContext

    stack this trait to remove the implicit execution context used to evaluate features

Value Members

  1. object ActionMatchers extends ActionMatchers

  2. object AnyMatchers extends AnyMatchers

  3. object BeMatching

  4. object DataTable extends Serializable

  5. object DataTableRow extends Serializable

  6. object DataTablesGenerator

  7. object DisjunctionMatchers extends DisjunctionMatchers

  8. object EitherMatchers extends EitherMatchers

  9. object EventuallyMatchers extends EventuallyMatchers

  10. object ExceptionMatchers extends ExceptionMatchers

  11. object Expectable

    Factory methods for creating Expectables

  12. object Expectations extends Expectations

  13. object ExpectationsDescription extends ExpectationsDescription

  14. object FutureMatchers extends FutureMatchers

  15. object MapMatchers extends MapMatchers

  16. object MatchFailure extends Serializable

  17. object MatchFailureException extends Serializable

  18. object MatchPendingException extends Serializable

  19. object MatchResult

    Utility functions for MatchResult.

  20. object MatchResultCombinators extends MatchResultCombinators

  21. object MatchResultImplicits extends MatchResultImplicits

  22. object MatchResultLogicalCombinators extends MatchResultLogicalCombinators

  23. object MatchSkipException extends Serializable

  24. object MatchSuccess extends Serializable

  25. object Matcher

  26. object MatcherZipOperators extends MatcherZipOperators

  27. object Matchers extends Matchers

  28. object MatchersCreation extends MatchersCreation

  29. object MatchersImplicits extends MatchersImplicits

  30. object MustExpectable

  31. object MustExpectations extends MustExpectations

  32. object MustMatchers extends MustMatchers with NoMatchResultStackTrace

  33. object MustThrownExpectations extends MustThrownExpectations

  34. object MustThrownMatchers extends MustThrownMatchers with NoMatchResultStackTrace

  35. object NumericMatchers extends NumericMatchers

  36. object OperationMatchers extends OperationMatchers

  37. object OptionMatchers extends OptionMatchers

  38. object ResultImplicits extends ResultImplicits

  39. object ResultMatchers extends ResultMatchers

  40. object ReturnsSyntax extends ReturnsSyntax with Expectations

  41. object Scope

  42. object SequenceMatchersCreation extends SequenceMatchersCreation

  43. object ShouldExpectable

  44. object ShouldExpectations extends ShouldExpectations

  45. object ShouldMatchers extends ShouldMatchers with NoMatchResultStackTrace

  46. object ShouldThrownExpectations extends ShouldThrownExpectations

  47. object ShouldThrownMatchers extends ShouldThrownMatchers with NoMatchResultStackTrace

  48. object StandardMatchResults extends StandardMatchResults

  49. object StringMatchers extends StringMatchers

  50. object ThrownExpectations extends ThrownExpectations

  51. object TraversableMatchers extends TraversableMatchers

  52. object TryMatchers extends TryMatchers

  53. object TypedEqual extends TypedEqual with ExpectationsCreation

  54. object ValidationMatchers extends ValidationMatchers

  55. object ValueCheck

  56. object ValueChecks extends ValueChecks

  57. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    this method can be overridden to throw exceptions when checking the match result

    this method can be overridden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  58. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    this method can be overridden to throw exceptions when checking the match result

    this method can be overridden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  59. def checkResultFailure(r: ⇒ Result): Result

    this method can be overridden to throw exceptions when checking the result

    this method can be overridden to throw exceptions when checking the result

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  60. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  61. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  62. def createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]

    returns

    an Expectable with a description

    Definition Classes
    ExpectationsCreation
  63. def createExpectable[T](t: ⇒ T): Expectable[T]

    returns

    an Expectable

    Definition Classes
    ExpectationsCreation
  64. def createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ExpectationsCreation
  65. package describe

  66. def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

    this method can be overridden to intercept a MatchResult and change its message before it is thrown

    this method can be overridden to intercept a MatchResult and change its message before it is thrown

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  67. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    returns

    the match result without any side-effects

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  68. def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

    this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

    this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

    Attributes
    protected
    Definition Classes
    MatchResultStackTrace

Inherited from ReturnsSyntax

Inherited from ExpectationsCreation

Inherited from MatchResultStackTrace

Inherited from AnyRef

Inherited from Any

Ungrouped