org.specs2

matcher

package matcher

Visibility
  1. Public
  2. All

Type Members

  1. 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.

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

    This matcher always matches any value of type T

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

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

  5. trait AnyBeHaveMatchers extends AnyRef

    This trait allows to write expressions like

  6. trait AnyMatchers extends AnyBaseMatchers with AnyBeHaveMatchers

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

  7. trait ApplicableArbitraries extends AnyRef

    This trait enables some syntactic sugar when it is necessary to pass several arbitrary instances

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

  9. class BeEqualTo extends BeTypedEqualTo[Any]

    Equality Matcher

  10. case class BeEqualTypedValueCheck[T](expected: 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 BeTheSameAs[T <: AnyRef] extends Matcher[T]

  20. class BeTrueMatcher extends Matcher[Boolean]

    Matcher for a boolean value which must be true

  21. class BeTypedEqualTo[T] extends AdaptableMatcher[T]

    Typed equality Matcher

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

  23. trait CanBeEqual extends AnyRef

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

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

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

  26. trait ContentMatchers extends LinesContentMatchers with FilesContentMatchers

    The ContentMatchers trait provides matchers to make comparisons between files, sequences,.

  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 Expectations

    This trait provides implicit definitions and types to create DataTables.

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

    class representing a numeric range

  31. trait DependencyBeHaveMatchers extends AnyRef

  32. trait DependencyMatchers extends DependencyBaseMatchers with DependencyBeHaveMatchers

    The dependency matchers trait provides a way to specify the dependencies that should be verified in your project and then to check that there's no unwanted dependency in the code.

  33. trait EitherMatchers extends EitherBaseMatchers with EitherBeHaveMatchers

    Matchers for the Either datatype

  34. class EqualIgnoringSpaceMatcher extends Matcher[Seq[Node]] with XmlMatcherKoMessage

    Matcher for equalIgnoreSpace comparison, ignoring the nodes order

  35. class EqualIgnoringSpaceMatcherOrdered extends Matcher[Seq[Node]] with XmlMatcherKoMessage

    Matcher for equalIgnoreSpace comparison, considering the node order

  36. trait EventuallyMatchers extends EventuallyResults

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

  37. trait ExceptionMatchers extends ExceptionBaseMatchers with ExceptionBeHaveMatchers

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

  38. class Expectable[+T] extends AnyRef

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

  39. trait Expectations extends CanBeEqual

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

  40. trait ExpectationsDescription extends Sentences with Expectations

  41. case class ExpectedParsedResult[+T](t: T) extends Product with Serializable

    This class is only used as a transient holder for the expected parsed value, to overcome overloaded method issues

  42. case class FailedTryMatcher[T]() extends Matcher[Try[T]] with Product with Serializable

  43. trait FileMatchers extends FileBaseMatchers with FileBeHaveMatchers

    The FileMatchers trait provides matchers which are applicable to files

  44. trait FilesContentMatchers extends FileMatchers with LinesContentMatchers with TraversableMatchers

    This trait provides matchers to check the presence of some expected files vs the actual ones and also ways to verify the contents of these files

  45. trait FunctionPropertyImplicits extends AnyRef

    This trait adds some syntactic sugar to transform function to properties by appending forAll

  46. trait FutureMatchers extends Expectations

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

  47. trait Hamcrest extends AnyRef

    This trait adds implicit conversions to be able to use [Hamcrest matchers](http://code.

  48. trait JUnitExpectations extends ThrownExpectations

    This trait throws AssertionFailed errors when a match fails.

  49. trait JUnitMustExpectations extends MustThrownExpectations with JUnitExpectations

    This trait can be imported to use MustMatchers in JUnit

  50. trait JUnitMustMatchers extends Matchers with JUnitMustExpectations

    These traits and objects can be used in JUnit

  51. trait JUnitShouldExpectations extends ShouldThrownExpectations with JUnitExpectations

    This trait can be imported to use ShouldMatchers in JUnit

  52. trait JUnitShouldMatchers extends Matchers with JUnitShouldExpectations

  53. trait JsonMatchers extends JsonBaseMatchers with JsonBaseBeHaveMatchers

    Matchers for Json expressions (entered as strings)

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

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

  56. trait LinesContentMatchers extends LinesContentBaseMatchers with LinesContentBeHaveMatchers

  57. trait MapMatchers extends MapBaseMatchers with MapBeHaveMatchers

    Matchers for Maps

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

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

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

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

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

    this class allows to throw a pending result in an Exception

  62. trait MatchResult[+T] extends ResultLike

    Result of a Match.

  63. trait MatchResultException[T] extends AnyRef

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

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

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

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

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

  67. trait Matcher[-T] extends AnyRef

    The Matcher trait is the base trait for any Matcher.

  68. trait MatcherMacros extends AnyRef

    Macro definitions to generate matchers for the members of a type T

  69. trait MatcherZipOperators extends Expectations with ValueChecks

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

  70. trait MatcherZipOperatorsCodeGeneration extends AnyRef

    Generation code for the MatcherZipOperators trait

  71. 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 LanguageFeatures

    Trait aggregating the most common specs2 matchers

  72. trait MatchersImplicits extends Expectations with MatchResultCombinators with MatcherZipOperators with MatchResultImplicits with ExpectationsDescription

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

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

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

  74. trait MustExpectations extends Expectations

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

  75. trait MustMatchers extends Matchers with MustExpectations

  76. trait MustThrownExpectations extends ThrownExpectations with MustExpectations

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

  77. trait MustThrownMatchers extends Matchers with MustThrownExpectations

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

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

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

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

    This matcher never matches any value of type T

  81. trait NoCanBeEqual extends CanBeEqual

    This trait can be used to suppress the CanBeEqual implicits

  82. trait NoExpectationsDescription extends ExpectationsDescription

  83. trait NoMatcherZipOperatorsImplicits extends MatcherZipOperators

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

  84. trait NoMatcherZipOperatorsImplicitsCodeGeneration extends AnyRef

    code generation for the NoMatcherZipOperatorsImplicits trait

  85. trait NoMustExpectations extends MustExpectations

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

  86. trait NoScopedExpectations extends ScopedExpectations

  87. trait NoShouldExpectations extends ShouldExpectations

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

  88. trait NoThrownExpectations extends Expectations

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

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

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

    This special matcher always return a NotMatch MatchResult.

  91. trait NumericMatchers extends NumericBaseMatchers with NumericBeHaveMatchers

    Matchers for Numerical values

  92. trait OneExpectationPerProp extends ScalaCheckMatchers

    This trait can be mixed in a Specification to avoid counting the number of times that a property was executed as the number of expectations.

  93. class OptionLikeCheckedMatcher[F[_], T] extends Matcher[F[T]]

  94. class OptionLikeMatcher[F[_], T] extends Matcher[F[T]]

  95. trait OptionMatchers extends OptionBaseMatchers with OptionBeHaveMatchers

    Matchers for Options

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

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

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

  99. case class Parameters(minTestsOk: Int = ..., minSize: Int = Test.Parameters.default.minSize, maxDiscardRatio: Float = ..., maxSize: Int = Test.Parameters.default.maxSize, workers: Int = Test.Parameters.default.workers, rng: Random = Test.Parameters.default.rng, callback: TestCallback = ..., loader: Option[ClassLoader] = ..., verbose: Boolean = false, output: Output = ConsoleOutput) extends Product with Serializable

    This class is the base class for the display and set case classes.

  100. trait ParserMatchers extends ParserBaseMatchers with ParserBeHaveMatchers

    Matchers for parser combinators

  101. trait PartialFunctionPropertyImplicits extends AnyRef

    This trait adds some syntactic sugar to transform partial functions to properties by appending forAll

  102. case class PathFunction(node: Node, function: XPathFunctions.XPathFunction, attributes: List[String] = Nil, attributeValues: Map[String, String] = Map(), exactMatch: Boolean = false, textMessage: Option[String] = None, textMatcher: Matcher[String] = AlwaysMatcher[String]()) extends (Seq[Node]) ⇒ Seq[Node] with XPathFunctions with Product with Serializable

    The PathFunction object encapsulate a search for a node and/or attributes or attributeValues with an XPath function If node has some children, then they are searched using equality

  103. trait PathMatchers extends PathBaseMatchers with PathBeHaveMatchers

    The PathMatchers trait provides matchers which are applicable to strings representing paths

  104. trait ResultMatchers extends ResultBaseMatchers with ResultBeHaveMatchers

    Matchers for Results

  105. trait ResultPropertyImplicits extends AnyRef

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

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

  108. trait ScalaCheckMatchers extends ConsoleOutput with ScalaCheckParameters with FunctionPropertyImplicits with ResultPropertyImplicits with ResultLogicalCombinators with ApplicableArbitraries with Expectations

    The ScalaCheckMatchers trait provides matchers which allow to assess properties multiple times with generated data.

  109. trait ScalaCheckParameters extends AnyRef

    This trait provides generation parameters to use with the ScalaCheckMatchers

  110. trait ScalaInterpreterMatchers extends Expectations

  111. trait Scope extends AnyRef

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

  112. trait ScopedExpectations extends AnyRef

    This trait allows to enclose expectations throwing exceptions in a Scope trait:

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

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

  114. trait ShouldExpectations extends Expectations

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

  115. trait ShouldMatchers extends Matchers with ShouldExpectations

  116. trait ShouldThrownExpectations extends ThrownExpectations with ShouldExpectations

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

  117. trait ShouldThrownMatchers extends Matchers with ShouldThrownExpectations

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

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

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

  121. trait StandardMatchResults extends Expectations

    This trait can be used in conjonction with Pattern matchers:

  122. trait StoredExpectations extends Expectations

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

  123. trait StringMatchers extends StringBaseMatchers with StringBeHaveMatchers

    The StringMatchers trait provides matchers which are applicable to String objects

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

  125. case class SuccessMatcher[T]() extends OptionLikeMatcher[Try, T] with Product with Serializable

  126. class TerminationMatcher[-T] extends Matcher[T]

  127. trait TerminationMatchers extends TerminationBaseMatchers with TerminationNotMatchers

    This trait provides matchers to check if a block of code is terminating or not

  128. trait ThrownExpectations extends Expectations with StandardResults with StandardMatchResults with ScopedExpectations

    Thrown expectations will throw a FailureException if a match fails

  129. trait ThrownMessages extends AnyRef

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

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

    Matchers for traversables

  131. trait TryMatchers extends TryBaseMatchers with TryBeHaveMatchers

    Matchers for util.

  132. trait ValueCheck[T] extends AnyRef

    Common interface for checks of a value of type T:

  133. trait ValueChecks extends ValueChecksLowImplicits1

    implicit conversions used to create ValueChecks

  134. trait ValueChecksLowImplicits extends AnyRef

    Lower implicit conversions to create ValueChecks

  135. trait ValueChecksLowImplicits1 extends ValueChecksLowImplicits

  136. trait XPathFunctions extends AnyRef

  137. case class XmlMatcher(functions: Seq[PathFunction]) extends Matcher[Seq[Node]] with Product with Serializable

    The XmlMatcher class matches an xml Node, or a list of Nodes against a list of search functions, which can either search for:

  138. trait XmlMatcherKoMessage extends AnyRef

  139. trait XmlMatchers extends XmlBaseMatchers with XmlBeHaveMatchers

    The XmlMatchers trait provides matchers which are applicable to xml nodes

Value Members

  1. object AnyMatchers extends AnyMatchers

  2. object BeMatching

  3. object ContentMatchers extends ContentMatchers

  4. object DataTable extends Serializable

  5. object DataTableRow extends Serializable

  6. object EitherMatchers extends EitherMatchers

  7. object EventuallyMatchers extends EventuallyMatchers

  8. object Expectable

    Factory methods for creating Expectables

  9. object ExpectedParsedResult extends Serializable

  10. object FileMatchers extends FileMatchers

  11. object FutureMatchers extends FutureMatchers

  12. object Hamcrest extends Hamcrest

  13. object JUnitMustExpectations extends JUnitMustExpectations

  14. object JUnitMustMatchers extends JUnitMustMatchers

  15. object JUnitShouldExpectations extends JUnitShouldExpectations

  16. object JUnitShouldMatchers extends JUnitShouldMatchers

  17. object LinesContentMatchers extends LinesContentMatchers

  18. object MapMatchers extends MapMatchers

  19. object MatchFailure extends Serializable

  20. object MatchFailureException extends Serializable

  21. object MatchPendingException extends Serializable

  22. object MatchResultCombinators extends MatchResultCombinators

  23. object MatchResultExecution extends MatchResultExecution

  24. object MatchResultLogicalCombinators extends MatchResultLogicalCombinators

  25. object MatchSkipException extends Serializable

  26. object MatchSuccess extends Serializable

  27. object Matcher

  28. object MatcherMacros extends MatcherMacros

    Macros implementations

  29. object Matchers extends Matchers

  30. object MustExpectable

  31. object MustExpectations extends MustExpectations

  32. object MustMatchers extends MustMatchers

  33. object MustThrownExpectations extends MustThrownExpectations

  34. object MustThrownMatchers extends MustThrownMatchers

  35. object NumericMatchers extends NumericMatchers

  36. object OptionMatchers extends OptionMatchers

  37. object PartialFunctionPropertyImplicits extends PartialFunctionPropertyImplicits

  38. object PathMatchers extends PathMatchers

  39. object ResultMatchers extends ResultMatchers

  40. object ScalaCheckMatchers extends ScalaCheckMatchers

  41. object ShouldExpectable

  42. object ShouldExpectations extends ShouldExpectations

  43. object ShouldMatchers extends ShouldMatchers

  44. object ShouldThrownExpectations extends ShouldThrownExpectations

  45. object ShouldThrownMatchers extends ShouldThrownMatchers

  46. object StandardMatchResults extends StandardMatchResults

  47. object StringMatchers extends StringMatchers

  48. object TraversableMatchers extends TraversableMatchers

  49. object TryMatchers extends TryMatchers

  50. object ValueChecks extends ValueChecks

  51. object XmlMatchers extends XmlMatchers

Ungrouped