クラス XpathRequestMatchers

java.lang.ObjectSE
org.springframework.test.web.client.match.XpathRequestMatchers

public class XpathRequestMatchers extends ObjectSE
XPath 式を使用するコンテンツ RequestMatcher 実装をリクエストするためのファクトリメソッド。

このクラスのインスタンスには通常、MockRestRequestMatchers.xpath(String, Object...) または MockRestRequestMatchers.xpath(String, Map, Object...) を介してアクセスします。

導入:
3.2
作成者:
Rossen Stoyanchev, Sam Brannen
  • コンストラクターの詳細

  • メソッドの詳細

    • node

      public RequestMatcher node(Matcher<? super NodeSE> matcher)
      XPath を適用し、指定された Matcher<Node> でそれをアサートします。
    • exists

      public RequestMatcher exists()
      コンテンツが指定された XPath に存在することを表明します。
    • doesNotExist

      public RequestMatcher doesNotExist()
      指定された XPath にコンテンツが存在しないことを表明します。
    • nodeCount

      public RequestMatcher nodeCount(Matcher<? super IntegerSE> matcher)
      XPath を適用し、指定された Matcher<Integer> で見つかったノードの数をアサートします。
    • nodeCount

      public RequestMatcher nodeCount(int expectedCount)
      XPath を適用し、見つかったノードの数をアサートします。
    • string

      public RequestMatcher string(Matcher<? super StringSE> matcher)
      XPath を適用し、指定されたマッチャーで見つかった String コンテンツをアサートします。
    • string

      public RequestMatcher string(StringSE content)
      XPath を適用し、見つかった文字列コンテンツをアサートします。
    • number

      public RequestMatcher number(Matcher<? super DoubleSE> matcher)
      XPath を適用し、指定されたマッチャーで見つかった数をアサートします。
    • number

      public RequestMatcher number(DoubleSE value)
      XPath を適用し、見つかった数値をアサートします。
    • booleanValue

      public RequestMatcher booleanValue(BooleanSE value)
      XPath を適用し、見つかったブール値をアサートします。