package matcher
- Alphabetic
- By Inheritance
- matcher
- ReturnsSyntax
- ExpectationsCreation
- MatchResultStackTrace
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
ContentMatchers extends LinesContentMatchers with FilesContentMatchers
The ContentMatchers trait provides matchers to make comparisons between files, sequences,...
-
class
EqualIgnoringSpaceMatcher extends Matcher[Seq[Node]] with XmlMatcherKoMessage
Matcher for equalIgnoreSpace comparison, ignoring the nodes order
-
class
EqualIgnoringSpaceMatcherOrdered extends Matcher[Seq[Node]] with XmlMatcherKoMessage
Matcher for equalIgnoreSpace comparison, considering the node order
-
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
- case class FailTypecheckMatcher(expected: String) extends Matcher[Typechecked] with Product with Serializable
-
trait
FileMatchers extends FileBaseMatchers with FileBeHaveMatchers
The FileMatchers trait provides matchers which are applicable to files
-
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
- case class JsonArray(list: List[Any]) extends JsonType with Product with Serializable
- case class JsonBoolean(b: Boolean) extends JsonType with Product with Serializable
- case class JsonMap(map: Map[String, Any]) extends JsonType with Product with Serializable
-
trait
JsonMatchers extends JsonBaseMatchers with JsonBaseBeHaveMatchers
Matchers for Json expressions (entered as strings)
- case class JsonNumber(d: Double) extends JsonType with Product with Serializable
-
trait
JsonSelectors extends AnyRef
Different ways of selecting elements in a Json object
- case class JsonString(s: String) extends JsonType with Product with Serializable
-
sealed
trait
JsonType extends AnyRef
abstract JSON types for specs2
- trait LinesContentMatchers extends LinesContentBaseMatchers with LinesContentBeHaveMatchers
- class MakeMatchers[C <: Context] extends AnyRef
-
trait
MatcherMacros extends AnyRef
Macro definitions to generate matchers for the members of a type T
-
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
-
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
nodehas some children, then they are searched using equality -
trait
PathMatchers extends PathBaseMatchers with PathBeHaveMatchers
The PathMatchers trait provides matchers which are applicable to strings representing paths
-
implicit
class
Returns[T] extends AnyRef
- Definition Classes
- ReturnsSyntax
- trait ScalaInterpreterMatchers extends Expectations
- class TerminationMatcher[-T] extends Matcher[T]
-
trait
TerminationMatchers extends TerminationBaseMatchers with TerminationNotMatchers
This trait provides matchers to check if a block of code is terminating or not
- trait TypecheckBeHaveMatchers extends AnyRef
- class TypecheckMatcher extends Matcher[Typechecked]
-
trait
TypecheckMatchers extends TypecheckBeHaveMatchers
Matchers for checking if a piece of code compiles or not
- trait XPathFunctions extends AnyRef
-
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
will be ok. must \\("c").\("d") must \\("c").\("d") - trait XmlMatcherKoMessage extends AnyRef
-
trait
XmlMatchers extends XmlBaseMatchers with XmlBeHaveMatchers
The XmlMatchers trait provides matchers which are applicaborderle to xml nodes
Value Members
-
def
checkFailure[T](m: MatchResult[T]): MatchResult[T]
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
-
def
checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
-
def
checkResultFailure(r: ⇒ Result): Result
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
-
def
createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]
- Definition Classes
- ExpectationsCreation
-
def
createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]
- Definition Classes
- ExpectationsCreation
-
def
createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]
- Definition Classes
- ExpectationsCreation
-
def
createExpectable[T](t: ⇒ T): Expectable[T]
- Definition Classes
- ExpectationsCreation
-
def
createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]
- Definition Classes
- ExpectationsCreation
-
def
mapMatchResult[T](m: MatchResult[T]): MatchResult[T]
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
-
def
sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
-
def
setStacktrace[T](m: MatchResult[T]): MatchResult[T]
- Attributes
- protected
- Definition Classes
- MatchResultStackTrace
- object ContentMatchers extends ContentMatchers
- object ExpectedParsedResult extends Serializable
- object FileMatchers extends FileMatchers
- object JsonNull extends JsonType with Product with Serializable
- object JsonType
- object LinesContentMatchers extends LinesContentMatchers
-
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!
- object PathMatchers extends PathMatchers
- object TerminationMatchers extends TerminationMatchers
- object TypecheckMatchers extends TypecheckMatchers
- object XmlMatchers extends XmlMatchers