You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2009/04/18 07:02:21 UTC
svn commit: r766213 -
/commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
Author: bayard
Date: Sat Apr 18 05:02:21 2009
New Revision: 766213
URL: http://svn.apache.org/viewvc?rev=766213&view=rev
Log:
Adding null test for CODEC-40
Modified:
commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java?rev=766213&r1=766212&r2=766213&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java Sat Apr 18 05:02:21 2009
@@ -698,6 +698,17 @@
assertEquals(bigInt4, Base64.decodeInteger(encodedInt4.getBytes()));
}
+ public void testCodeIntegerNull() {
+ try {
+ Base64.encodeInteger(null);
+ fail("Exception not thrown when passing in null to encodeInteger(BigInteger)");
+ } catch(NullPointerException npe) {
+ // expected
+ } catch(Exception e) {
+ fail("Incorrect Exception caught when passing in null to encodeInteger(BigInteger)");
+ }
+ }
+
public void testCodeIntegerEdgeCases() {
// TODO
}