org.specs2.matcher

Type members

Classlikes

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

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

Companion:
object
Companion:
class
class EqualIgnoringSpaceMatcher(node: Seq[Node]) extends Matcher[Seq[Node]] with XmlMatcherKoMessage

Matcher for equalIgnoreSpace comparison, ignoring the nodes order

Matcher for equalIgnoreSpace comparison, ignoring the nodes order

class EqualIgnoringSpaceMatcherOrdered(node: Seq[Node]) extends Matcher[Seq[Node]] with XmlMatcherKoMessage

Matcher for equalIgnoreSpace comparison, considering the node order

Matcher for equalIgnoreSpace comparison, considering the node order

case class FailTypecheckMatcher(expected: String) extends Matcher[TypecheckResult]

The FileMatchers trait provides matchers which are applicable to files

The FileMatchers trait provides matchers which are applicable to files

Companion:
object
object FileMatchers extends FileMatchers
Companion:
class
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

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

case class JsonArray(list: List[Any]) extends JsonType
case class JsonBoolean(b: Boolean) extends JsonType
case class JsonMap(map: Map[String, Any]) extends JsonType
trait JsonMatchers extends Expectations

Matchers for Json expressions (entered as strings)

Matchers for Json expressions (entered as strings)

Companion:
object
object JsonMatchers extends JsonMatchers
Companion:
class
case object JsonNull extends JsonType
case class JsonNumber(d: Double) extends JsonType

Different ways of selecting elements in a Json object

Different ways of selecting elements in a Json object

case class JsonString(s: String) extends JsonType
sealed trait JsonType

abstract JSON types for specs2

abstract JSON types for specs2

Companion:
object
object JsonType
Companion:
class
case class PathFunction(node: Node, function: XPathFunction, attributes: List[String], attributeValues: Map[String, String], exactMatch: Boolean, textMessage: Option[String], textMatcher: Matcher[String]) extends Seq[Node] => Seq[Node] with XPathFunctions

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

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

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

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

Companion:
object
object PathMatchers extends PathMatchers
Companion:
class
trait ScalaInterpreterMatchers extends Expectations
class TerminationMatcher[-T](retries: Int, sleep: Duration, whenAction: Option[() => Any], whenDesc: Option[String], onlyWhen: Boolean)(using ee: ExecutionEnv) extends Matcher[T]

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

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

Companion:
object
class TypecheckMatcher extends Matcher[TypecheckResult]

Matchers for checking if a piece of code compiles or not

Matchers for checking if a piece of code compiles or not

Companion:
object
Companion:
class
case class XmlMatcher(functions: Seq[PathFunction]) extends Matcher[Seq[Node]]

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

The XmlMatchers trait provides matchers which are applicable to xml nodes

The XmlMatchers trait provides matchers which are applicable to xml nodes

Companion:
object
object XmlMatchers extends XmlMatchers
Companion:
class

Types

type HasPath = { def getPath(): String; }