public class RandomStringUtilsTest extends Object
RandomStringUtils.| Constructor and Description |
|---|
RandomStringUtilsTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testConstructor() |
void |
testExceptions() |
void |
testLang100()
Checks if the string got by
RandomStringUtils.random(int)
can be converted to UTF-8 and back without loss. |
void |
testLANG805() |
void |
testLANG807() |
void |
testRandomAlphabetic()
Make sure boundary alpha characters are generated by randomAlphabetic
This test will fail randomly with probability = 4 * (51/52)**1000 ~ 1.58E-8
|
void |
testRandomAlphaNumeric()
Make sure boundary alphanumeric characters are generated by randomAlphaNumeric
This test will fail randomly with probability = 6 * (61/62)**1000 ~ 5.2E-7
|
void |
testRandomAscii()
Make sure 32 and 127 are generated by randomNumeric
This test will fail randomly with probability = 2*(95/96)**1000 ~ 5.7E-5
|
void |
testRandomNumeric()
Make sure '0' and '9' are generated by randomNumeric
This test will fail randomly with probability = 2 * (9/10)**1000 ~ 3.5E-46
|
void |
testRandomStringUtils()
Test the implementation
|
void |
testRandomStringUtilsHomog()
Test homogeneity of random strings generated --
i.e., test that characters show up with expected frequencies
in generated strings.
|
public RandomStringUtilsTest()
public void testConstructor()
public void testRandomStringUtils()
public void testLANG805()
public void testLANG807()
public void testExceptions()
public void testRandomAlphaNumeric()
public void testRandomNumeric()
public void testRandomAlphabetic()
public void testRandomAscii()
public void testRandomStringUtilsHomog()
public void testLang100() throws Exception
RandomStringUtils.random(int)
can be converted to UTF-8 and back without loss.Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.