Package

org.specs2

matcher

Permalink

package matcher

Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    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

    Permalink

    This matcher always matches any value of type T

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

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

    Permalink
  5. trait AnyBeHaveMatchers extends AnyRef

    Permalink

    This trait allows to write expressions like

    This trait allows to write expressions like

    1 must be equalTo(1)

  6. trait AnyMatchers extends AnyBaseMatchers with AnyBeHaveMatchers

    Permalink

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

  7. trait ApplicableArbitraries extends AnyRef

    Permalink

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

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

    Permalink
  9. class BeEqualTo extends BeTypedEqualTo[Any]

    Permalink

    Equality Matcher

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

    Permalink

    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

    Permalink

    ValueCheck for an untyped expected value.

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

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

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

    Permalink
  14. class BeMatching extends Matcher[String]

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

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

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

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

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

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

    Permalink
  21. class BeTrueMatcher extends Matcher[Boolean]

    Permalink

    Matcher for a boolean value which must be true

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

    Permalink

    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

    Permalink
  24. trait CanBeEqual extends AnyRef

    Permalink

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

  25. trait CheckProperty extends AnyRef

    Permalink
  26. trait ConcurrentExecutionContext extends AnyRef

    Permalink

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

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

    Permalink
  28. 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

    Permalink
  29. trait ContentMatchers extends LinesContentMatchers with FilesContentMatchers

    Permalink

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

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

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

    Permalink
  32. trait DataTables extends Expectations

    Permalink

    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

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

    Permalink

    class representing a numeric range

  34. trait DependencyBeHaveMatchers extends AnyRef

    Permalink
  35. trait DependencyMatchers extends DependencyBaseMatchers with DependencyBeHaveMatchers

    Permalink

    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

  36. trait DisjunctionMatchers extends AnyRef

    Permalink

    Matchers for the \/ datatype

  37. trait EitherMatchers extends EitherBaseMatchers with EitherBeHaveMatchers

    Permalink

    Matchers for the Either datatype

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

    Permalink

    Matcher for equalIgnoreSpace comparison, ignoring the nodes order

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

    Permalink

    Matcher for equalIgnoreSpace comparison, considering the node order

  40. trait EventuallyMatchers extends EventuallyResults

    Permalink

    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)

  41. trait ExceptionMatchers extends ExceptionBaseMatchers with ExceptionBeHaveMatchers

    Permalink

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

  42. class Expectable[+T] extends AnyRef

    Permalink

    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.

  43. trait Expectations extends CanBeEqual with MatchResultStackTrace

    Permalink

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

  44. trait ExpectationsDescription extends Sentences with Expectations

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

    Permalink

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

  46. trait FileMatchers extends FileBaseMatchers with FileBeHaveMatchers

    Permalink

    The FileMatchers trait provides matchers which are applicable to files

  47. trait FilesContentMatchers extends FileMatchers with LinesContentMatchers with TraversableMatchers

    Permalink

    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 FunctionPropertyImplicits extends AnyRef

    Permalink

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

  49. trait FutureMatchers extends Expectations with ConcurrentExecutionContext

    Permalink

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

  50. trait Hamcrest extends AnyRef

    Permalink

    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

    Permalink

    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

    Permalink

    This trait can be imported to use MustMatchers in JUnit

  53. trait JUnitMustMatchers extends Matchers with JUnitMustExpectations

    Permalink

    These traits and objects can be used in JUnit

  54. trait JUnitShouldExpectations extends ShouldThrownExpectations with JUnitExpectations

    Permalink

    This trait can be imported to use ShouldMatchers in JUnit

  55. trait JUnitShouldMatchers extends Matchers with JUnitShouldExpectations

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

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

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

    Permalink
  59. trait JsonMatchers extends JsonBaseMatchers with JsonBaseBeHaveMatchers

    Permalink

    Matchers for Json expressions (entered as strings)

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

    Permalink
  61. trait JsonSelectors extends AnyRef

    Permalink

    Different ways of selecting elements in a Json object

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

    Permalink
  63. sealed trait JsonType extends AnyRef

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

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

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

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

    Permalink
  68. trait LinesContentMatchers extends LinesContentBaseMatchers with LinesContentBeHaveMatchers

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

    Permalink
  70. trait MapMatchers extends MapBaseMatchers with MapBeHaveMatchers

    Permalink

    Matchers for Maps

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

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

    Permalink

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

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

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

    Permalink

    this class allows to throw a pending result in an Exception

  75. trait MatchResult[+T] extends ResultLike

    Permalink

    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 MatchResultException[T] extends AnyRef

    Permalink
  77. trait MatchResultStackTrace extends AnyRef

    Permalink

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

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

    Permalink
  79. class MatchSkipException[T] extends SkipException with MatchResultException[T]

    Permalink

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

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

    Permalink

    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

  81. trait Matcher[-T] extends AnyRef

    Permalink

    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.
  82. trait MatcherMacros extends AnyRef

    Permalink

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

  83. trait MatcherZipOperators extends Expectations with ValueChecks

    Permalink

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

  84. trait MatcherZipOperatorsCodeGeneration extends AnyRef

    Permalink

    Generation code for the MatcherZipOperators trait

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

    Permalink

    Trait aggregating the most common specs2 matchers

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

    Permalink

    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

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

    Permalink

    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

  88. trait MustExpectations extends Expectations

    Permalink

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

  89. trait MustMatchers extends Matchers with MustExpectations

    Permalink
  90. trait MustThrownExpectations extends ThrownExpectations with MustExpectations

    Permalink

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

  91. trait MustThrownMatchers extends Matchers with MustThrownExpectations

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

    Permalink
  93. class NeutralMatcher[T] extends Matcher[T]

    Permalink

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

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

    Permalink

    This matcher never matches any value of type T

  95. trait NoCanBeEqual extends CanBeEqual

    Permalink

    This trait can be used to suppress the CanBeEqual implicits

  96. trait NoConcurrentExecutionContext extends ConcurrentExecutionContext

    Permalink

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

  97. trait NoExpectationsDescription extends ExpectationsDescription

    Permalink
  98. trait NoMatchResultStackTrace extends MatchResultStackTrace

    Permalink

    this trait doesn't fill-in stack traces

  99. trait NoMatcherZipOperatorsImplicits extends MatcherZipOperators

    Permalink

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

  100. trait NoMatcherZipOperatorsImplicitsCodeGeneration extends AnyRef

    Permalink

    code generation for the NoMatcherZipOperatorsImplicits trait

  101. trait NoMustExpectations extends MustExpectations

    Permalink

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

  102. trait NoShouldExpectations extends ShouldExpectations

    Permalink

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

  103. trait NoThrownExpectations extends Expectations

    Permalink

    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

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

    Permalink
  105. class NotMatcher[T] extends Matcher[T]

    Permalink

    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.

  106. trait NumericMatchers extends NumericBaseMatchers with NumericBeHaveMatchers

    Permalink

    Matchers for Numerical values

  107. trait OneExpectationPerProp extends ScalaCheckMatchers

    Permalink

    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.

    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. With this trait we just count 1 for each result

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

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

    Permalink
  110. trait OptionMatchers extends OptionBaseMatchers with OptionBeHaveMatchers

    Permalink

    Matchers for Options

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

    Permalink
  112. class OrNotMatch[T] extends MatchResult[T]

    Permalink
  113. class OrderingMatcher[T] extends Matcher[Seq[T]]

    Permalink
  114. 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, collect: Boolean = false, prettyCollected: Prettier[FreqMap[Set[Any]]] = Prettier.defaultPrettierMap, output: Output = Output.NoOutput) extends Product with Serializable

    Permalink

    This class is the base class for the display and set case classes.
    It contains a Map of generation parameters and indicates if the generation must be verbose.

  115. trait ParserMatchers extends ParserBaseMatchers with ParserBeHaveMatchers

    Permalink

    Matchers for parser combinators

    Matchers for parser combinators

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

    by @alexey_r

  116. trait PartialFunctionPropertyImplicits extends AnyRef

    Permalink

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

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

    Permalink

    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

  118. trait PathMatchers extends PathBaseMatchers with PathBeHaveMatchers

    Permalink

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

  119. trait Prettier[T] extends AnyRef

    Permalink

    Type-class for objects having a Pretty instance

  120. trait ProcessMatchers extends Expectations

    Permalink

    Matchers for Process[Task, T]

  121. trait PropertiesCreation extends AnyRef

    Permalink

    Properties creation

  122. trait ResultMatchers extends ResultBaseMatchers with ResultBeHaveMatchers

    Permalink

    Matchers for Results

  123. trait ResultPropertyImplicits extends AnyRef

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

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

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

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

    Permalink
  128. trait ScalaCheckMatchers extends ConsoleOutput with ScalaCheckParameters with PropertiesCreation with CheckProperty with FunctionPropertyImplicits with ResultPropertyImplicits with ResultLogicalCombinators with ApplicableArbitraries with Expectations

    Permalink

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

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

    See also

    the ScalaCheck project

  129. trait ScalaCheckParameters extends AnyRef

    Permalink

    This trait provides generation parameters to use with the ScalaCheckMatchers

  130. trait ScalaInterpreterMatchers extends Expectations

    Permalink
  131. trait Scope extends AnyRef

    Permalink

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

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

    Permalink

    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

  133. trait ShouldExpectations extends Expectations

    Permalink

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

  134. trait ShouldMatchers extends Matchers with ShouldExpectations

    Permalink
  135. trait ShouldThrownExpectations extends ThrownExpectations with ShouldExpectations

    Permalink

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

  136. trait ShouldThrownMatchers extends Matchers with ShouldThrownExpectations

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

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

    Permalink
  139. class SizedCheckedMatcher[T] extends Matcher[T]

    Permalink
  140. class SizedMatcher[T] extends Matcher[T]

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

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

    Permalink
  143. trait StandardMatchResults extends Expectations

    Permalink

    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") }

  144. trait StoredExpectations extends Expectations

    Permalink

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

  145. trait StringMatchers extends StringBaseMatchers with StringBeHaveMatchers

    Permalink

    The StringMatchers trait provides matchers which are applicable to String objects

  146. case class TaskMatcher[T](check: ValueCheck[T], duration: Option[Duration]) extends Matcher[Task[T]] with Product with Serializable

    Permalink
  147. trait TaskMatchers extends AnyRef

    Permalink

    Matchers for scalaz.concurrent.Task

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

    Permalink
  149. trait TerminationMatchers extends TerminationBaseMatchers with TerminationNotMatchers

    Permalink

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

  150. trait ThrownExpectations extends Expectations with StandardResults with StandardMatchResults

    Permalink

    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 } }

  151. trait ThrownMessages extends AnyRef

    Permalink

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

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

    Permalink

    Matchers for traversables

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

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

    Permalink
  155. trait TryMatchers extends TryBaseMatchers with TryBeHaveMatchers

    Permalink

    Matchers for util.Try instances

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

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

    Permalink
  158. trait ValueCheck[T] extends AnyRef

    Permalink

    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
  159. trait ValueChecks extends ValueChecksLowImplicits

    Permalink

    implicit conversions used to create ValueChecks

  160. trait ValueChecksLowImplicits extends AnyRef

    Permalink
  161. trait XPathFunctions extends AnyRef

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

    Permalink

    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")

  163. trait XmlMatcherKoMessage extends AnyRef

    Permalink
  164. trait XmlMatchers extends XmlBaseMatchers with XmlBeHaveMatchers

    Permalink

    The XmlMatchers trait provides matchers which are applicable to xml nodes

Value Members

  1. object AnyMatchers extends AnyMatchers

    Permalink
  2. object BeMatching

    Permalink
  3. object ContentMatchers extends ContentMatchers

    Permalink
  4. object DataTable extends Serializable

    Permalink
  5. object DataTableRow extends Serializable

    Permalink
  6. object DisjunctionMatchers extends DisjunctionMatchers

    Permalink
  7. object EitherMatchers extends EitherMatchers

    Permalink
  8. object EventuallyMatchers extends EventuallyMatchers

    Permalink
  9. object ExceptionMatchers extends ExceptionMatchers

    Permalink
  10. object Expectable

    Permalink

    Factory methods for creating Expectables

  11. object ExpectedParsedResult extends Serializable

    Permalink
  12. object FileMatchers extends FileMatchers

    Permalink
  13. object FutureMatchers extends FutureMatchers

    Permalink
  14. object Hamcrest extends Hamcrest

    Permalink
  15. object JUnitMustExpectations extends JUnitMustExpectations

    Permalink
  16. object JUnitMustMatchers extends JUnitMustMatchers with NoMatchResultStackTrace

    Permalink
  17. object JUnitShouldExpectations extends JUnitShouldExpectations

    Permalink
  18. object JUnitShouldMatchers extends JUnitShouldMatchers with NoMatchResultStackTrace

    Permalink
  19. object JsonNull extends JsonType with Product with Serializable

    Permalink
  20. object JsonType

    Permalink
  21. object LinesContentMatchers extends LinesContentMatchers

    Permalink
  22. object MapMatchers extends MapMatchers

    Permalink
  23. object MatchFailure extends Serializable

    Permalink
  24. object MatchFailureException extends Serializable

    Permalink
  25. object MatchPendingException extends Serializable

    Permalink
  26. object MatchResult

    Permalink

    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)

  27. object MatchResultCombinators extends MatchResultCombinators

    Permalink
  28. object MatchResultLogicalCombinators extends MatchResultLogicalCombinators

    Permalink
  29. object MatchSkipException extends Serializable

    Permalink
  30. object MatchSuccess extends Serializable

    Permalink
  31. object Matcher

    Permalink
  32. object MatcherMacros extends MatcherMacros

    Permalink

    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!

  33. object Matchers extends Matchers

    Permalink
  34. object MustExpectable

    Permalink
  35. object MustExpectations extends MustExpectations

    Permalink
  36. object MustMatchers extends MustMatchers with NoMatchResultStackTrace

    Permalink
  37. object MustThrownExpectations extends MustThrownExpectations

    Permalink
  38. object MustThrownMatchers extends MustThrownMatchers with NoMatchResultStackTrace

    Permalink
  39. object NumericMatchers extends NumericMatchers

    Permalink
  40. object OptionMatchers extends OptionMatchers

    Permalink
  41. object PartialFunctionPropertyImplicits extends PartialFunctionPropertyImplicits

    Permalink
  42. object PathMatchers extends PathMatchers

    Permalink
  43. object Prettier

    Permalink
  44. object ResultMatchers extends ResultMatchers

    Permalink
  45. object ScalaCheckMatchers extends ScalaCheckMatchers

    Permalink
  46. object Scope

    Permalink
  47. object ShouldExpectable

    Permalink
  48. object ShouldExpectations extends ShouldExpectations

    Permalink
  49. object ShouldMatchers extends ShouldMatchers with NoMatchResultStackTrace

    Permalink
  50. object ShouldThrownExpectations extends ShouldThrownExpectations

    Permalink
  51. object ShouldThrownMatchers extends ShouldThrownMatchers with NoMatchResultStackTrace

    Permalink
  52. object StandardMatchResults extends StandardMatchResults

    Permalink
  53. object StringMatchers extends StringMatchers

    Permalink
  54. object TaskMatchers extends TaskMatchers

    Permalink
  55. object TerminationMatchers extends TerminationMatchers

    Permalink
  56. object TraversableMatchers extends TraversableMatchers

    Permalink
  57. object TryMatchers extends TryMatchers

    Permalink
  58. object ValueCheck

    Permalink
  59. object ValueChecks extends ValueChecks

    Permalink
  60. object XmlMatchers extends XmlMatchers

    Permalink

Ungrouped