commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1458043 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java
Date Mon, 18 Mar 2013 22:23:31 GMT
Author: sebb
Date: Mon Mar 18 22:23:31 2013
New Revision: 1458043

URL: http://svn.apache.org/r1458043
Log:
Add test for unsupported encoding

Modified:
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java?rev=1458043&r1=1458042&r2=1458043&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java
Mon Mar 18 22:23:31 2013
@@ -18,6 +18,8 @@ package org.apache.commons.fileupload.ut
 
 import static org.junit.Assert.assertEquals;
 
+import java.io.UnsupportedEncodingException;
+
 import org.apache.commons.fileupload.util.mime.MimeUtility;
 import org.junit.Test;
 
@@ -54,4 +56,8 @@ public final class MimeUtilityTestCase {
         assertEquals(expected, MimeUtility.decodeText(encoded));
     }
 
+    @Test(expected=UnsupportedEncodingException.class)
+    public void decodeInvalidEncoding() throws Exception {
+        MimeUtility.decodeText("=?invalid?B?xyz-?=");
+    }
 }



Mime
View raw message