Package nablarch.test.core.entity
Class BeanValidationTestStrategy
java.lang.Object
nablarch.test.core.entity.BeanValidationTestStrategy
- All Implemented Interfaces:
- ValidationTestStrategy
Bean Validationを使用するときの
ValidationTestStrategy実装クラス。- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionnablarch.core.message.MessagecreateExpectedMessage(nablarch.core.message.MessageLevel level, String messageString, Object[] options) メッセージ比較用のMessageを生成する。nablarch.core.message.MessagecreateExpectedValidationResultMessage(String propertyName, String messageString, Object[] options) メッセージ比較用のValidationResultMessageを生成する。Class<?>getGroupFromName(String groupName) Bean Validationのグループを取得する。invokeValidation(Class<?> entityClass, String targetPropertyName, String[] paramValues, Class<?> group) 単一のプロパティについて、バリデーションを実行する。validateParameters(String prefix, Class<?> entityClass, Map<String, String[]> params, String notUse, Class<?> group) 入力全体のバリデーションを実行する。
- 
Constructor Details- 
BeanValidationTestStrategypublic BeanValidationTestStrategy()
 
- 
- 
Method Details- 
invokeValidationpublic ValidationTestContext invokeValidation(Class<?> entityClass, String targetPropertyName, String[] paramValues, Class<?> group) Description copied from interface:ValidationTestStrategy単一のプロパティについて、バリデーションを実行する。- Specified by:
- invokeValidationin interface- ValidationTestStrategy
- Parameters:
- entityClass- テスト対象対象クラス名
- targetPropertyName- バリデーション対象プロパティ名
- paramValues- パラメータとして使用する値
- group- Bean Validationのグループ(Bean Validationを使用するときのみ有効)
- Returns:
- テスト用バリデーションコンテキスト
 
- 
validateParameterspublic ValidationTestContext validateParameters(String prefix, Class<?> entityClass, Map<String, String[]> params, String notUse, Class<?> group) Description copied from interface:ValidationTestStrategy入力全体のバリデーションを実行する。- Specified by:
- validateParametersin interface- ValidationTestStrategy
- Parameters:
- prefix- 入力値のマップに入ったキーのプレフィクス
- entityClass- テスト対象対象クラス名
- params- 入力値を表すマップ
- notUse- バリデーション対象メソッド名
- group- Bean Validationのグループ(Bean Validationを使用するときのみ有効)
- Returns:
- テスト用バリデーションコンテキスト
 
- 
getGroupFromNameDescription copied from interface:ValidationTestStrategyBean Validationのグループを取得する。- Specified by:
- getGroupFromNamein interface- ValidationTestStrategy
- Parameters:
- groupName- グループ名
- Returns:
- Bean Validationのグループ
 
- 
createExpectedValidationResultMessagepublic nablarch.core.message.Message createExpectedValidationResultMessage(String propertyName, String messageString, Object[] options) Description copied from interface:ValidationTestStrategyメッセージ比較用のValidationResultMessageを生成する。- Specified by:
- createExpectedValidationResultMessagein interface- ValidationTestStrategy
- Parameters:
- propertyName- プロパティ名
- messageString- メッセージを特定する文字列
- options- オプションパラメータ
- Returns:
- ValidationResultMessage
 
- 
createExpectedMessagepublic nablarch.core.message.Message createExpectedMessage(nablarch.core.message.MessageLevel level, String messageString, Object[] options) Description copied from interface:ValidationTestStrategyメッセージ比較用のMessageを生成する。- Specified by:
- createExpectedMessagein interface- ValidationTestStrategy
- Parameters:
- level- メッセージレベル
- messageString- メッセージを特定する文字列
- options- オプションパラメータ
- Returns:
- Message
 
 
-