Repository: commons-text
Updated Branches:
  refs/heads/master 1b3e44809 -> 0b1ca53b3


Complete test coverage for RandomStringGenerator

Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/0b1ca53b
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/0b1ca53b
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/0b1ca53b

Branch: refs/heads/master
Commit: 0b1ca53b3e00e74364849a14372e4b3f57c2d3a0
Parents: 1b3e448
Author: duncan <dun...@wortharead.com>
Authored: Tue Dec 27 09:54:19 2016 +0000
Committer: duncan <dun...@wortharead.com>
Committed: Tue Dec 27 09:54:19 2016 +0000

----------------------------------------------------------------------
 .../org/apache/commons/text/RandomStringGeneratorTest.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/0b1ca53b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java 
b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index 2ff7a67..36ce5e0 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
@@ -203,4 +203,10 @@ public class RandomStringGeneratorTest {
             assertTrue(c == 'b');
         }
     }
+    
+    @Test
+    public void testZeroLength() throws Exception {
+        RandomStringGenerator generator = new 
RandomStringGenerator.Builder().build();
+        assertEquals("", generator.generate(0));
+    }
 }

Reply via email to