commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r797671 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java
Date Fri, 24 Jul 2009 22:16:29 GMT
Author: ggregory
Date: Fri Jul 24 22:16:29 2009
New Revision: 797671

URL: http://svn.apache.org/viewvc?rev=797671&view=rev
Log:
Refactor comoon code. URLCodec test coverage now 100%/100%.

Modified:
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java?rev=797671&r1=797670&r2=797671&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java Fri
Jul 24 22:16:29 2009
@@ -138,13 +138,21 @@
             fail("DecoderException should have been thrown");
         } catch (DecoderException e) {
             // Expected. Move on
-        }
+        }        
         try {
+            // Bad 1st char after %
             urlCodec.decode("%WW");
             fail("DecoderException should have been thrown");
         } catch (DecoderException e) {
             // Expected. Move on
         }
+        try {
+            // Bad 2nd char after %
+            urlCodec.decode("%0W");
+            fail("DecoderException should have been thrown");
+        } catch (DecoderException e) {
+            // Expected. Move on
+        }
         this.validateState(urlCodec);
     }
 



Mime
View raw message