commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djo...@apache.org
Subject [text] Complete test coverage for RandomStringGenerator
Date Tue, 27 Dec 2016 09:54:29 GMT
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 <duncan@wortharead.com>
Authored: Tue Dec 27 09:54:19 2016 +0000
Committer: duncan <duncan@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));
+    }
 }


Mime
View raw message