summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
diff options
context:
space:
mode:
authormikaelpeltier <mikaelpeltier@google.com>2015-06-24 14:31:11 +0200
committerMikael Peltier <mikaelpeltier@google.com>2015-06-24 14:59:36 +0000
commit04563874ddaac702d6c715eaa89c29b253f4c54e (patch)
treec305fa98670c3e80be494cc054a8e31b51bfe7f2 /simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
parentf1828481ebcfee3bddc323fca178a4502a60ceef (diff)
downloadtoolchain_jack-04563874ddaac702d6c715eaa89c29b253f4c54e.zip
toolchain_jack-04563874ddaac702d6c715eaa89c29b253f4c54e.tar.gz
toolchain_jack-04563874ddaac702d6c715eaa89c29b253f4c54e.tar.bz2
Add simpleframework source files
Change-Id: I18d01df16de2868ca5458f79a88e6070b75db2c3 (cherry picked from commit 3e9f84cf7b22f6970eb8041ca38d12d75c6bb270)
Diffstat (limited to 'simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java')
-rw-r--r--simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java b/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
new file mode 100644
index 0000000..d81370e
--- /dev/null
+++ b/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
@@ -0,0 +1,23 @@
+package org.simpleframework.http.core;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+public class ProducerExceptionTest extends TestCase {
+
+ public void testException() {
+ try {
+ throw new IOException("Error");
+ }catch(Exception main) {
+ try {
+ throw new BodyEncoderException("Wrapper", main);
+ }catch(Exception cause) {
+ cause.printStackTrace();
+
+ assertEquals(cause.getCause(), main);
+ }
+ }
+ }
+
+}