下面列出了怎么用org.springframework.beans.MethodInvocationException的API类实例代码及写法,或者点击链接到github查看源代码。
@Test
public void PropertyEditingExceptionの場合にフィールドエラーが設定される() {
class T {
}
MethodInvocationException mie = new MethodInvocationException(new PropertyChangeEvent(new T(), "aaaa", null, null),
new PropertyEditingException("message"));
BeanPropertyBindingResult result = new BeanPropertyBindingResult(new T(), "Test");
processor.processPropertyAccessException(mie, result);
assertThat(result.getFieldError(), notNullValue());
}