public class ModelResultMatchers extends ObjectSE
このクラスのインスタンスは通常、MockMvcResultMatchers.model()
を介してアクセスされます。
修飾子 | コンストラクターと説明 |
---|---|
protected | ModelResultMatchers() protected コンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
<T> ResultMatcher | attribute(StringSE name, org.hamcrest.Matcher<T> matcher) 指定された Hamcrest Matcher を使用してモデル属性値をアサートします。 |
ResultMatcher | attribute(StringSE name, ObjectSE value) モデル属性値をアサートします。 |
ResultMatcher | attributeDoesNotExist(StringSE... names) 指定されたモデル属性が存在しないことをアサートします |
ResultMatcher | attributeErrorCount(StringSE name, int expectedCount) 指定されたモデル属性にエラーがあることを表明します。 |
ResultMatcher | attributeExists(StringSE... names) 指定されたモデル属性が存在することを表明します。 |
ResultMatcher | attributeHasErrors(StringSE... names) 指定されたモデル属性にエラーがあることを表明します。 |
<T> ResultMatcher | attributeHasFieldErrorCode(StringSE name, StringSE fieldName, org.hamcrest.Matcher<? super StringSE> matcher) Matcher を使用して、モデル属性のフィールドエラーコードをアサートします。 |
ResultMatcher | attributeHasFieldErrorCode(StringSE name, StringSE fieldName, StringSE error) 文字列の完全一致を使用して、モデル属性のフィールドエラーコードをアサートします。 |
ResultMatcher | attributeHasFieldErrors(StringSE name, StringSE... fieldNames) 指定されたモデル属性フィールドにエラーがあることを表明します。 |
ResultMatcher | attributeHasNoErrors(StringSE... names) 指定されたモデル属性にエラーがないことを表明します。 |
<T> ResultMatcher | errorCount(int expectedCount) モデル内のエラーの総数をアサートします。 |
<T> ResultMatcher | hasErrors() モデルにエラーがあることを表明します。 |
<T> ResultMatcher | hasNoErrors() モデルにエラーがないことを表明します。 |
<T> ResultMatcher | size(int size) モデル属性の数をアサートします。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
protected ModelResultMatchers()
MockMvcResultMatchers.model()
を使用します。public <T> ResultMatcher attribute(StringSE name, org.hamcrest.Matcher<T> matcher)
Matcher
を使用してモデル属性値をアサートします。public ResultMatcher attribute(StringSE name, ObjectSE value)
public ResultMatcher attributeExists(StringSE... names)
public ResultMatcher attributeDoesNotExist(StringSE... names)
public ResultMatcher attributeErrorCount(StringSE name, int expectedCount)
public ResultMatcher attributeHasErrors(StringSE... names)
public ResultMatcher attributeHasNoErrors(StringSE... names)
public ResultMatcher attributeHasFieldErrors(StringSE name, StringSE... fieldNames)
public ResultMatcher attributeHasFieldErrorCode(StringSE name, StringSE fieldName, StringSE error)
public <T> ResultMatcher attributeHasFieldErrorCode(StringSE name, StringSE fieldName, org.hamcrest.Matcher<? super StringSE> matcher)
Matcher
を使用して、モデル属性のフィールドエラーコードをアサートします。public <T> ResultMatcher errorCount(int expectedCount)
public <T> ResultMatcher hasErrors()
public <T> ResultMatcher hasNoErrors()
public <T> ResultMatcher size(int size)