List of usage examples for org.apache.commons.validator ValidatorException getCause
public synchronized Throwable getCause()
From source file:jp.terasoluna.fw.validation.springmodules.DefaultBeanValidatorExTest.java
/** * testCleanupValidator01() <br>/* w w w . jav a2s .co m*/ * <br> * () <br> * A,E <br> * <br> * () validator:CommonsValidatorEx<br> * (????) validator.getValidatorException():ValidatorException<br> * <br> * () :ValidatorExceptionterasoluna-spring-validator)<br> * ?ValidatorException(commons)<br> * <br> * validator?ValidatorException????????????? <br> * @throws Exception ????? */ @Test public void testCleanupValidator01() throws Exception { // ?? ValidatorResources resources = new ValidatorResources(); CommonsValidatorEx commonsValidatorEx = new CommonsValidatorEx(resources, null); ValidatorException validatorException = new ValidatorException(); ReflectionTestUtils.setField(commonsValidatorEx, "validatorException", validatorException); DefaultBeanValidatorEx defaultBeanValidatorEx = new DefaultBeanValidatorEx(); try { // defaultBeanValidatorEx.cleanupValidator(commonsValidatorEx); fail(); } catch (jp.terasoluna.fw.validation.springmodules.ValidatorException e) { // assertSame(validatorException, e.getCause()); } }