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

    This trait allows to write expressions like

    1 must be equalTo(1)

  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 BeTypedEqualTo[Any]

    Equality Matcher

  10. case class BeEqualTypedValueCheck[T](expected: T) extends ValueCheck[T] with Product with Serializable

    ValueCheck for a typed expected value.

    ValueCheck for a typed expected value. It uses the BeTypedEqualTo matcher

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

    ValueCheck for an untyped expected value.

    ValueCheck for an untyped expected value. It uses the BeEqualTo matcher

  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 AdaptableMatcher[T]

    Typed equality Matcher

  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] = Some(1.times), timesMax: Option[Times] = 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. trait ContentMatchers extends LinesContentMatchers with FilesContentMatchers

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

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

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

  30. trait DataTables extends ExpectationsCreation

    This trait provides implicit definitions and types to create DataTables.

    This trait provides implicit definitions and types to create DataTables.

    A DataTable has a header defining column names and rows holding values. It is possible to apply a function taking the row values and returning a MatchResult.

    A TableHeader is defined by separating the column names with '|': "a" | "b" | "c"

    A DataRow is defined by separating the row values with '!': 1 ! 2 ! 3

    Note that the '!' method can conflict with the creation of Examples when the value is a string. In that case it is possible to use the '!!! method to disambiguate:

    "1" !! "2" ! "3"

    In that case the first column of the header can also be defined with '||' for pure symmetry reasons:

    "a" || "b" | "c" "1" !! "2" ! "3"

    See also

    org.specs2.matcher.DataTablesSpec for examples

  31. trait DependencyBaseMatchers extends LayersAnalysis

  32. trait DependencyBeHaveMatchers extends BeHaveMatchers

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

    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.

    It does so by:

    • specifying the dependencies as "layers" where a package name declared in one layer can only be dependent on a package name declared in a lower layer
    • using the scala compiler BuildManager class to recompile the files and get dependency analysis data

    Usage:

    layers( "package1", layer("package2", "package3", "package4"), layer("package6", "package7") ) must beRespected

  34. trait DisjunctionMatchers extends AnyRef

    Matchers for the \/ datatype

  35. trait EitherMatchers extends EitherBaseMatchers with EitherBeHaveMatchers

    Matchers for the Either datatype

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

    Matcher for equalIgnoreSpace comparison, ignoring the nodes order

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

    Matcher for equalIgnoreSpace comparison, considering the node order

  38. trait EventuallyMatchers extends EventuallyResults

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

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

    This was contributed by @robey (http://robey.lag.net)

  39. trait ExceptionMatchers extends ExceptionBaseMatchers with ExceptionBeHaveMatchers

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

  40. class Expectable[+T] extends AnyRef

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

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

    It stores a value which is only evaluated when necessary and an optional additional description for that value.

    The Expectable object is responsible for creating its own description, based on the value toString method and and an additional description.

  41. trait Expectations extends ExpectationsCreation with TypedEqual with ExpectationsDescription

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

  42. trait ExpectationsCreation extends MatchResultStackTrace

    Base trait to create expectations

  43. trait ExpectationsDescription extends ExpectationsCreation

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

  45. case class FailTypecheckMatcher(expected: String) extends Matcher[Typechecked] with Product with Serializable

  46. trait FileMatchers extends FileBaseMatchers with FileBeHaveMatchers

    The FileMatchers trait provides matchers which are applicable to files

  47. trait FilesContentMatchers extends FileMatchers with LinesContentMatchers with TraversableMatchers with ExpectationsCreation

    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

  48. trait FutureMatchers extends FutureBaseMatchers

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

  49. trait FuturezMatchers extends FuturezBaseMatchers

    This trait is for transforming matchers of values to matchers of scalaz.concurrent.Future

  50. trait Hamcrest extends AnyRef

    This trait adds implicit conversions to be able to use [Hamcrest matchers](http://code.google.com/p/hamcrest) as specs2 matchers.

  51. trait JUnitExpectations extends ThrownExpectations

    This trait throws AssertionFailed errors when a match fails.

    This trait throws AssertionFailed errors when a match fails.

    It is involved when reusing Matchers with JUnit

  52. trait JUnitMustExpectations extends MustThrownExpectations with JUnitExpectations

    This trait can be imported to use MustMatchers in JUnit

  53. trait JUnitMustMatchers extends Matchers with JUnitMustExpectations

    These traits and objects can be used in JUnit

  54. trait JUnitShouldExpectations extends ShouldThrownExpectations with JUnitExpectations

    This trait can be imported to use ShouldMatchers in JUnit

  55. trait JUnitShouldMatchers extends Matchers with JUnitShouldExpectations

  56. case class JsonArray(list: List[Any]) extends JsonType with Product with Serializable

  57. case class JsonBoolean(b: Boolean) extends JsonType with Product with Serializable

  58. case class JsonMap(map: Map[String, Any]) extends JsonType with Product with Serializable

  59. trait JsonMatchers extends JsonBaseMatchers with JsonBaseBeHaveMatchers

    Matchers for Json expressions (entered as strings)

  60. case class JsonNumber(d: Double) extends JsonType with Product with Serializable

  61. trait JsonSelectors extends AnyRef

    Different ways of selecting elements in a Json object

  62. case class JsonString(s: String) extends JsonType with Product with Serializable

  63. sealed trait JsonType extends AnyRef

    abstract JSON types for specs2

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

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

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

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

  68. trait LinesContentMatchers extends LinesContentBaseMatchers with LinesContentBeHaveMatchers

  69. class MakeMatchers[C <: Context] extends AnyRef

  70. trait MapMatchers extends MapBaseMatchers with MapBeHaveMatchers

    Matchers for Maps

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

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

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

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

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

    this class allows to throw a pending result in an Exception

  75. trait MatchResult[+T] extends ResultLike

    Result of a Match.

    Result of a Match.

    A MatchResult contains several information about a match on an expectable:

    - the expectable value, to allow the chaining of matches - a pair of messages ok message / ko message to allow the easy creation of the negation of a match

    A MatchResult can be transformed to a simple Result object to be the body of an Example.

    There are different kinds of MatchResults, some of them being only created to support English-like combination of Matchers:

    1 must be equalTo(1) and not be equalTo(2)

    In an Expectation like the one above, there is a left to right evaluation:

    1. be is a NeutralMatcher, returning a NeutralMatch doing nothing yet, just storing the expectable

    2. equalTo(1) is a real Matcher which is applied to the NeutralMatch MatchResult thanks to an implicit definition in the BeHaveAnyMatchers trait. This yields a MatchSuccess result

    3. not creates a NotMatcher and can be and-ed with the previous MatchSuccess to yield a AndMatch(MatchSuccess, NotMatch), with NotMatch being the result of applying the NotMatcher to the expectable. This AndMatch is evaluated to create a AndNotMatch(MatchSuccess, MatchSkip)

    Basically this is like forming an evaluation structure which will be resolved when the next 'real' matcher will arrive

    4. the AndNotMatch get nows it be method called with the equalTo Matcher. This results in equalTo being applied to the AndNotMatch, effectively doing: MatchSuccess and MatchSkip.apply(equalTo(2).not), which is MatchSuccess and expectable.applyMatcher(equalTo(2).not) which is MatchSuccess

    See also

    org.specs2.matcher.BeHaveMatchersSpec for examples

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

  77. trait MatchResultException[T] extends AnyRef

  78. trait MatchResultImplicits extends AnyRef

    Implicit conversions for MatchResults

  79. trait MatchResultLogicalCombinators extends Expectations

  80. trait MatchResultStackTrace extends AnyRef

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

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

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

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

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

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

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

    This is actually here to avoid overloading conflicts with the apply method in the companion object

  84. trait Matcher[-T] extends AnyRef

    The Matcher trait is the base trait for any Matcher.

    The Matcher trait is the base trait for any Matcher.

    This trait can be extended to provide an appropriate apply method that will check an expectable value a: Expectable[T].

    The result of a match is a MatchResult object (@see MatchResult).

    Matchers can be composed.

    Implementation notes:

    • the parameter to the apply method must be a by-name parameter. This allows some values to be evaluated only when necessary.
    • However in the implementation of the apply function, it must be taken care of not evaluating the parameter twice. Assigning it to a val is the solution to this issue.
  85. trait MatcherMacros extends AnyRef

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

  86. trait MatcherZipOperators extends ExpectationsCreation

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

  87. trait MatcherZipOperatorsCodeGeneration extends AnyRef

    Generation code for the MatcherZipOperators trait

  88. 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 FuturezMatchers with MatchersImplicits with ValueChecks with LanguageFeatures

    Trait aggregating the most common specs2 matchers

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

  90. trait MatchersCreation extends AnyRef

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

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

    It also allows to:

    - create matchers from functions - create matchers for seqs and sets from single matchers

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

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

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

    1 must beEqualTo(1)

    For convenience, several mustMatcher methods have also been defined as shortcuts to equivalent:

    a must matcher

  93. trait MustExpectations extends MustExpectations1 with ExpectationsDescription with TypedEqual

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

  94. trait MustMatchers extends Matchers with MustExpectations

  95. trait MustThrownExpectations extends MustExpectations with MustThrownExpectations1

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

  96. trait MustThrownExpectationsCreation extends ThrownExpectationsCreation with MustExpectationsCreation

  97. trait MustThrownMatchers extends Matchers with MustThrownExpectations

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

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

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

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

    This matcher never matches any value of type T

  101. trait NoExpectationsDescription extends ExpectationsDescription

  102. trait NoMatchResultStackTrace extends MatchResultStackTrace

    this trait doesn't fill-in stack traces

  103. trait NoMatcherZipOperatorsImplicits extends MatcherZipOperators

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

  104. trait NoMatcherZipOperatorsImplicitsCodeGeneration extends AnyRef

    code generation for the NoMatcherZipOperatorsImplicits trait

  105. trait NoMustExpectations extends MustExpectations

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

  106. trait NoShouldExpectations extends ShouldExpectations

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

  107. trait NoThrownExpectations extends Expectations

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

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

    For example it can be mixed-in a mutable.Specification so that no exception is thrown on failure

  108. trait NoTypedEqual extends TypedEqual

    This trait can be used to suppress the TypedEqual implicit

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

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

    This special matcher always return a NotMatch MatchResult.

    This special matcher always return a NotMatch MatchResult. It will negate the next match applied to it.

  111. trait NumericMatchers extends NumericBaseMatchers with NumericBeHaveMatchers

    Matchers for Numerical values

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

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

  114. trait OptionMatchers extends OptionBaseMatchers with OptionBeHaveMatchers with ValueChecks

    Matchers for Options

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

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

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

  118. trait ParserMatchers extends ParserBaseMatchers with ParserBeHaveMatchers

    Matchers for parser combinators

    Matchers for parser combinators

    When this trait is inherited the parsers variable needs to be defined.

    by @alexey_r

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

  120. trait PathMatchers extends PathBaseMatchers with PathBeHaveMatchers

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

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

    class representing a numeric range

  122. trait ProcessMatchers extends ExpectationsCreation

    Matchers for Process[Task, T]

  123. trait ResultImplicits extends ExpectationsCreation

  124. trait ResultMatchers extends ResultBaseMatchers with ResultBeHaveMatchers

    Matchers for Results

  125. implicit class Returns[T] extends AnyRef

    Definition Classes
    ReturnsSyntax
  126. trait ReturnsSyntax extends ExpectationsCreation

    Those definitions help specifying the result messages for matchers

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

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

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

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

  131. trait ScalaInterpreterMatchers extends Expectations

  132. trait Scope extends AnyRef

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

  133. trait SequenceMatchersCreation extends ExpectationsCreation with ResultImplicits

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

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

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

    1 should beEqualTo(1)

    For convenience, several shouldMatcher methods have also been defined as shortcuts to equivalent:

    a should matcher

  135. trait ShouldExpectations extends Expectations

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

  136. trait ShouldMatchers extends Matchers with ShouldExpectations

  137. trait ShouldThrownExpectations extends ThrownExpectations with ShouldExpectations

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

  138. trait ShouldThrownMatchers extends Matchers with ShouldThrownExpectations

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

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

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

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

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

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

  145. trait StandardMatchResults extends ExpectationsCreation

    This trait can be used in conjonction with Pattern matchers:

    This trait can be used in conjonction with Pattern matchers:

    List(1, 2) must be like { case List(a, b) => ok } List(1, 2) must be like { case List(a, b) => ko("unexpected") }

  146. trait StoredExpectations extends Expectations

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

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

  148. trait StringMatchers extends StringBaseMatchers with StringBeHaveMatchers

    The StringMatchers trait provides matchers which are applicable to String objects

  149. trait TaskMatchers extends AnyRef

    Matchers for scalaz.concurrent.Task

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

  151. trait TerminationMatchers extends TerminationBaseMatchers with TerminationNotMatchers

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

  152. trait ThrownExpectations extends ThrownExpectationsCreation

    Thrown expectations will throw a FailureException if a match fails

    Thrown expectations will throw a FailureException if a match fails

    This trait can be extended to be used in another framework like ScalaTest:

    trait ScalaTestExpectations extends ThrownExpectations { override protected def checkFailure[T](m: =>MatchResult[T]) = { m match { case f @ MatchFailure(ok, ko, _, _, _) => throw new TestFailedException(f.message, f.exception, 0) case _ => () } m } }

  153. trait ThrownExpectationsCreation extends ExpectationsCreation with StandardResults with StandardMatchResults

    Lightweight ThrownExpectations trait with less implicit methods

  154. trait ThrownMessages extends AnyRef

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

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

    Matchers for traversables

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

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

  158. trait TryMatchers extends TryBaseMatchers with TryBeHaveMatchers

    Matchers for util.Try instances

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

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

  161. trait TypecheckBeHaveMatchers extends AnyRef

  162. class TypecheckMatcher extends Matcher[Typechecked]

  163. trait TypecheckMatchers extends TypecheckBeHaveMatchers

    Matchers for checking if a piece of code compiles or not

  164. trait TypedEqual extends AnyRef

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

  165. trait ValueCheck[T] extends AnyRef

    Common interface for checks of a value of type T:

    Common interface for checks of a value of type T:

    • a expected single value of type T
    • a Matcher[T]
    • a function returning a type R having an AsResult instance
  166. trait ValueChecks extends ValueChecksBase

    implicit conversions used to create ValueChecks

  167. trait ValueChecksBase extends ValueChecksLowImplicits

  168. trait ValueChecksLowImplicits extends AnyRef

  169. trait XPathFunctions extends AnyRef

  170. 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:

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

    • a given direct child, with its label and/or attributes and/or attributes names and values
    • a given child, direct or not (maybe deeply nested), with its label and/or attributes and/or attributes names and values

    XmlMatchers can be "chained" by using the \ or the \\ methods. In that case, the resulting matcher has a new search function which tries to match the result of the preceding function. For example

     must \\("c").\("d")
    
    will be ok. must \\("c").\("d")

  171. trait XmlMatcherKoMessage extends AnyRef

  172. trait XmlMatchers extends XmlBaseMatchers with XmlBeHaveMatchers

    The XmlMatchers trait provides matchers which are applicable to xml nodes

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

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

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) The execution context needs to be user-defined but you can reuse specs2 execution context by defining an example as a function ExecutionContext => AsResult[T]

  174. trait NoConcurrentExecutionContext extends ConcurrentExecutionContext

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

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

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) The execution context needs to be user-defined but you can reuse specs2 execution context by defining an example as a function ExecutionContext => AsResult[T]

Value Members

  1. object ActionMatchers extends ActionMatchers

  2. object AnyMatchers extends AnyMatchers

  3. object BeMatching

  4. object ContentMatchers extends ContentMatchers

  5. object DataTable extends Serializable

  6. object DataTableRow extends Serializable

  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 ExpectedParsedResult extends Serializable

  15. object FileMatchers extends FileMatchers

  16. object FutureMatchers extends FutureMatchers

  17. object FuturezMatchers extends FuturezMatchers

  18. object Hamcrest extends Hamcrest

  19. object JUnitMustExpectations extends JUnitMustExpectations

  20. object JUnitMustMatchers extends JUnitMustMatchers with NoMatchResultStackTrace

  21. object JUnitShouldExpectations extends JUnitShouldExpectations

  22. object JUnitShouldMatchers extends JUnitShouldMatchers with NoMatchResultStackTrace

  23. object JsonNull extends JsonType with Product with Serializable

  24. object JsonType

  25. object LinesContentMatchers extends LinesContentMatchers

  26. object MapMatchers extends MapMatchers

  27. object MatchFailure extends Serializable

  28. object MatchFailureException extends Serializable

  29. object MatchPendingException extends Serializable

  30. object MatchResult

    Utility functions for MatchResult.

    Utility functions for MatchResult.

    A MatchResult is a Functor where the fmap function acts on the embedded Expectable value (which itself is a Functor)

  31. object MatchResultCombinators extends MatchResultCombinators

  32. object MatchResultImplicits extends MatchResultImplicits

  33. object MatchResultLogicalCombinators extends MatchResultLogicalCombinators

  34. object MatchSkipException extends Serializable

  35. object MatchSuccess extends Serializable

  36. object Matcher

  37. object MatcherMacros extends MatcherMacros

    Macros implementations

    Macros implementations

    The bulk of the implementation is credited to:

    - @travisbrown for his ["vampire methods"](http://meta.plasm.us/posts/2013/08/31/feeding-our-vampires/) - @retronym for his help on [range positions](https://groups.google.com/forum/#!topic/scala-internals/fmWKw5TDz98) - @xeno_by for his help on macros in general!

  38. object MatcherZipOperators extends MatcherZipOperators

  39. object Matchers extends Matchers

  40. object MatchersCreation extends MatchersCreation

  41. object MatchersImplicits extends MatchersImplicits

  42. object MustExpectable

  43. object MustExpectations extends MustExpectations

  44. object MustMatchers extends MustMatchers with NoMatchResultStackTrace

  45. object MustThrownExpectations extends MustThrownExpectations

  46. object MustThrownMatchers extends MustThrownMatchers with NoMatchResultStackTrace

  47. object NumericMatchers extends NumericMatchers

  48. object OptionMatchers extends OptionMatchers

  49. object PathMatchers extends PathMatchers

  50. object ResultImplicits extends ResultImplicits

  51. object ResultMatchers extends ResultMatchers

  52. object ReturnsSyntax extends ReturnsSyntax with Expectations

  53. object Scope

  54. object SequenceMatchersCreation extends SequenceMatchersCreation

  55. object ShouldExpectable

  56. object ShouldExpectations extends ShouldExpectations

  57. object ShouldMatchers extends ShouldMatchers with NoMatchResultStackTrace

  58. object ShouldThrownExpectations extends ShouldThrownExpectations

  59. object ShouldThrownMatchers extends ShouldThrownMatchers with NoMatchResultStackTrace

  60. object StandardMatchResults extends StandardMatchResults

  61. object StringMatchers extends StringMatchers

  62. object TaskMatchers extends TaskMatchers

  63. object TerminationMatchers extends TerminationMatchers

  64. object TraversableMatchers extends TraversableMatchers

  65. object TryMatchers extends TryMatchers

  66. object TypedEqual extends ExpectationsCreation

  67. object ValueCheck

  68. object ValueChecks extends ValueChecks

  69. object XmlMatchers extends XmlMatchers

  70. 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
  71. 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
  72. 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
  73. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description

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

    returns

    an Expectable

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

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ExpectationsCreation
  78. 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
  79. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    returns

    the match result without any side-effects

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  80. 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