クラス CookieResultMatchers

java.lang.ObjectSE
org.springframework.test.web.servlet.result.CookieResultMatchers

public class CookieResultMatchers extends ObjectSE
レスポンス Cookie アサーションのファクトリ。

このクラスのインスタンスは通常、MockMvcResultMatchers.cookie() を介してアクセスされます。

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

  • メソッドの詳細

    • value

      public ResultMatcher value(StringSE name, Matcher<? super StringSE> matcher)
      指定された Hamcrest Matcher で Cookie 値をアサートします。
    • value

      public ResultMatcher value(StringSE name, StringSE expectedValue)
      cookie 値をアサートします。
    • exists

      public ResultMatcher exists(StringSE name)
      Cookie が存在することを表明します。存在チェックは、最大経過時間が 0(つまり、期限切れ)であるかどうかに関係なく行われます。
    • doesNotExist

      public ResultMatcher doesNotExist(StringSE name)
      Cookie が存在しないことを表明します。存在チェックは、最大存続期間が 0 であるかどうか、つまり有効期限が切れているかどうかには関係ありません。
    • maxAge

      public ResultMatcher maxAge(StringSE name, Matcher<? super IntegerSE> matcher)
      Hamcrest Matcher を使用して、Cookie の maxAge をアサートします。
    • maxAge

      public ResultMatcher maxAge(StringSE name, int maxAge)
      クッキーの maxAge をアサートします。
    • path

      public ResultMatcher path(StringSE name, Matcher<? super StringSE> matcher)
      Hamcrest Matcher を使用して Cookie のパスをアサートします。
    • path

      public ResultMatcher path(StringSE name, StringSE path)
      Cookie のパスをアサートします。
    • domain

      public ResultMatcher domain(StringSE name, Matcher<? super StringSE> matcher)
      Hamcrest Matcher を使用して Cookie のドメインをアサートします。
    • domain

      public ResultMatcher domain(StringSE name, StringSE domain)
      Cookie のドメインをアサートします。
    • comment

      public ResultMatcher comment(StringSE name, Matcher<? super StringSE> matcher)
      Hamcrest Matcher で Cookie のコメントをアサートします。
    • comment

      public ResultMatcher comment(StringSE name, StringSE comment)
      Cookie のコメントをアサートします。
    • version

      public ResultMatcher version(StringSE name, Matcher<? super IntegerSE> matcher)
      Hamcrest Matcher を使用して Cookie のバージョンをアサートします。
    • version

      public ResultMatcher version(StringSE name, int version)
      Cookie のバージョンをアサートします。
    • secure

      public ResultMatcher secure(StringSE name, boolean secure)
      Cookie を安全なプロトコルで送信する必要があるかどうかを表明します。
    • httpOnly

      public ResultMatcher httpOnly(StringSE name, boolean httpOnly)
      Cookie を HTTP のみにする必要があるかどうかをアサートします。
      導入:
      4.3.9