OPEN - issue SPR-6246: Velocity MethodInvocationExceptions not properly reported
Added test case for exception. This probably fails on a non-Sun JVM?
This commit is contained in:
parent
2978a4d0eb
commit
c63cdb2444
|
|
@ -0,0 +1,24 @@
|
|||
package org.springframework.web.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.core.NestedExceptionUtils;
|
||||
|
||||
public class NestedServletExceptionTests {
|
||||
|
||||
@Test
|
||||
public void testNestedServletExceptionString() {
|
||||
NestedServletException exception = new NestedServletException("foo");
|
||||
assertEquals("foo", exception.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNestedServletExceptionStringThrowable() {
|
||||
Throwable cause = new RuntimeException();
|
||||
NestedServletException exception = new NestedServletException("foo", cause);
|
||||
assertEquals(NestedExceptionUtils.buildMessage("foo", cause), exception.getMessage());
|
||||
assertEquals(cause, exception.getCause());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue