c

org.specs2.matcher

XmlMatcher

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:

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

Linear Supertypes
Serializable, Product, Equals, Matcher[Seq[Node]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XmlMatcher
  2. Serializable
  3. Product
  4. Equals
  5. Matcher
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new XmlMatcher(functions: Seq[PathFunction])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def \(label: String, attributeValues: (String, String), attributeValues2: (String, String)*): XmlMatcher
  5. def \(label: String, attributeNames: String*): XmlMatcher

    alias for \ using the node label only

  6. def \(node: Node, attributeValues: (String, String), attributeValues2: (String, String)*): XmlMatcher
  7. def \(node: Node, attributeNames: String*): XmlMatcher
  8. def \>(t: String): XmlMatcher

    alias for textIs

  9. def \>~(t: String): XmlMatcher

    alias for textMatches

  10. def \\(label: String, attributeValues: (String, String), attributeValues2: (String, String)*): XmlMatcher
  11. def \\(label: String, attributeNames: String*): XmlMatcher

    alias for \\ using the node label only

  12. def \\(node: Node, attributeValues: (String, String), attributeValues2: (String, String)*): XmlMatcher
  13. def \\(node: Node, attributeNames: String*): XmlMatcher
  14. def ^^[S](f: (S) => Expectable[Seq[Node]], dummy: Int): Matcher[S]
    Definition Classes
    Matcher
  15. def ^^[S](f: (S) => Seq[Node]): Matcher[S]
    Definition Classes
    Matcher
  16. def and[S <: Seq[Node]](m: => Matcher[S]): Matcher[S]
    Definition Classes
    Matcher
  17. def apply[S <: Seq[Node]](n: Expectable[S]): MatchResult[S]

    checks that the nodes satisfy the functions

    checks that the nodes satisfy the functions

    Definition Classes
    XmlMatcher → Matcher
  18. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  19. def checkFunctions(pathFunctions: Seq[PathFunction], nodes: Seq[Node], messages: (Boolean, String, String)): (Boolean, String, String)

    checks that the nodes satisfy the functions

    checks that the nodes satisfy the functions

    returns

    a MatcherResult

  20. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def eventually(retries: Int, sleep: Duration): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  23. def eventually: Matcher[Seq[Node]]
    Definition Classes
    Matcher
  24. def exactly: XmlMatcher

    do an exact match on attributes and attributes values

  25. def failure[S <: Seq[Node]](message: => String, value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  26. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  27. val functions: Seq[PathFunction]
  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def iff(b: Boolean): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def lazily: Matcher[() => Seq[Node]]
    Definition Classes
    Matcher
  32. def mute: Matcher[Seq[Node]]
    Definition Classes
    Matcher
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. def not: Matcher[Seq[Node]]
    Definition Classes
    Matcher
  35. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. def or[S <: Seq[Node]](m: => Matcher[S]): Matcher[S]
    Definition Classes
    Matcher
  38. def orPending(message: (String) => String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  39. def orPending(m: String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  40. def orPending: Matcher[Seq[Node]]
    Definition Classes
    Matcher
  41. def orSkip(message: (String) => String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  42. def orSkip(m: String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  43. def orSkip: Matcher[Seq[Node]]
    Definition Classes
    Matcher
  44. def productElementNames: Iterator[String]
    Definition Classes
    Product
  45. def result[S <: Seq[Node]](other: MatchResultMessages.MatchResultMessage, value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  46. def result[S <: Seq[Node]](other: Result, value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  47. def result[S <: Seq[Node]](other: MatchResult[_], value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  48. def result[S <: Seq[Node]](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S], details: Details): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  49. def result[S <: Seq[Node]](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S], expected: String, actual: String): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  50. def result[S <: Seq[Node]](triplet: => (Boolean, String, String), value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  51. def result[S <: Seq[Node]](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  52. def setMessage(message: String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  53. def success[S <: Seq[Node]](message: => String, value: Expectable[S]): MatchResult[S]
    Attributes
    protected
    Definition Classes
    Matcher
  54. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  55. def test: (Seq[Node]) => Boolean
    Definition Classes
    Matcher
  56. def textIs(t: String): XmlMatcher

    specify the value of the node text

  57. def textMatches(regexp: String): XmlMatcher

    specify the value of the node text

  58. def unless(b: Boolean, m: String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  59. def updateMessage(f: (String) => String): Matcher[Seq[Node]]
    Definition Classes
    Matcher
  60. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  61. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  63. def when(b: Boolean, m: String): Matcher[Seq[Node]]
    Definition Classes
    Matcher

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Matcher[Seq[Node]]

Inherited from AnyRef

Inherited from Any

Ungrouped