You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/09/09 20:39:56 UTC
svn commit: r1382557 -
/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
Author: ggregory
Date: Sun Sep 9 18:39:56 2012
New Revision: 1382557
URL: http://svn.apache.org/viewvc?rev=1382557&view=rev
Log:
Branch coverage for org.apache.commons.codec.binary.StringUtils.getBytesUnchecked(String, String).
Modified:
commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java?rev=1382557&r1=1382556&r2=1382557&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java (original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/StringUtilsTest.java Sun Sep 9 18:39:56 2012
@@ -114,6 +114,11 @@ public class StringUtilsTest {
}
}
+ @Test
+ public void testGetBytesUncheckedNullInput() {
+ Assert.assertNull(StringUtils.getBytesUnchecked(null, "UNKNOWN"));
+ }
+
private void testNewString(String charsetName) throws UnsupportedEncodingException {
String expected = new String(BYTES_FIXTURE, charsetName);
String actual = StringUtils.newString(BYTES_FIXTURE, charsetName);